Home

CyPro User Manual

image

Contents

1. To enter characters not supported by your keyboard press Alt key on the numeric keypad type character code preceded by 0 and release Alt Character code should be expressed in decimal Num lock should be on Example According to character table symbol degrees centigrade has hex code DFh Converting value to decimal gives 223 DFh DOh OFh 16 13 15 223 To enter centigrade symbol e make sure num lock is on e press Alt e press consecutively 0223 e release Alt Because of different character sets character R appears instead of but it will show correctly on LCD Jorn o A Klee E dorar le KEE Ee Codes 0 7 are reserved for bar graph or Latin 2 characters cubreTech Keyboard shortcuts Common F1 F2 F9 F10 Ctrl F 10 F11 F12 Ctrl O Ctrl S Ctrl Shift S Ctrl P Ctrl D Ctrl L Ins Delete Ctrl Up Ctrl Dn Ctrl Tab Ctrl Shift Tab Ctrl F4 Alt F4 Text editor Ctrl space Ctrl Z Alt Backspace Shift Ctrl Z Ctrl X Shift Del Ctrl C Ctrl Insert Ctrl V Shift Insert Ctrl G Ctrl Shift l Ctrl Shift U Ctrl Shift C cybreTech Appendix e Keyboard shortcuts Help Syntax check Hardware setup Allocation editor Mask editor Socket editor Send Variable monitor Data manager Start PLC program Stop PLC program Open Save Save As Print project Connect disconnect communication port Select NAD Insert context sensitive Delete cont
2. slot 1 slot 1 on board on board Analog I O cards have 32 words reserved for each slot Single channel cards use only the first reserved word Slot 0 is reserved so the first available slot is 1 In word and out word variables are both integer type analog inputs analog outputs IW2047 QW2047 IW2016 QW2016 slot 1 slot 1 reserved reserved Input and output variables are auto allocated and their names are in the form cubreTech Programming e Variables nnnxx varname where nnn is module type name e g bio for Bio 24 op for OP 2 xx is module ordinal number starting from 00 i e third operator panel is 02 and varname is the name of the variable For example I O variable key f related to the key F of the first operator panel will be allocated as opOO key f Internal variables CyBro 2 internal variables are allocated through I O address space Each variable has a specific function first scan scan overrun clock 10ms clock 100ms clock 1s clock 10s clock 1min retentive fail all outputs off all inputs off no input filter rtc read req rtc write req ee read req ee write req ee write magic scan time scan time max scan frequency cubreTech Active only during first scan May be used to initialize variables Indicates that scan timeout occurred If program cycle lasts longer then 50ms execution will be interrupted 10ms system clock 5ms h
3. IEC 1131 3 function block diagram ladder diagram sequential function chart cubreTech Introduction e Hardware requirements Hardware requirements Any PC capable of running MS Windows XP is sufficient CyPro occupies about 8Mb on disc To connect CyBro and PC standard serial RS232 or Ethernet port is required USB to serial converters are generally supported although some devices may not work Installation To install CyPro start the installation archive and follow the instructions Recommended install directory is C Program Files CyPro If older versions are needed it is recommended to append version number to the installation directory e g C Program Files CyPro v201 Z3 Setup CyPro Welcome to the CyPro Setup Wizard This will install CyPro v2 0 1 on pour computer It is strongly recommended that you close all other applications you have running before continuing This will help prevent any conflicts during the installation pracess Click Nest to continue or Cancel to exit Setup Installation does the following unpack files into specified directory create start menu group and icons set association to cyp file type set CyPro language and communication port No file is copied to windows directory No system files are replaced or changed Default directory for user files is C Program Files CyPro Project although it is recommended to keep projects in
4. iui OOO c etse me ies lt sol O900 mere we eis 1 Elem ev EE o ene Both mask control variables may also be accessed through the A bus cubreTech 2 Serial ports e General Serial ports General COM1 and COM2 are multi purpose serial RS232 ports available for following protocols e A bus slave e Modbus RTU slave e free programmable port Operation mode is selected by Configuration It is not possible to change mode from plc program Free programmable mode As a general purpose communication port various serial devices may be connected sensors scales modems radio links printers and others Communication protocol is determined by the PLC program Although binary message format is supported communication functions are most suitable for sending receiving and parsing plain ASCII messages Both master and slave operation is supported Com2 port is full duplex so data may flow simultaneously in both directions Port selection Before communication commands are applied port should be selected com select port int To select COMI port is 1 To select COM2 port is 2 Selected port may be changed at any time Prepare transmit message Prior to transmission program should create complete outgoing message To create a message use display functions dprnc dprns dprnb dprni dprnl and dprnr To print to transmit buffer use O as a slot number transmit buffer appears as display in slot O The X
5. CyBro 2 For more details how to setup the network check Networking section cybreTech User interface e Main window User interface Main window CyPro consists of editor toolbars and status bar Default screen setup is shown below CyPro v2 6 0 N Projekti WCP 2 Runtime Examples GsmPlcDemo cyp DAR File Edit View Project Program Tools Window Help 00060000 O 00000000 New Open Save Print Paste Configuration Hardware Allocation Masks Sockets Send Monitor Start Stop Project Tree di Local Allocation E E Name Type Attributes Description Es E Program New Program BS Hardware m Masks s Sockets E ST function main void 4 ST function YoiceAndSMSAPI void 3 Description main VoiceAndSMSAPI New Program ST function VoiceAndSMSAPI void init receiving if fp gsm incoming call then gsm incoming call active while phone is gsm incoming digit data 1 3 gsm incoming digit req 1 incoming number size 8 3 incoming_number_reading 1 end_if if fp gsm message received then gsm message received sms message rect gsm incoming digit data 1 gsm incoming digit req 1 incoming number size 8 incoming number reading 1 gsm incoming letter data 1 gsm incoming letter req 1 incoming message size 8 incoming message reading 1 end if read phone number from module Eu Ln 1 Col 19 Each component can be docked or floating To undock
6. Evaluation order is Speed1 10 Speed2 20 Press 24 54 9 SE EO Rate IO IE A No NM 0 OY O1 CO OI To change evaluation order add brackets Rate Speed1 10 Speed2 20 Press 24 9 The expression 20 Press 24 9 has higher precedence and will be evaluated before its value is used as a divisor for Speed2 The value for Rate in this case will be 5 60 20 6 5 60 14 9 286 Rate Data type conversions Type conversions are performed automatically but only lower to higher type conversions are valid bit integer word longint real In the following example a number of conversions will be performed real0 reall gt real2 intl longl PII SM RECO e real real L gt bit EN int int a long real long real If both arguments are integer result is also integer even if assigned to a real variable 25 1 10 result is rT i 16 To get correct floating point result at least one operator should be floating point cybreTech 30 Programming e Instruction list To correct previous example constant 10 may be written as 10 0 L s 25 Sy OO y EE K Same result is obtained casting one operator to real L 25 r 2 wee a Jie result i r 2 5 Multiline expressions It is possible to write a multiline expression but every line must end with an operator Following example shows how expression can be divided into several lines hearer on Nearer e
7. Iteration statements are provided for situations where it is necessary to repeat one or more statements a number of times depending on the state of the particular variable or condition lteration statements should be used carefully in order to avoid endless loops which will cause scan overrun error for do The for do construction allows a set of statements to be repeated depending on the value of an iteration variable This is an integer or long integer variable which is used to count the statements executions Iteration variable is incremented by 1 at the end of for do loop This construction takes the general form for lt var gt lt expression gt to lt expression gt do lt statements gt end ror Before iteration takes place its variable is tested weather it has reach the final value After leaving for do construction iteration value will contain the final expression value The statements within for do loop should not contain fp or fn instructions Example ror is 0 to 19 do channel i TRUE end ob Lor xcd wed wu da wells 00 Pank EEN ere cie C stare ie lt 7 2s ena fox while do The while do construction allows one or more statements to be executed while a particular boolean expression remains true The boolean expression is tested prior to executing the statements If it is false the statements within the while do will not be executed cybreTech Programming e Instruction list
8. Send current program to CyBro Read write plc variables on line Start CyBro program Stop CyBro program and turn off all outputs Send current program to CyBro keep outputs and plc variables Pause CyBro program keep outputs active Add new network address to the current program Remove current NAD from the current program Select current network address for the active program Connect Disconnect communication port Activate program Show program properties 12 User interface e Edit window Tools Get PLC Info Kernel Maintenance Environment Options Get PLC Info Retrieve various PLC information Kernel Maintenance Upload a new kernel to CyBro Environment Options Change configuration options of CyPro environment Communication Monitor optional A bus monitor tool enabled by password Edit window Edit window is used to type and edit PLC program Each window represents a single function Instructions may be written in both available languages instruction list and structured text They cannot be mixed in the same window To change current language select Edit Properties main Description Untitled 5T function main void EKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK dh Application Stairs Requires CyBro 2 and operator panel Library CyPro examples pack Description Staircase light timer To run this application 1 Press Start button 2 When asked enter the network addre
9. 2 Runtime kernel Current kernel NAD 6512 File Version Build date Transfer date Size Magic EHE Hardware model IEX baud rate NAD alias IP address Subnet mask Gateway DNS server 2 6 4 3 4 2011 14 39 54 15 4 2011 14 35 42 46566 bytes 27182 OK 48C7h CyBro 2 100kbps Version Built date Transfer date Size Magic BHE Hardware model IEX baud rate NAD alias Use DHCP IP Address Subnet mast Gateway DNS server 2 6 4 3 4 2011 14 39 54 46566 bytes 27182 OK 48C7h CyBro 2 100kbps 192 168 0 25 255 255 255 0 192 168 0 1 192 168 0 1 Close After power on static IP address is available immediately Dynamic address needs 3 5 seconds to start in same network as last time or 30 35 seconds in a new network If DHCP server is not available CyBro will have no IP address 0 0 0 0 In such case Direct connection may be used to obtain connection CyBro has a standard RJ 45 UTP connector Baudrate is 10 100M autodetected 1 Orange White 2 Orange 3 Green White 4 Blue 5 Blue White Green 7 Brown White 8 Brown ONDD ON A YvvvvvvYv ma ONDD o 1 Orange White ow 8 wire patch cable DADAS YYVYYYYY DANNA 1 Green White en 00000 Pros range rown White rown mu 8 wire crossover cable Connection cable may be patch cable or crossover cable
10. Sa i Sockets i CBE Slot 1 DP bes E ST function main void tow m Mack m de Description ng Sockets 3 ST function main void Le de Description Right clicking any component opens it s context sensitive pop up menu Depending on type it is possible to Add Edit Delete or change Properties of the selected component For example to define a new mask right click on Masks and choose Add Bk EJ Hardware Configuration cc rmm m B ST fu Sp r Bue Edit de Cut Cla Topy Chic Mu Paste cuev Status bar Status bar shows various information about communication and connected CyBro Default status bar position is at the bottom of the main window Modified 192 168 1 4 6512 Stop Sr AAA EE project IP A bus PLC com port delay Tx Rx status address address status status indicators System message on the left show result of preceding operation Project status is displayed if the current project is not saved It reflects changes in source allocation mask socket data manager or monitor list IP address shows CyBro IP address A bus address shows CyBro A bus address Right click to select another or enter a new address cubreTech User interface e Menu PLC status shows Off line CyBro is not responding Run CyBro is on line and running Stop CyBro is on line stopped Outputs are inactive and program is not executing Pause CyBro is on line paused Outputs remain active but program is not execu
11. Standard Toolbar Show Program Toolbar Show Communication Toolbar 11 Project Mew Program Ctrl M Mew Program From PLC Remove Program Properties Activate New Program New Program From PLC Remove Program Properties Program Hardware Setup FS Allocation Editor F Mask Editor F7 Socket Editor Fa Identify Modules Shift F9 Data manager Shift F10 Syntax Check F2 Send Fo Online Monitor F10 Start PLC F11 Stop PLC F12 Send Without Init Ctra Fa Pause PLC Ctrl F12 Shift F11 Shift F12 Start Master Re SG Sne Bd Gd Zu zk S Stop Master Add NAD Remove Current MAD Select MAD CtrltL Connect Disconnect Chrl D Properties Shift Ctrl F11 Hardware Setup Allocation Editor Mask Editor Socket Editor Identify Modules Data Manager Syntax Check Send Online Monitor Start PLC Stop PLC Send Without Init Pause PLC Add NAD Remove Current NAD Select NAD Connect Disconnect Activate Properties cubreTech User interface e Menu Create New Program in the current project Load program from PLC into the current project Remove program from the current project Show properties of the current project Open Hardware Setup dialog box Open Allocation Editor dialog box Open Mask List editor Open Socket List editor identify IEX modules and individual inputs outputs Backup restore a set of plc variables to from PC Check the current source for errors
12. a value of a particular data type An expression may involve one or more constants variables operators or functions Using expressions CyBro can perform complex arithmetic computations involving nested parenthesis and or different data types Examples Y SOS 1 121 O10 8 D 7 COR c abire s gore E SW Q7 ean Ke Wane a qs ur CASS colma Sas o CouMmusis ll E volts amps ohms SSO CL Ol mess sue suse eel pue ine WOE SS esc SOS vella wedcss iweadues 0 ew aloe c 10 ame valle lt 60 5 Operators CyBro supports a number of arithmetic and logical operators listed in the following table operator alas unary binary ot word int long real resultiype TTT same 1 1 same same same same same same same O P O 2 m We P P e Operators are sorted by precedence Some operators have alias which may be used instead of standard mnemonic cybreTech ge Programming e Instruction list Expression evaluation Expressions are evaluated in a particular order depending on precedence of the operators and other sub expressions Parenthesized expressions have the highest precedence Operators of the highest precedence are evaluated first followed by lower precedence operators down to the lowest Operators of the same precedence are evaluated left to right Consider following example Speedl 50 0 Speed2 60 0 Press O Rate Speed1 10 Speed2 20 Press 24 9
13. coordinate is transmit buffer position The Y coordinate should be zero Maximum message length is 1024 bytes For example to write message Hello enter dorne 070 e eau SII ee Message length is 6 characters cubrerech i Serial ports e Free programmable mode opecial characters may be entered as a two character combination The first character being a backslash V and second being a one of the following ASCII code The last three character combination may be used to enter a hexadecimal code of any ASCII character For example 41 is equivalent to letter A For example to create the message Hello followed by carriage return and line feed enter Spurs 00 Ope rie tate E Message length is 8 characters To create message composed of keywords and numerical values use dorns 0 0 0 LEVE xxx sxx TEMPERATURE xx x BRROR xx NA dprnn 07707 6 2 waren Level donne 0 26 0747 2 Ware EE EE oca Op S75 Ur Zp MO sese eos Note that x es in the dprns instruction will be overwritten by the subsequent commands Function dprnc is used to enter single byte binary value For example to create 4 byte message containing letters ABC followed by ESC character ASCII code 27 enter cojas OP O On oer Clouse O LO E heel eT ed mc O To create 2 byte binary message containing an integer value most significant byte first enter Gomme EE Greve ex AO alte 20 Using dprns and dprnc any b
14. drag the component by the left vertical line over the edit area To dock it again drag window to main window border Standard toolbar 7 New Create a new empty project lar Open Open an existing project Ctrl O Kl Save Save current project Ctrl S Es Print Print current project Ctrl P Big Close Close current project de Cut Remove the selection and place it on the clipboard Ctrl X OP Copy the selection onto the clipboard Ctrl C EE Paste Insert the content of the clipboard at the cursor replacing any selection Ctrl V Undo Undo the most recent editing action Ctrl Z Program toolbar EE Hardware n Allocation mE asks Open the Hardware Setup dialog box F5 Open the Allocation Editor dialog box F6 Open the Mask List editor F7 41 Sockets Open the Socket List editor F8 cubreTech User interface e Communication toolbar Communication toolbar le Send Send the current project to the CyBro F9 Ea Monitor Open the on line Variable Monitor F10 P Start Start CyBro program F11 W Stop Stop CyBro program and turn off all outputs F12 Project tree Project tree displays all the project parts hierarchically Left click on lt will expand the tree and allow a more detailed view To collapse tree node click HI E E Project Stairs cyp E Project Stairs cp Z jf Program Untitled Ze Pr ogram Untitled i EN Hardware Configuration gt Er G enm ser pm Mack pe CPU Unit CyBro 2
15. functions port selection Sol Slee foce EP COMPE NE transmit EE tx stop igo Coma C s aba c ES receive ix Swe Osc Cd ciaoo SOL elm e lea bs aate Mes Lou S mic Eliano EE rx stop EES EE SEET id parse received message Tesco mer Cl OO Si fune took lone Hotels eua WINE JOOS aie aL OL EE bae c Pop sio Age Ano ou ee bie O WILLS OL OEC e I IND lors se NEST Mec EE EE DOS SOS TO CT Sie es Sar emp Sabine c 1K um NUDO eo na tere POS nenne sel ome tors tenere Ore OOS Mie akon abt I High speed counter functions start stop counting Decem ceci MSE SHE JO Mee erie leis read write counter value nse weal Lomo MSC ME Osa Ea hola c set reset high speed action cche eee Mes efes e Pacto nee MSC clases ee close enable disable counter reset on zero input ins Efe IZ nse om saldo Rer o Se cias Leo Edo detect and read position of zero input ser de tec ran ERR ase Sal eron Ong cybreTech o Appendix e Structured text summary Special functions read write current ip address gee ol e dE OO sue Wel eclclicess slong sumens long Serena one es seves y Tee E read current address equal to serial if no alias otherwise equal to alias ore level sola gt read unique serial number qeu serial 3 Lome cybreTech T Appendix e Character set Character set
16. id off a o po poo connection local connection connection connection ai 200 500ms 5000ms 500ms 5 10x connection SERIA 500 1000ms 20000ms 500 1000ms connection Transaction id is supported starting with kernel v2 6 4 and loader v2 6 Older kernel loader will result in no connection If you have loader v2 5 turn transaction id off send new kernel then turn transaction id on cubreTech Networking e Connection options 1 Direct connection 169 254 0 1 EI 9 9 us n w 169 254 0 1 65535 255 255 255 255 8442 laptop 255 255 255 255 65535 0 0 0 0 8442 Geen This connection is used when only two devices PC and CyBro are connected Communication is using a limited broadcast address 255 255 255 255 65535 PC needs a few minutes to set autoconfiguration address 169 254 x x in that period connection is not possible Direct connection may not work in a local network because limited broadcast is generally ignored by routers 2 Local area connection eg m LLL min LITT CyBro 2 CyBro 2 CyBro 2 desktop PC 192 168 0 100 192 168 0 101 192 168 0 102 192 168 0 31 192 168 0 3 1000 192 168 0 100 8442 192 168 0 3 1000 192 168 0 100 8442 This is a typical setup for a small home office network All devices belong to same subnet IP address may be dynamic using DHCP server or static CyPro will detect each IP address automatically using direct broadcast 192 16
17. is binary and stands for a zero blanking If zb is 1 leading zeroes are not printed closes esl oder ant o EE bae avr adeb ce ona Display print long value Prints long value to the specified coordinates Parameter w defines printing width For example if W is 6 valid print range is from 99999 to 999999 Parameter zb is binary and stands for a zero blanking If zb is 1 leading zeroes are not printed EE pue Wie dee auos ect nore on ect Display print real value Prints real value to the specified coordinates Parameter w defines printing width and parameter dec defines number of printed decimals For example if w is 6 and dec is 2 valid print range is from 99 99 to 999 99 Zero blanking is always on Each function parameter except string for dprns may be a constant a variable or an expression This may be used to create animated displays as in the following example deina Dr Apra EE dorns L cc 0 5 SE CyBro 2 may handle multiple operator panels cubreTech Operator panel e OP keys OP keys OP keys are accessible from PLC program as input variables OOO key_up key_e key p key dn key f Key P is usually used to invoke and exit mask so it s not available for PLC program reading is zero However if no entry point is defined it behaves the same as other keys In such case mask may be invoked by writing mask number to opOO next mask When mask is active keys up dn and E are also not avail
18. molins se eco C E99 0 High speed action High speed counting is usually used for a precise motion control The following example shows how to stop the motor connected to qx000 output when the counter reaches zero downward counting NP dee mee EU cia qx000 20 Ena Problem that might arise here is the unpredictable response time If current scan time is 5ms response time may be anywhere between Oms and 10ms For a speed of 1m s that induces inaccuracy of 10 millimeters To prevent this high speed counter has a hardware capable of performing a very fast action when counter reaches zero Action is defined as setting or resetting a single binary output To perform task as in the last example execute the following line ee sor Ce On 10 ER 000 The function hsc set action initiates action When counter reaches zero the output qx000 will be deactivated Also it is possible to set action in the opposite direction to activate the output See example Nee set cd eden 0 When counter reaches zero brakes will be activated cubreTech High speed counter e High speed action Action should be initiated only once so the typical code for activating action is Ik IO cu aS EES NSS were 90000 x Ee BESSE E TUE G00 02 lay EE Sil og Function hsc_reset_action is provided to cancel initiated action This is useful when something unexpected happens for example when alarm condition is detected ine eleven Corel EL N
19. program will be selected otherwise NAD is appended to current program Hardware autodetect Compile send only if different and run Start all programs in project Stop current program Send current program Silent operation do not show any window or dialog box Filename may be just a name or a full path If filename contain spaces quotas should be used my file cyp If an operation requires user input to continue execution default option will be used cybreTech Additional features e Command line options automatically For example when autodetect asks a network address default address zero will be used automatically When started with command line options CyPro creates log file CyPro log that contains all given commands and their results success or failure Log file is saved in CyPro directory c Program Files CyPro CyPro log If HIDDEN mode is used CyPro will automatically exit after last command is executed When using command line options it is advisable to turn on checkbox Allow multiple instances in Environment Options If only a single instance is allowed and CyPro is already running command line requests will be proceeded to the active copy Examples Cy protesto Start CyPro and open project myfile cyp cypro exe c My Documents myfile cyp Start CyPro and open project myfile cyp in specified directory As path may contain spaces quotas are required ep o e ld Ll DDEN OFEN my m
20. the output relay This can be done by itam cam seo NEW s Cuomo CAI Be il e Step five send and run To compile and transfer the program to the CyBro press Start button Status line indicator will show that the program is running IPLC program started Modified 004000 Run oper E cubreTech CyBro tutorial e Your first CyBro program To check operation start Variable Monitor add allocated variables and press F shortly x E x Bt fle Belem E Step six new frontiers Another task is to make timer adjustable A way to accomplish this is the mask system Start Mask Editor and press Add to create a new mask Enter caption and unit field texts Other fields may retain default values New Mask x Appearance variable Menu Branching Field position Name masko Escape mask exit e Y Width Im Caption m jo 5 I B Mi Edie fa Sho Ap a fe Sle Se 3 Caption field text Duration Unit field text s M unitfield owitch to Variable tab enter timO pt variable and adjust boundaries Note that timer resolution is 100ms so one decimal place is required to indicate seconds cubreTech i CyBro tutorial e Your first CyBro program Appearance variable Menu Branching Variable tima pt Browse Type long Lo limit 20 Hi lirnit 300 Decimal places 1 er Enter required Jump an first press Press OK Set entry point to mask01 and press OK aga
21. unknown switch and press for a second 3 Walk back and search the yellow LED To identify an unknown output 1 Click output LED and check outputs to activate cubreTech 7 User interface e Data manager Data manager Data manager is a tool used to transfer data between PLC and PC It allows user to store plc configuration or to export data to for statistic or graphic analysis Variables are organized by data sets Data set is user defined list of plc variables It contains variables and their respective values Data Manager LL IBEX e HS t A NS Ir A S Variablename Type Value Base DataSet0 blinds left blinds right light scene int 1 2 3 4 light scene default int 5 op led charset int B op led contrast int 127 7 temperature_setpoint int 0 8 ventilation int zi Read zi Write y Import gi Esport Close The following commands are available Read Read variables from plc to data manager Write Write variables from data manager to plc Import Import variables from csv file to data manager Export Export variables from data manager to csv file CyBro Data manager CSV file Import blinds left int Dec 50 blinds right int Dec 50 lcd selector int Dec 0 light scene int Dec 11 light scene default int Dec TO opo0 lcd charset int Dec opOO lcd contrast int Dec 127 Ex po rt SE int Dec 0 ventilation int Dec 5 Data Ma
22. 0 Program 2 M5 Status Sending kernel 58 PLE Status Le E Check all programs All programs in project and all NAD s for progam are listed It is optional to send program either without initialization only if allocation is not changed with a standard initialization retentive variables are preserved or with forced initialization all variables are initialized including retentives Option Check all programs will verify all programs by reading back and comparing to original cubreTech 17 Programming e Hardware Programming Hardware Expansion modules CyBro 2 can be expanded with various IEX 2 expansion units For the complete list of available modules please check the hardware manual EE e E Sen Set a Bag E fan cojy Control y er enu IEX 2 expansion units Each IEX module occupies one slot Slot is not a physical device it is a placeholder logical entity used to address an expansion TV 1T 1 11 I 1 P EL e e ll Le sn sn gt DS ko vn eee nl EL gt l le u gt gt slot 0 slot 1 slot 2 slot 3 slot 4 slot 5 slot 30 slot 31 Each slot has a slot number numbered from 0 to 31 Slot O is occupied with local CyBro 2 inputs and outputs Each IEX 2 module has unique 21 bit address there are no DIP switches Autodetect will sort modules according to type and address in ascending order Variable prefixes are assigned in the same order cubreTech n Programming e
23. 5 seconds opOO key f cybro_qx00 OS A key for activating the timer can be any binary input but it is simpler to use one of the display keys The output is the first binary output cybro_qx00 TT E 7 e OO timer 5s x opOO key f cybro_qx00 Step two define hardware Connect CyBro and PC to local network Start CyPro and select File New Project to start a new project Open Hardware Setup and start Autodetect Select your CyBro from the list and press OK Autodetect will list connected IEX 2 modules In our example it will be CyBro and OP 2 BER pg Autodetect A Clear Y Clear All Y MoveUp 4 Move Down E Properties To accept autodetected hardware press OK Step three allocate variables Our simple project needs one variable of timer type cybreTech 8r CyBro tutorial e Your first CyBro program Start Allocation Editor and press Insert to Insert New Variable Dialog box will appear Insert New variable E EX Name tima Type timer Retentive MT Array lo o al Permanent 7 Array hi o Default value Comment hate writing comments Additional properties Prese day hour min zer Me o c o uio oe Type Base v Pulse Cime f ms On delay iine Cancel Enter name choose type adjust preset value choose pulse type select 100ms base and press OK Step four write code PLC code should connect the timer input to the key and the timer output to
24. 8 0 255 as first message 3 Wide area connection using static IP or DynDNS AL JIN Le i Se e e desktop PC router a router b CyBro 2 em 192 168 0 3 192 168 0 1 1 0 0 1 mydomain 192 168 1 1 192 168 1 2 192 168 0 3 1000 mydomain 8442 1 0 0 1 2000 mydomain B442 1 0 0 1 3000 192 168 1 2 8442 192 168 0 3 1000 mydomain 8442 1 0 0 1 2000 mydomain 8442 1 0 0 1 3000 192 168 1 2 8442 This connection provides programming and monitoring over the Internet 1 CyPro Set Ethernet connection to wide area network enter router b WAN address 85 10 5 58 or domain name into Address field If needed use Extra timeout Extra retries and Transaction id options cybreTech i Networking e Connection options 2 Router a No special settings needed 3 Router b Forward UDP port 8442 to CyBro CyBro 2 e Game or Application Name New Name CyBro 2 Apply e Game or Application Definition A game or application is made of one or more TCP UDP port ranges Each incoming port range can be translated into a different internal local network port range Port ranges can be statically assigned to devices or dynamically assigned using an outgoing trigger Trigger Protocol Port Range Translate To Protocol Trigger Port No port maps defined for this game or application SE oz Ga Game amp Application Sharing This page summarizes the games and applications define
25. Cable type is detected automatically CyBro has 6 byte MAC address in form 00 CB 00 xx xx xx where last three bytes are serial number NAD For example CyBro 6512 001970h has MAC address 00 CB 00 00 19 70 cybreTech 55 Networking e Connection options Connection options e Direct connection e Local area network e Wide area network specific individual address for each controller stored with project e Wide area network common one common address for all controllers stored in registry Environment Options General Communication Editor Colors Printing Connection Ethernet O Serial Ethernet Adapter Realtek RTL8168 8111 PCI E Gigabit Ethernet NIC Packet Scl ze Direct connection Local area network O Wide area network specific 6 Wide area network common WAN IP address or domain port www solar cybro com Copy session ID Serial Extra timeout for slow connection J 1000 ms Extra retries for unreliable connection 9 5x Use transaction id ignored if amp bus protection is active Synchronize program with PLC Synchronize RTC to PC clock m When computer has two or more network adapters the right one should be selected manually Transaction id adds an unique id to each request answer message pair avoiding trouble with delayed messages It can t be used when A bus protection password is active Recommended settings typical rountrip transaction
26. Clearing bits ee read req and ee write req during reading or writing may lead to unexpected results and should be avoided cubreTech Programming e Variables All EE variables are automatically read on power up Variables may be used when reading is finished after the ee read req goes to zero Important or sensitive variables may also be stored in EE EE memory is much more safe against accidental damage caused by electromagnetic spikes If RAM content is damaged all chances are that EEPROM is preserved Total number of EE variables is limited by physical memory size and it is specified by hardware manual To check memory usage open PLC Info dialog box tab PLC Program Total EE size EEPROM data retention time is 100 years Endurance is about 1 million write cycles I O variables I O variables are used to access physical inputs and outputs Hardware setup automatically allocates I O variables Although it is possible to change i o names it s advisable to use default names When hardware setup is changed renamed variable may not be placed correctly CyBro 2 uses four address spaces for I O access two binary and two analog input bit output bit output word Binary inputs and outputs are allocated respectively starting from the ixO as the first physical input and qx0 as the first physical output Remaining space is reserved for expansion cards binary inputs binary outputs IX2047 QX2047 IX2016 slot 31 QX2016 slot 31
27. CyPro User Manual applies to CyPro v2 6 4 and later cUbrerecn 1998 2011 Cybrotech Ltd Cybrotech Ltd 14 Brinell Way Harfreys Industrial Estate Great Yarmouth Norfolk Nr31 OLU UK tel 44 0 1157 149 991 www cybrotech co uk info cybrotech co uk cubrerech Index e System overview Index Je EEN 1 INCOOUGHO RR RTT 4 Iz nois RI s Penn ee ee P 4 Hardware requirements iii 5 USE e o O o OU ES OI A 5 o BE 6 Sic ies A oe Ue O II UU 6 LES a lE E S g E E E EEEE T BEEE E ERN 8 VEE AR toes o te redex RO oi E pa 8 Siglo RIS o os RTT TN T EE iaia 8 miles gie o e 8 COmmunicaldon TODD turas tect e e cerati ada rei ivi doblada olaaa 9 FO SS 9 e PP o SURE IS E 9 o PP o Ro mE O OOO EE a 10 PIO see easels hrc em 10 el RN 11 me UENIRE 11 i 11 wise 12 Beieleit WE 12 0 MrR x 13 Selen ele PNE 13 A OM TNR 14 Join diee 15 BEIGE Sy cerca sede nn TETTE UIT 16 MUSO Le BEE 17 gireje AUN PPP e A E A EE 18 E TERRE 18 Expansion MOLES m 18 ao APP 19 nn o PE OOO A IS TE 19 NOMINGCORVERIO E Um 19 PANO ALON RN RETRO 19 A ooo e UP OO o II A 21 A e Pe PO SU O Raise IMMINENT INN INNEREN I EIE 22 os e o PESO NT dase deemed 23 Internal variab
28. EEN INS Cason cO hsc stop qx000 20 qx001 20 eg Action is performed only once when counter reaches zero for the first time When counter reaches zero again no action will be performed To check if the action is still pending use function hsc check action If action is initiated hsc check action returns true After the action is performed or canceled hsc check action returns false It is not possible to initiate more then one action simultaneously An attempt to do so will cause incorrect operation If multiple actions are needed next action may be initiated after the first action is performed In applications that need multi speed control gear change may also be performed by if then instructions rather than actions Usually this allows enough precision to slow down with a single high speed action used to stop accurately Next example shows a typical two speed application Two speed motor is activated by two binary outputs qx000 and qx001 Low speed is activated by qx000 and high speed is activated by qx001 The example requires motion of 6000 units For the first 5000 units motor will run fast then for the next 1000 units it will run slowly and then it will stop Slowing down will allow accurate stop position 6000 1000 0 fast slow stop cubreTech E High speed counter e High speed action Program consists of three main states stop fast and slow Transitions between states are defined by sta
29. MyDocuments directory To upgrade CyPro install new release into the same directory without uninstalling previous version User settings will be preserved Once CyPro is upgraded it is required to also upgrade the CyBro system software kernel To do this start Tools Kernel Maintenance load and send kernel bin CyPro and kernel version should always match CyPro release always comes with kernel file To uninstall CyPro start Control Panel Add Remove Programs select CyPro and press Add Remove button cubreTech Introduction e Communication Communication CyBro 2 has two serial RS 232 and one Ethernet port All ports are independent and may operate at the same time To establish communication between CyPro and CyBro the following steps should be made connect CyBro open new project adjust communication settings serial or Ethernet open Hardware setup F5 start Autodetect Alt A If communication is not established check the cable indicator icon on the status bar IS Communication port is not available The reason may be a wrong port number or the port may already be used by another application E Communication port is open but the cable is not detected The reason may be a wrong port number or communication cable Connect cable to another DB 9 connector or use another cable X Cable is properly detected If communication is still not working check network address and connection If more than one CyBr
30. This construction takes the general form while expression do statements eme The statements within while do loop should not contain fp or fn instructions Example EE He EE eet tion Ence While do loop is rarely used in a typical PLC program cybreTech Operator panel e General Operator panel General Operator panel is the optional external device connected to the CyBro 2 via the IEX 2 bus OP provides LCD display and a few keys readable from the PLC program For a proper operation OP has to be defined in the Hardware Setup dialog box Hardware setup is saved together with project FEET Hi Autodetect XX Clear Wy clear All t MoveUp Move Down E Properties Description zn CPU Unit CyBro 2 CyBro 2 10 binary inputs 8 binary outputs 004000 VW Col controler n Operator panel LED 2x16 5 keps 0 To program operator panel the following tools are available Print functions Structured text functions typed in the PLC program Used to display strings and values OP keys Bit variables readable from PLC program Represents operator panel keys Masks Visual tool for programming operator panel used to enter parameters Capable of entering integer values decimal values and values represented by strings Parameters may be hierarchically organized Print functions Print functions are structured text functions used to display text messages and values First parameter is slot number where display a
31. Variables Hardware setup The first step is setting up hardware configuration To perform automatic hardware detection press Autodetect button If autodetect is not responding enter CyBro network address and try again 32 Hardware Setup Aa E f Autodetect X Clear IB Clear All Y Movelip 4 Move Down E Properties Name Description NAD Variable Prefix it CyBro 2 CyBro 2 10 binary inputs 8 binary outputs 004547 OP 4 Operator panel LCD 2420 encoder IR rece 000255 op HR Hotel room controller 001743 hr00 AM 12 12 channel analog input 0 10 000036 aal After autodetection Hardware Setup will display list of connected modules Press OK to accept the configuration and create auto allocated i o variables Variables Naming convention Variable name can be any string containing letters digits and underlines provided that the first character is not a digit Maximum length is 32 characters Names are not case sensitive so Valve and valve are the same variable National characters like 5 d d Z are not supported Examples of valid names cnt track5a caret position valve open req MaximumWaterLevel Variable name should not match any IEC 1131 3 keyword Allocation According to IEC 1131 3 memory cannot be accessed by address Each variable should have unique name and a strictly defined type Same is valid for inputs and outputs cybreTech T Programming e Variables Vari
32. able reading is zero Key F is always available Keys don t have autorepeat Key variable is true as long as the key is pressed After the key is released it becomes false Any two or more keys may be pressed simultaneously This may be used to initiate a special function In the following example pressing up and dn simultaneously resets product count nep cere M e Mq produjese 0 SO MES Key variables are allocated automatically when OP is defined in Hardware Setup cubreTech 37 Operator panel e Masks Masks Mask system is easy to use visual tool for programming operator terminal Mask is a container for a variable that will be edited Masks are transferred to the CyBro together with PLC code User creates a new mask or edits the existing one by using Mask Editor Created masks are listed in the Mask List Masks are integral part of the PLC project they are saved on the disc and transferred to the CyBro PLC project Mask Editor Mask E dites Aspamarce Viiatio Mors Banchina pes 3 mier 3E 3F Lin kd ot mower db EC Mask List 7 7 84 Doke Ges EG Monto Monto Lm we gH fon tae AF Lane tidie CUTE ee rA Next mask Next mask exit By the use of branching features masks may be hierarchically organized Entry point P Branching exit L E Nu cyoretech i Operator panel e Masks To start worki
33. ables are allocated using Global Allocation Edit Global Allocation Edit ES New Variable TT Rename X Delete d Cut Copy MM Paste Groups Variables User Variables 1 0 Variables light st int retentive SI Constants light_scene_old i retentive light_scene_default i retentive temperature_setpoint i retentive blinds_left i retentive blinds_right i retentive ventilation i retentive main_selector lcd selector encoder position old Biel EZ T MoveUp 4 Move Down Properties Add group Rename group Delete group To insert a new variable choose group where a new variable will be stored and select New Variable Insert New Variable form will appear Yariable Properties light_scene ES Name light_scene Type integer IV Retentive Array n Copy to EE From o fo o Default value Description selected light scene Additional properties 1 0 Variable Ge Input C Output Address Variable name should be entered If name is incorrect button OK will not be available Summary of data types type size range bytes int 32768 32767 long 4 2147483648 2147483647 1e38 1e38 OA Bit int long and real are basic data types Bit is a single boolean variable with only two possible values zero or one It should be used for flags logical equations logical states and similar In bit and out bit are both bit type The result of the comparison instructions is also a bit type val
34. ay also save few bytes Only one mask can be activated at the time Handling masks from plc program CyBro program can get currently active mask number by reading variable current_mask When current_mask is zero no mask is active Program may force execution of a certain mask by writing to variable next_mask After the mask is sent next mask will be set to 1 and current mask will change accordingly cubreTech li Operator panel e Handling masks from plc program The following example shows a typical mask transition mask03 mask04 a 4L operator panel CyBro sends sends a request Ede SMS End mask04 to for a new mask ESSE ssec operator panel 1 2 3 4 v v v v mask03 variable 20 20 25 25 25 current mask 3 3 3 0 gt 4 next_mask 1 1 1 gt 4 1 2 3 MS 2 3 MS 50 100ms Events are marked by black arrows 1 User pressed Enter 2 New value sent to CyBro 3 Request for new mask sent to CyBro 4 New mask sent to operator panel and activated Red arrows mark most important value changes The same transition may be initiated by the following plc program ger lt condition gt chen POORNE mask 047 Ee Short gap in current mask value comes from the finite network response time To check weather no mask is active program should also check the value of next mask The following example will properly set the panel begining mask
35. can Program cycle consists of system processing and PLC user program system read write tasks inputs PLC program outputs max 50ms scan time If execution time of PLC program exceeds 50ms CyBro enters the scan overrun error state and stops program execution Error code is displayed on the status bar In final version of PLC program checking for a scan overrun error is usually disabled To do this uncheck checkbox Scan overrun stops program located at Program Properties dialog box tab Error checkin Scan overrun stops program In that case program longer than 50ms will be interrupted and started from the beginning System variable scan overrun will be set but program continues operation without error cubreTech g Programming e Instruction list Instruction list Instruction list is a low level language with structure similar to assembly language Each line of instruction list code consists of four parts label instruction operand and comment cue Eeer ld use Sn e oS Ee encore as label instruction operand comment Computation model of instruction list program consists of allocated variables and accumulator All arithmetic and logic operations are performed on the accumulator variables NU N accumulator operations Unlike classical assembly language accumulator may contain value of any type Type is determined by the operand If operand type is not unique type is determined
36. cuted within the if then using the elsif construction which has the general form if boolean expression then statements elsif boolean expression then statements else statements ne Any number of additional elsif sections can be added to the if then construction if a b then a 1 elsif a b 2 then d 2 elsif a b 3 then d 4 else d 3 Siae AER case of The case statement may provide a readable alternative to deeply nested if conditionals It consists of an selector expression and a list of statement blocks each preceded by one possible expression value Value of selector expression must be ordinal boolean integer or longint and may be the result of another complex expression The set of statements that have a constant value that matches the value of the expression are executed If no match is found the statements preceded by else will be executed The case construction has the following form case lt expression gt of lt Volluel gt lt steatemenes gt gt lt value2 gt lt statements gt lt value3 gt statements else lt statements gt end Case cybreTech 2 Programming e Instruction list Example Gase mecenati Ic OM 1 speed 5 2 Speed 20 3 Speed 25 fan 0N 4 speed 30 fan 0N 5 speed 50 fan 0N water ON else speed 0 end ase Case elle lou oe TRUE speed 0 ib euro SUSO SME EE Bir endi ease Iteration statements
37. d on your SpeedTouch Each game or application can be assigned to a device on your local network e Universal Plug and Play Universal Plug and Play UPnP is a technology that enables seamless operation of a wide range of games and messaging applications Use UPnP Yes Use Extended Security No e Assigned Games amp Applications The table below shows the games and applications that are allowed to be initiated from the Internet You need to configure such games or applications if you like to act as a game server or share a server located on your local network with other people If you are simply a player or simply accessing the Internet you don t need to configure games or applications Game or Application Device Log CyBro 2 CyBro 2 6511 Off uTorrent athlon64 Off Web Server HTTP athlon64 Off If more than one CyBro is in the local network one solution may be to assign port 8442 to broadcast address e g 192 168 0 255 but some routers will not support this 4 CyBro No special settings needed Either DHCP or static IP may be used In a small home office network connected using ADSL fixed IP address may not be available so dynamic DNS service may be used 5 DNS service Register to a dynamic DNS service such as www dyndns com Choose a domain Some domains e g xxx getmyip com are available free of charge 6 DNS client Configure a dynamic DNS client on a router b Dynamic DNS Service Dynamic DNS can be used
38. d type CONVErsions iii 14 Allowed type combinations ne 14 Structured text SUMIMALY siiascdinccncaaiescwansnancnusinevaasnaduauveuenseensusthduulss lada 75 8 te 75 FeO COMA UO nei ent 15 Edge detect Tu ee NEEN 76 CAStIUNGCIONS RR 76 Display MIC o ET iii TTD 76 el EE Lee EE TI High speed counter functions iii TI SPECIAlTUACIO EEN 78 E Te EE 79 o EE 80 Bo ia o LO m Um 80 Text editor cybreTech i Introduction e System overview Introduction System overview CyPro is a software package for programming CyBro 2 controllers It runs under Microsoft Windows 2000 XP Vista Win7 and also under Linux Wine emulator CyPro is fully featured IDE integrated development environment containing editor compiler and on line monitor CyBro 2 is the generic name for a group of controllers based on the same technology All controllers are compatible although some features may be different Each CyBro 2 is labeled with unique 6 digit serial number also used as communication network address NAD SN SS Soa ua 3 um UD CyBro 2 has four independent communication ports COM1 A bus Modbus RTU or freely programmable serial port COM2 A bus Modbus RTU or freely programmable serial port ETH A bus and Modbus TCP IEX 2 IEX 2 CAN and A bus CyPro is based on IEC 1131 3 and implements instruction list and structured text programming extended with several visual tools
39. e expression of lt Voaluel gt lt steatementes gt lt value2 gt lt statements gt lt valuen gt lt statements gt else lt statements gt end Case for do for lt var gt lt expression gt to expression do Se esee e end for while do while lt expression gt do statements arnie wat be cubreTech Edge detect functions positive edge detect ie gio Sale amp negative edge detect fein asl loas Cast functions a e qoes sold Int word expression word long expres son long real Expression real Display functions clear display acia Sou ES print ASCII character Set a kots JD LEE SANUS print string Gipiems slo Ei oie sone print binary value Cle icigilo Gs kore e abigo ee EE print integer value EES print long value lee EE slo amie er print real value ejerce soe a METER slot slot number qr x position O left Vera y position 0 top width print width SITES Sn pu GEET SO Me SERE Appendix e Structured text summary e char SEL oL qe CE echec du chic ec e od s idea Evo lan via MET me wirdth int Zero lank DIL wre ues dE OUS E Ee EE Cecsint Values real zeroblank suppress leading zero 0 no 1 yes dec decimal places single character j eee array of characters value value to print cubreTech 76 Appendix e Structured text summary Com2
40. e AB x4 two phase quad precision glitch removal counting AB Z x4 two phase quad precision glitch removal counting zero input active To set counting mode open Kernel Maintenance dialog load kernel bin choose desired mode and send the kernel to CyBro One phase counting Counting in a single direction Only a single phase input A is used oL LI LI tL 1 2 3 4 Counter is incremented at the rising edge Counting direction may be determined by the state of the B input If B 0 counter counts forward and if B 1 it counts backward cubreTech i High speed counter e General Two phase counting single precision Counting both up and down Two phase inputs A and B are used Counter is advanced or retarded at rising edge of A input Counting resolution is equal to encoder resolution each encoder pulse increments or decrements counter by 1 Shaft vibration or electromagnetic noise may result in false counting Two phase counting quad precision Counting both up and down Two phase inputs A and B are used Counter is incremented or decremented at each edge of A and B inputs Counting resolution is four times the encoder resolution so each encoder pulse increments or decrements counter by four 500 pulses per rotation encoder will actually increment counter by 2000 HU Lt x 1234567 0123456x X no change Quad precision mode also yields glitch removal and 1 pulse removal eliminating improper coun
41. e value of a bit variable press Space key cubreTech User interface e Identify Modules Identify Modules Identify Modules is a tool used to identify IEX modules and individual inputs outputs Because of change reset operation tool may be used by a single person ll identify Modules OF x gt Reset CPU CyBro 2 CyBro 2 10 binary inputs 8 binary outputs 6512 999 9999 99 2299 2999 ES 1 OP 4 Operator panel LCD 2x20 encoder IR r 158 opt Y 999 999 9 ES 2 FC Fan coil controller 1936 fco Y Y 090909 9 ES 3 LC D Light controller DSI DALI 3733 icd Y oo ES 4 HR Hotel room controller 1782 hoo Y 9999 2999 29099 009832 2909009 ES 5 02 Two relay outputs with mains sense inputs 156 0200 Y deo ES 6 02 Two relay outputs with mains sense inputs 152 0201 e eo i ES 7 ES 8 ES 3 ES 10 ES 11 gel 12 zl cybro_ix01 Each LED represents a single digital input or output When mouse is positioned over LED signal name is shown in the bottom left corner Input output LED colors are defined according to the following table 89g 0 n a 1 o ono 9 0 ys A 1 yes General error GE condition is defined as modulis operating properly 1d error module is not operative In case of general error use on line monitor to find the problem cause module timeout error bus error or program error To identify an unknown input 1 Reset Identify Modules 2 Walk to
42. each inactive to active transition on the zero input will reset counter to zero To disable zero reset use function hsc disable zero To check if the zero reset is enabled use function hsc check zero If the reset is enabled hsc check zero will return true otherwise it will return false Once activated zero reset is active until explicitly deactivated by the hsc disable zero function If zero reset is enabled and action is activated action will be performed immediately after the transition is detected Zero detect The second way of utilizing zero input is provided by the two additional functions hsc detect zero and hsc read zero Function hsc detect zero indicates transition on the zero input When inactive to active transition on zero input is detected hsc detect zero will return true Next consecutive calls will return false until the next zero transition is detected again That allows simple transition counting ASE EE When transition is detected value of the high speed counter is also written to the zero detect register readable by the function hsc read zero Zero detect register is also 32 bits long Zero detect functions may be used only in A AB Z x1 and AB Z x4 modes cubreTech Real time clock e General Real time clock General Real time clock RTC is a hardware clock calendar device It runs even when the power supply is down For technical specifications about accuracy and data retent
43. ecifies the last character of a received message After endch is received reception is stopped To receive a message without specifying the last character put a zero instead of endch Parameter len specifies the length of a received message After the required number of bytes the reception is stopped To receive a message of undefined length set len to zero Parameter msg tout specifies message timeout in milliseconds This is the time after which the receiver will quit if no characters are received Maximum timeout is 32 seconds To receive without limiting message time set msg tout to zero Parameter char tout specifies the receiving timeout between individual characters If characters sent by accompanying device are sent continuosly without gaps character timeout may be set to a pretty low value in order to improve the receiver response time Character timeout should always be greater than the time needed to transmit a single character concerning selected baud rate and data bits Example Communication parameters are 1200 bps 8 bits and no parity Transmission of one character will be approximately 8ms start bit 8 data bits stop bit 10bits 10bits 1200bps 8 3ms Character timeout should be at least 10ms although cca 50ms is more safe if response time is not critical To receive without timeout set char tout to zero Message and char timeouts are independent It is possible to use character timeout and leave message timeout d
44. er up or dn key is pressed If enter required is true changed value will be sent to CyBro only when E key is pressed To indicate that change is not confirmed changed value will flash cubreTech Operator panel e Handling masks from plc program Variable may be entered as menu rather than as numerical value To define menu entries run Mask Editor click Menu tab and Add as many items as needed Appearance Variable Menu Branchina hg Enable menu Move Doan When executing CyBro program the display will show items by name and variable product_type will take value O 1 or 2 Branching tab provides branching onto different masks according to the entered value This can be used to organize parameters into various parameter sets but also for a password protected parameters Appearance Variable Menu Branching Delete Active mask takes control of all panel keys except the F key so it is not possible to use them from CyBro program at the same time Mask fields are displayed over the user display After exiting mask display content is restored If mask is too large to fit into operator panel it will not be activated and it will operate like an empty mask Mask size is displayed in Mask List dialog box Available operator panel mask memory is displayed in the Hardware Setup dialog box To decrease mask size reduce number of menu entries or reduce edit field width Reducing caption and unit field width m
45. ext sensitive Move item up Move item down Next window Previous window Close window Exit program Insert variable or function Undo Redo Cut Copy Paste Select all Find Find next Replace Go to line Indent block Unindent block Comment uncomment selection 80
46. ey pressed req 1 if req 1 then turn lights off 3 p num gt if req 1 then EIER turn lights off Socket on request Each CyBro may have the similar program although local i o assignment may not be the same Program structure is simple because request handling is fully automatic once activated network take care first to spread the request and then to reset it Synchronized value On change output socket may be used to synchronize a value common for multiple controllers Each controller may modify the value and each one will receive the last modified value Number of controllers is not limited cubreTech i Networking e MODBUS connection The example shows a common lightness setting 0 100926 in a large hall D SN EE it 3 CS e d TFAL i a 9 yi nt un out if key pressed light levelt output light level 80 um 091 output light level Socket on change Each CyBro has the same program although local i o assignment may be different Because of automatic synchronization program structure is very simple MODBUS connection Modbus is a serial communication protocol published by Modicon in 1979 for use with programmable logic controllers PLCs It has become a de facto standard communication protocol in industry and is now the most commonly available means of connecting industrial electronic devices Modbus allows for communication between many devices c
47. from subsequent instructions Type tracking panel shows type for each line Once the accumulator is loaded type cannot be changed until the result of the operation is stored Exceptions are the comparison instructions and instructions for changing type Single operand instructions generally use accumulator as operand In some cases it is possible to execute the instruction directly on the variable The accumulator is always the first operand in the instructions with two operands Second operand may be constant or variable The result of the operation is also stored in accumulator Typical arithmetical or logical sequence should load value into accumulator step 1 perform operation step 2 and store result step 3 step 1 M Id step 2 accumulator step 3 d st Each instruction is written in a separate line For a list of available functions check appendix cubreTech 2 Programming e Instruction list Structured text Structured text is a high level language with syntax somewhat similar to Pascal but specifically developed for industrial control applications Assignment statements Assignment statements are used to store value in variable An assignment statement has the following general format vertablle expression The assigned value should be equal or lower data type than the variable Expressions Expressions are used to calculate values derived from other variables and constants Expression always produces
48. ies Alt Enter Undo Redo Cut Copy Paste Delete Select All Find Find Next Find Previous Replace Go to Line Number Properties Format Indent Block Shift Ctrl I Unindent Block Shift Ctrl U Comment Lincomment Code Shift Ctrl C User interface e Menu Cancel last action Cancel last Undo operation Delete the selection and put it on the clipboard Copy the selection onto the clipboard Insert text from the clipboard to the insertion point Delete the selection Select a whole document Find the specified text Find the next occurrence of the specified text Find the previous occurrence of the specified text Find the specified text and replace it Move insertion point to the specific line in the text Show properties of the selected project module Insert Identifier Ctrl Space Indent Block Unindent Block Comment Uncomm Code Insert Identifier View Project Tree Chrl Alt T Local Allocation Editor Ctri Alt 4 Editor Tabs Compiler Messages Ckriz Alt4 C Standard Toolbar Program Toolbar Communication Toolbar Project Tree Local Allocation Editor Editor Tabs Compiler Messages Standard Toolbar Program Toolbar Communication Toolbar cubreTech Indent block of code text Unindent block of code text Comment Uncomment selected part of code Open the list of identifiers to insert in the code Show Project Tree Show Local Allocation Editor Show Editor Tabs Show Compiler Messages Show
49. igh and 5ms low 100ms system clock 50ms high and 50ms low One second system clock 500ms high and 500ms low Ten second system clock 5s high and 5s low One minute system clock 30s high and 30s low Indicates that retentive memory is no longer valid because the power supply was down for a too long period If active all CyBro binary outputs will immediately go off If active all CyBro binary inputs are disconnected retaining the last value If active local 5ms input filter is turned off Set to read current time date from RTC Will automatically reset when finished Set to write current time date to RTC Will automatically reset when finished Set to read all permanent variables from EEPROM It is automatically set during power up Will automatically reset when finished Set to write all permanent variables to EEPROM Will automatically reset when finished Used as EEPROM write protection Set to 31415 to enable writing Will automatically reset when writing is finished Execution time of last scan in milliseconds Maximal scan execution time encountered Number of scan cycles per second Zero if program stopped 24 Programming e Variables ric sec rtc min rtc hour rtc weekday rtc date rtc month rtc year Real time clock data Timers Timers are special structured variable types used to determine time interval To define a new timer variable open Insert New Variable dialog box choose timer ty
50. in Mask List B xj Add Duplicate 2X Delete Ea Edi 2 Move Up Move Down Entry point mask0i Timeout enabled Timeout fO a Variable Coordinates Menu Next Branches Ul maskl Press Start button The program is automatically compiled transferred and started To adjust timer value press the P key adjust with up and dn and exit with P again d b EYINI x To activate timer press the F key cybreTech 7 Appendix Data types summary Elementary word 16 32768 32767 long 32 2147483648 2147483647 3 4x107 3 4x107 Input Output in bit bit binary input Gute a bi binary output Timer in bt input input pt long input jpresettime 2 p long oi felapsedtme bit output output cybreTech Appendix e Data types summary 71 Internal variables Appendix e Data types summary int irst scan scan overrun retentive fail cybro outputs off isconnect inputs no input filter ric read req rtc write req scan frequency ric sec ric min rtc hour ric weekday rtc date rtc month rtc year nlnlololo o ololololo IO OD OD VO ololololo SII o lolololo gt 2 Le Le Lg AAA I BECHER III I iz leie mee sech Jwh Jwh ala fe 2 21 S S jig o gt S a f Lore n o O x O cubreTech bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit int int int in
51. inary message may be created Transmit To send prepared message use function tx start WE Parameter char_num is the number of characters to transmit Transmission always starts from beginning of the buffer eee Function tx_active returns current transmission state When transmission is finished tx_active falls to zero cubreTech 44 Serial ports e Free programmable mode EEC OUNEN sane c Function tx count returns the number of characters left If tx_count is zero and tx active is still true that means last character is currently transmitted tx SECO E To stop transmitting immediately use function tx stop Current character will be finished but rest of a message will not be transmitted Receive Receiver and transmitter are fully independent Maximum length of a received message is 1024 bytes If more than 1024 characters are received receiving position rolls over to the beginning of the receive buffer In that case the number of received characters is set to zero To start receiving use function rx start This function also defines criteria to stop receiving ix Seen Wie Cig alce Eme Cl eleven dona MES vg tane Chat e ONES come Parameter begch specifies the first character of received message After the receiving is initiated any other character will be rejected until begch is received To receive a message without specifying the first character put a zero instead of begch Parameter endch sp
52. ion time please check the hardware manual RTC may be synchronized to PC clock each time program is transferred to the PLC To enable or disable this option clear check box Tools Environment Options Communication Synchronize RTC to PC Clock RTC can also be adjusted from the PLC program with RTC I O variables I O variables To read or set time of the RTC use O DU EE IUS MIO CUTE E PG SSC 2 LIME Value ranges for that variables are To read or set date of the RTC use TOES WEG B oHm E US IMO Oe Me ab iO CENCE EE Values are in the range 2000 2099 To read or set day of the week of the RTC use penes da 0 Sunday 1 Monday 2 Tuesday 3 Wednesday 4 Thursday o Friday 6 Saturday To set real time clock write new time date to I O variables and set write request flag mue Wises EE E An example that displays date time on the operator panel and allows user to adjust them is RtcClock cyp The program is located in the Project Examples directory cubreTech n Networking e Ethernet connection Networking Ethernet connection CyBro may have a dynamic IP address obtained from DHCP server or static IP address set with Kernel Maintenance To define static address turn off checkbox Use DHCP and enter IP address Subnet mask Gateway and DNS server DNS server is needed when push to domain name is used push to IP address needs no DNS Kernel Maintenance New kernel N ProjektiSv CP
53. isabled The opposite is probably of little use A few examples will illustrate usage of the rx start function Receive continuously ox Ss cee CO reus Dres UE cubrerech i Serial ports e Free programmable mode Receive message beginning with gt and ending with CR character EE EE Receive message of exactly 12 characters DIDI EE Infinitely wait for a first character but stop receiving 250ms after message is received Ox Steere 00000250 Stop receiving 100ms after the last received character or if no character is received in 5 seconds Ox Bice OO 0 OOO MOC ys Any combination of start and stop criteria is allowed To receive message up to 80 characters ending with Ctrl Z 1A hex with 10 seconds timeout A CO Tbe ENEE REH If given stop criteria for is not appropriate determining the end of message may be done using PLC program Received message should be analyzed on the fly and when stop condition is satisfied function rx_stop may be used to stop receiving Sie OOO Function rx_count returns the number of received characters The function may be used whether the receiving is active or not Function rx_start resets this number to zero tor xot buen emet en To check if the receiving is active use function w e e To check detailed receiving status use function TX Scavi gabe y Function rx_status returns one of the following codes 0 receive active 1 rx stop executed 2 end charac
54. ivkes eyo Snap ETT Start CyPro open an existing project myfile cyp start PLC compile send amp run and exit Operation is hidden no window or dialog box will appear Possible errors are saved in CyPro log cypro exe HIDDEN NEW AUTODETECT SAVEAS myfile cyp EXIT Start CyPro open a new project start Autodetect save as myfile cyp and exit Operation is hidden no window or dialog box will appear Possible errors are saved in CyPro log cypro exe HIDDEN NEW NAD 4000 AUTODETECT SAVEAS myfile cyp EXIT Start CyPro open a new project add new NAD start Autodetect to detect connected IEX 2 modules save as myfile cyp and exit Operation is invisible no window or dialog box appears Possible errors are saved in CyPro log cypro exe HIDDEN OPEN myfile cyp AUTODETECT START EXIT Start CyPro open an existing project myfile cyp start Autodetect assuming the project has no defined hardware setup and network address like CyPro examples start PLC compile send amp run and exit Original file will remain unchanged Operation is invisible no window or dialog box will appear Possible errors are saved in CyPro log cybreTech ti CyBro tutorial e Your first CyBro program CyBro tutorial Your first CyBro program Step one define problem In the first example we will take a very simple task a timer activated by a key press By pressing a key timer will turn the output on for a predefined time period about
55. les TRETEN 24 Ain KE 25 SEITEN le TTE RE 25 RGIS AY WIN EE 26 Gro NUT 26 VS eai A 26 FG FEST OC SS po D 27 o COI 27 is e o SUSO GOGO II ET 28 P e eects SOI A 29 Assignment statements iii 29 EXDIESSIONS MN RO eee E eee 29 Ss e e O uo o A 29 Expression evaluation E 30 BECK ee Ee E 30 Multiline exe SSIOFIS uei dete heic santa Sacs aRE RaF Un FUReU SG 9dS Ja a a neus z daiak Redes dA 31 Conditional Statermiefi s us coocpase cen nei Saa n ed inu nennen 31 WEE eege 31 E ols EE 32 cubrerech Index e System overview VE e EE EE 33 lo goo 33 US e e T 33 Be Eo A e A A 35 tc AA 35 mune ser corsario tediosos i 35 d A I e o A 37 Y Ccs 38 Handling masks from plc program 41 zl ero gi RE RE 43 cc e S 43 Free programmable mode RENE 43 PO SSIEGION i e I ni 43 Prepare transmit message iii 43 UE 04 44 gie 45 Parse received message ENEE 47 FANG SIS CG Ko e 81011 sat m T HU 48 El M E gees 48 One phase counting ME 48 Two phase counting single precision 49 Two phase counting Oouad precision ene 49 mile speed Beete dl MEER NT 50 ae Kee EE 50 A o3 Zero PA o3 Bicis line
56. ll programs in project it is not possible to define a separate password for each CyBro Password stored in project file is not secure so keep project safe When password is active communication option Transaction id can not be used To send a new password use command Erase protected program cubreTech Additional features e Command line options Command line options Command line options may be specified upon starting CyPro They are used to automatically perform some tasks such as sending a program to a connected PLC Using command line options CyPro may be used as external compiler for a shell application SCADA CyPro er RETE te reas CyBro cypro OPEN myfile cyp START To E yp yfile cyp x meng gt a AS ami Lr mue B Lat CyPro log myfile cyp There are two general styles to use command line options cypro exe filename cyp cypro exe OPTION1 OPTION2 OPTIONS First style is used by operating system when user double clicks a cyp file Command line options are NEW filename cyp OPEN filename cyp ISAVE SAVEAS filename cyp EXIT NAD number AUTODETECT ISTART ISTARTALL ISTOP SEND HIDDEN Create a new project Filename is optional If omitted untitled is used instead Open existing project with specified filename Save project Save project under specified name Exit CyPro Select program If specified NAD exists that
57. mpe aur E OO e Mimo ae MANA Mandi o tare pre Suse D ORE moco TAUTO E ndear o Mae E a MO emer g SCI Conditional statements Conditional statements provides restricted execution of statement blocks depending weather particular condition is true or not if then else Block of statements can be evaluated and executed depending on the value returned by a boolean expression using if then construction This takes general form if lt Doolean expression gt then lt statements gt oal Luc The boolean expression can be any expression that returns a TRUE or FALSE boolean result e g the state of a single bit variable or a complex expression involving numerous variables Alternative statements can be executed using the if then else construction in the form Miri boo an expression Chen lt statements gt elsif lt boolean expression gt then lt statements gt else lt statements gt Enc Examples of conditional execution LE COllision then speed 0 brakes 0N Se cts if gate closed and pump on and temp 200 then COMER Ol m uccisi else contro lm rare more IDE Speesdu Mr SL EE cubreTech Programming e Instruction list If then and if then else constructions can be nested within other conditional statements to create more complex conditional statements EE EE cn fuel 4000 else fuel 2000 Sol ing else fuel 1000 SEL AUER Further statements can be conditionally exe
58. nager ajxmt xBoris Data set __ Variable name arameters 1 binds left type Vale Base int 50 Dec lf af Bead d Wite y Import j Export Close The comma separated values or CSV file is a text only file that stores tabular data Each row contains variable name type base and value piman ler lie Dae s EE ENEE boo Bee n LL Lights seems cera hig tic Dec Qu 0200 eel else Wie Wee 9 SEIT cel Cone etse n aie Dee LAI ES ee ee EE vente Llat Lom int DEG 5 A single csv file contains one data set File name is equal to data set name Csv format is suported by virtually all soreadsheet and database programs Number of variables in data set is not limited For a large number of variables reading and writing may last a few seconds To open a set of plc variables into MS Excel do the following e Create New data set e Add variables to data set e Read values from PLC e Export to csv file e Open MS Excel and import csv file Similar procedure may be used in the opposite direction cybreTech MN Multisend User interface e Multisend Multisend is tool which allows updating multiple controllers at once E Multisend Tool Send kernel C Only if different Current Total jes Cancel Send ple program C Without init Init all vars including retentive Start plc Verify if started Program MAD Program 1 6512 Program 1 6511 Program 1 651
59. ng with masks press Masks button on the standard toolbar or press key F7 Mask List dialog box will appear Mask List miel ES Add Duplicate 2X Delete E Edit MoveUp Move Down Entry point MO Timeout 60 sec Caption Select pid_gain pid_ti pid_td input type Input output type Output regulation Reg reg_cycle Cycle password Password test_mode Test exit To create a new mask click Add or press Insert key Mask Editor dialog box will appear Appearance Variable Menu Branching Name mask Deich d Next mask exit Field positions Width Enabled x T Caption field text s z Laption field tex a Eat fo H 1 li Sal z Unit field text li Edit field ENE D 4 p e z Buchs Sh p ay Bargraph jo fo Hjo Iv OK Cancel OK Name is a unique string identifier that identifies a particular mask Next mask defines a mask that becomes active after E key is pressed Escape mask defines a mask that becomes active after P key is pressed Usually this key is used to exit from mask Caption field is a short string that will appear on the display to identify the currently edited variable Caption position is represented by the yellow rectangle To move the caption drag the rectangle into the desired position To resize caption drag the right edge of the rectangle Edit field is a display area in which the value of edited variable is displayed It is repre
60. o is connected through the serial interface NAD autodetection will not work In that case please enter the network address of each CyBro manually If the option Synchronize program with PLC is activated commands Start and Monitor will automatically compile and send the current project to the CyBro To connect PC and CyBro a number of connection options are available Serial connection Serial RS232 connection using serial cable or USB to serial converter in 753 Rs232 LO SY BEEN SE CZ E USB to serial converter CyBro 2 laptop Serial RS 485 connection using CAD 232 A2 converters A bus Abus e Bi converter converter converter SEAN i iil TU uin nul desktop PC RS485 e A cubrerech Introduction e Communication TCP IP connection Direct connection Ethernet FCK em ne Ve A eii A gt nut um gpuu os CyBro 2 laptop Local area network connection t I Cm SR un om mU EET Ca Sa e gt i cm ht n ms CyBro 2 CyBro 2 CyBro 2 desktop PC Wide area connection through Internet Pr ya M a EI Lit router nd bd ae d desktop PC router CyBro 2 Wide area connection through Internet using relay server P TON gt o p W x m gt NX E A S A pa TT d D Internet desktop PC router m router un
61. obal allocation dialog Retentive flag is set for each variable individually Variable Properties working hours Name working_hours Type lona v Betentive T Array Copy to EE Erami jo Lo ja 3 D efault value Both retentive and non retentive variables reside in RAM but non retentives are automatically cleared by kernel during power up and program start RAM PLC program Number of retentive variables is not limited If required the whole PLC memory may be retentive Data retention time of retentive variables is specified in CyBro hardware manual When power is off for a time period longer than specified content of retentive memory may be lost System bit retentive_fail indicates that retentive memory is lost It is set automatically after power on and clear next time PLC is started Note that retentive_fail means retentive memory is certainly cubreTech 7 Programming e Variables lost If only a partial lost of memory occur it may not be indicated To ensure 100 memory protection user should calculate checksum crc protection sending a new program to PLC will clear variables If allocation list is not changed retentive variables will be preserved To send program without clearing variables use command Send Without Init EE variables Variables that need to be preserved for a long period should be stored in EEPROM memory To make variable permanent set copy to EE flag in the global allocati
62. ojo SERRE nck sens sam cee eee o4 cc M 54 UOR ee 54 KI OF A mom 99 Ethernet COMMS CUO MN 55 CONNECCION OPUONS Pe 56 Tc DINE CU COMMECCUION BE 57 2 Local area connection ii of 3 Wide area connection using static IP or DynDNS 57 4 Wide area connection using relay server 59 Be o e nn DU os e EE 60 VM oos 60 ON BI 510 VCR RR RR A 60 zB Bie I e ER 61 SOCKETEXAMDPIES eebe T 61 Belle En T 61 ele lte WEEK c pain 61 MODBUS e tele RE EL mE 62 Additional TS AG E 63 PN NS c E 63 Password Ol OLS CONN NN RO T A E A ai 64 COMMANA RS GPHONS MR 65 BS eTO a e PE Om EE O EA 67 YOUN TINS Gy e de polo AIM ER 67 Step one define problem i 67 Step two define bardware iii 67 Step three allocate variables iii 67 Step four Write en 68 Step five send and run 68 Step SIX NEW Bei M an iassa peinar riale 69 joe A A 71 Dala types SUNN A NETTO UE 71 YUE M H 71 cyoretech Index e System overview PUV OUTO 71 A euecee 71 Ion AEN AVA AAA 72 HS COUN RETA ES SIAN AV EE 73 ASTUCUONS MET REC c evens 73 Allowe
63. on dialog Copy to EE flag should be defined for each variable individually Variable Properties working hours Name pid aen Type integer Retentive F Array Iv Copy to EE Erami Jo to o z Default value EE variables resides in RAM memory as all other retentive and non retentive variables but they also have a copy in EEPROM Because of this they are used by PLC program exactly the same way as other variables but in addition reading and writing to EE is available EEPROM RAM ee_read_req ee write req ee write magic lt PLC program B To read all variables from EE to RAM set bit ee read req Bit will be automatically cleared when copy is finished Depending on number of EE variables copy process may last from few milliseconds up to 3 4 seconds To write all variables from RAM to EE set ee write magic to 31415 and set ee write req When copy is finished both variables will be cleared Depending on number of EE variables write process may last from few milliseconds up to 5 6 seconds The purpose of magic is to protect EE memory from accidental writing To check how system works open the example program EEReadWriteDemo cyp Only a complete EE memory can be read or written there is no method to read or write single variable EE variables should not be accessed by PLC program during both read and write operation Reading and writing should not be activated at the same time
64. onnected to the same network CyBro supports e Modbus RTU slave 232 485 e Modbus TCP slave Ethernet Modbus data model describes how modbus coils and registers are translated to CyBro memory entire plc sequential array sequential array random selected random cybro modbus cybro modbus cybro modbus Appropriate model allows easy handling of modbus devices If Modbus master is needed use InverterModbusDemo cyp from Examples cubreTech Additional features e NAD alias Additional features NAD alias Each Cybro unit has its unique serial number used also as communication address NAD Serial number is permanent and can not be changed NAD alias is a second communication address configurable by user Once set alias functions as the original NAD CyBro with alias may be addressed with both serial number and alias CS 4002 Sa y A LN POR gr o A i n a 4003 omm 4004 4547 replacement NAD alias 4004 To enter NAD alias open Kernel Maintenance enter desired alias address and send the kernel Kernel Maintenance Ea x Current PLC kernet Kernel loaded from file Serial number NAD 004547 File N Projekti CP 2 CyPro Kernel bir Version 2 1 0 Version 2 1 0 Build date 21 12 04 19 22 12 Built date 21 12 04 19 22 12 Transfer date 28 12 04 17 47 18 Transfer date 28 12 04 17 47 17 Address 10000h Address 10000h Si
65. oolbar or press key F 10 zle xE A tt 59 gt wm w i uh Moto gt O Dec U Dec U Dec DU Dec 0 Dec 0 Dec ee write magic 0 Dec ee_read_time 1079 Dec ee write time O Dec i 9999 Dec 9999 Dec 9999 Dec 9999 Dec 9999 Dec 3333 Dec 3333 Dec 9999 Dec 99999999 Dec 33333333 Dec 99999999 Dec 99999999 Dec 33333333 Dec 33333383 Dec 33333383 Dec 99999999 Dec To insert variables click Add button or press Insert key Dialog box Variable Insert will appear Select desired variables and press OK To select continuous block of variables press Shift key Multiple selections are possible when Control key is pressed To rearrange list select variable and click Move Up or Move Down or press Control and move variable with Up or Down arrow keys Variable monitor allows unlimited number of sets To quick access first five press Alt 1 to Alt 5 Monitor values are updated approximately every 100ms History scrolling speed can be changed using Speed slider To change variable value double click it press the Edit Variable properties button or select Properties option in the right click menu Edit variable values Variables ee write magic int Value 3415 Dec d Enter new value and press OK The entered value is sent to CyBro and then read back so the monitor displays the actual value Note that if CyBro is running and the program changes the variable its value will be immediately rewritten To toggl
66. ounting After specified time output activates and stays high until input goes low Available fields are the same as pulse timer The picture shows typical on delay timer operation IN Q Typical application is star delta switching for accelerating three phase motors Counters Counter type is depreciated and recommended not to use Visibility in alc file Various tools are able to read write CyBro variables like CyBroComServer CybroMiniScada CyBroScheduler and others Each variable can be marked as User exported to alc file as user variable visible in all tools including tools intended mainly for end users e g CyBroScheduler System exported to alc file as system variable visible only in tools normally used by system administrators e g CyBroComServer CyBroConfigTool CyBroKissLogger CyBroMiniScada Hidden not exported to alc file invisible for all external tools except CyPro Leave automatically allocated I O variables marked as System cubreTech Programming e Refresh processing Refresh processing CyBro implements refresh processing system inputs are sampled immediately before and outputs are refreshed immediately after the task execution Even if input changes during task processing input value remains stable during scan Although refresh processing is slower it makes programing easier Scan overrun scan time is defined as a time needed to complete one program cycle s
67. pe enter name adjust preset type and timer base and press OK Prese day hour mir Ser msec m mmm Type Base Ce Pulse f Ime 1 ms C On delay Ce 1 msz Te Timer base is a period in which the timer is incremented i e the time resolution of the timer The base should be equal or longer than the program scan time therefore 10ms base is not suitable for a long CyBro program Timer may be represented as the function block with two inputs and two outputs Similarly the timer variable consists of four fields Each field is an elementary data type Fields are in input bt input 9q output bit output Pt input long presettime let output long elapsedtime To use timer from the CyBro program the following syntax applies timer name gt lt field gt For example to set the preset of the wash timer to 15 seconds assuming that base is 100ms DIESEN 11507 Elapsed time of the wash timer will start at 0 and increment every 100ms until it reaches 150 Pulse timer Timer output is activated immediately after the rising edge of input signal After the specified time the output will go off Changes of input signal during pulse do not affect output cubreTech ge Programming e Variables The picture shows typical pulse timer operation IN M ET o Typical application is staircase light timer On delay timer When input is activated timer starts c
68. ppears in the hardware setup Two following parameters of all functions are x and y coordinates They are used to set display position Print origin is in the upper left corner 0 0 15 0 0 1 15 1 Printing outside visible range may produce unexpected results Print functions are dele sloc inr g Display clear Clears the whole display Requires no parameters cubreTech Operator panel e Print functions elo qe ls lo ena e deca EE HO Display print ASCII character Prints a single character on the specified coordinates Character may be entered directly A as ASCII constant 65 or using an integer variable which represents the ASCII value Values from 0 to 255 are allowed opresor a si be epa S EIERE Display print string Prints character string on the specified coordinates The string is an array of characters enclosed in the single quotes It may contain any characters from the extended ASCII set character codes 32 to 255 Giorno slo ese Ne EE ehar cle Chains Valine aiu Me Display print binary value Prints first or second ASCII character on the specified coordinates depending on the bit value If the value is false the first character is printed otherwise the second Set EE slo pame bim eda S EE EE EE E Display print integer value Prints integer value to the specified coordinates Parameter w defines printing width For example if w is 4 valid print range is from 999 to 9999 Parameter zb
69. rt key and position stop S K N E A lt P ed position 1000 The actual code may be written on both first or second manner by the if then instruction or by the two consecutive actions The first way is somewhat shorter and easier to understand if qx000 20 and qx001 0 then euren stopped TP IO Scarce Key ntes start full speed and set action to stop after 6000 neo epoca 900 e mee ser accom 0 OOE hys c ice ax000 1 epa end if elsif qx000 1 and qx001 1 then J Cicely a E ue las e eso OO laa slow down 000 qx001 20 Suae dom Siae xc The same functionality may be performed in another way by the two sequentially activated actions The code is a bit longer and less understandable but both actions will be performed very accurately if qx000 0 and qx001 0 then currently stopped ue o sta de Uda start full speed and set action to slow down after 5000 Mee miis 50 00 INGE sor EE ucc POOO Si SPAO T Sal di elsif qx000 1 and qx001 0 then eege Lee slow ir HOE NEES KE EE se mate mee essa 1 000 fee set conos E Sol don mol unum cybreTech High speed counter e Zero reset Zero reset HSC types A AB Z x1 and AB Z x4 implements an additional high speed input used to accurately determine absolute position Usual function of zero input is to reset high speed counter By default this is disabled and may be enabled by the function hsc enable zero If enabled
70. sented by the red rectangle Edit field should have enough space for editing variable in the desired range To move and resize field drag it like the caption Unit field is a short string similar to caption Unit field is represented with green rectangle and it is commonly used for displaying engineering units Bargraph is a semi graphic horizontal progress bar Few different styles are available To use bargraph both low and high limits should be defined cubreTech Operator panel e Masks Appearance Variable Menu Branching Variable fi Browse Type int Lo limit fo Hi limit 100 Step 5 m Decimal places D A Enter required Jump on first press Cancel Lo limit and Hi limit define allowed range Step defines a value for which the variable will be changed for a single key press Decimal places may be used for real as well as for integer and long variables In the former case only the display is fractional e g for decimal places 1 value 254 is shown as 25 4 Enter required and Jump on first press define method to operate with navigation keys P E Three combinations are available Enter required no escape mask current mask next mask Enter required yes Jump on first press no escape mask next mask Enter required yes Jump on first press yes escape mask current mask next mask If enter required is false changed value will be sent to CyBro immediately aft
71. solar cybro 3000 192 168 1 2 8442 This connection provides programming and monitoring over the Internet using relay server as middle point Relay function is implemented in CyBroWebScada v1 1 1 1 CyBro Configure push message to relay server e g www solar cybro com 2 CyPro Set connection to Wide area network common enter address of relay server e g www solar cybro com and press Copy session ID It is recommended to use Extra timeout Extra retries and Transaction id options 3 Server Enable relay Set new session id and paste your id X Disable relay 4B Set new session ID amp Reset Relay enabled Session ID 618076182 Message count Tx 10 Message count Rx 11 Last message at 2010 10 02 19 20 46 Last controller c 512 User controllers NAD Plant In push list Ping result SCHEI Demo Plant e cw Ping c9859 Primel plant e ow Ping Ea k a owe Ping Use Ping command to check connection between server and CyBro cubreTech 59 Networking e Ethernet sockets Ethernet sockets Socket are used for CyBro CyBro communication User has to define a list of variables on both sides and select mode of communication Four modes are available 1 Periodic 1s T dh db db 21 4 1 1 4 sock var LLL L LL LLL sock var oe T ee sock var LL iml l l LLL 1s lt gt Socket is transmitted periodically once in a second 2 Periodic 10s LE sock var L 0 kl Le m
72. ss of the target Cul For more details please open Project Description window JEJ3E 3E 3E JE JE IE JE 3E JE 3E 3E 2E 3E JE 3E 3E 30 3E 3E 3E 3E 3E JE QE 3E JE 3E JE 3E 3E 0E 3E JE 3E JE 3E 3E 3E 3E 2E 30 3E 3E 3E 3E 3E 3E 3E 3E QE 3E JE 3E 3E 3E 3E 0E 3E JE IE connect input key to the timer input Stair timer in op key e restart timer if a key is pressed during cycle Stair timer et stair timer et op B key e Z 4 d Ln 17 Col 14 Modified Cursor position File status Editor content is dynamically syntax highlighted Variables constants functions and other language elements are displayed in different colors To select different color scheme or customize colors use Tools Environment Options Colors Code helper is useful feature of the structure text editor To display a list of allocated variables and available functions press Ctrl Space CyPro editor allows multiple level of undo operation Deleted or changed text can be restored by pressing Ctrl Z key combination even after other completed operations The number of edit actions that can be undone is limited only by the available memory space and is usually quite sufficient To observe structure of cyp file open an example file cubreTech 5 User interface e Online monitor Online monitor Online monitor is a dialog box designed to display current values of CyBro variables To open it select Program Online Monitor click Monitor icon on communication t
73. t int int int int int read write RTC month int RTC year 12 Appendix e Instruction list summary Instruction list summary Instructions Move Id Idn st stn set setc res resc Logic cpl and andn or Arithmetic neg add sub mul div mod Compare eq ne gt ge It le Branch jmp label jmpc label jmpnc label cal subroutine calc subroutine calnc subroutine cubreTech move variable or constant to accumulator move complement of variable to accumulator move accumulator to variable move complement of accumulator to variable set accumulator or variable if condition true set variable clear accumulator or variable if condition true clear variable complement accumulator or variable logical and accumulator with variable or constant logical and accumulator with complement of variable or constant logical or accumulator with variable or constant logical or accumulator with complement of variable or constant exclusive or accumulator with variable or constant exclusive or accumulator with complement of variable or constant shift left accumulator set LSB to zero shift right accumulator set MSB to zero rotate left accumulator copy MSB to LSB rotate right accumulator copy LSB to MSB positive flank 1 if low to high transition detected 0 otherwise negative flank 1 if high to low transition detected 0 otherwise change sign of accumulator add variable or constant to accumulator sub
74. ter detected 3 requested number of characters received 4 timeout expired Example Incoming message has no terminating character and the length may vary Message length is coded binary in the fourth byte To receive such messages use the following code abu OK VSI IVS E Hee ER fee eC OU QUIET cose Outs Clio e ejfe tn I lt IC Seele ate c ene cubreTech 46 Serial ports e Free programmable mode Parse received message Functions for parsing a received message TO JOLIE a c debile Returns single character from the given position of the receive buffer Character is converted to integer value 0 255 ioe SCCM OOS ME OM ey See PO oa Compares receive buffer with a specified string If string match return true SO SOs MONO ls ens ONG S den Searches specified string in receive buffer Search starts from given position If the string is found function returns position of the first matching character otherwise return value is 1 HOS SETI Ok O aas ooa ALOE ALINE Returns value of decimal number starting at given position If character at specified position is space next character is taken until digit is found Conversion continues until the first non digit character is encountered ID SET ek POTE asa cs TEC Returns value of decimal number starting at given position If character at a specified position is space it is skipped until digit is found Conversion continues until first non digit is encountered u
75. ting Error CyBro is on line some error occurred Error codes are listed in the appendix To clear the error press Stop Loader CyBro is on line but system software kernel is not active Start Kernel Maintenance and send a new kernel Busy Unexpected messages are received Com port status indicates weather communication cable is properly connected VW OK ES communication port is ok but cable is not connected ie communication port is already used by another application Delay shows time between sent and received message in milliseconds Communication indicators show activity green is transmit Tx red is receive Rx Menu File Mew Open Ctro Load From PLE Save Ctrl 5 Save ds Shift Ctrl 5 Save Allocation List Printer Setup Print Ctrl P Close Recent Projects Exit New Open Load From PLC Save Save As Save Allocation List Printer Setup Print Close Recent Projects Exit cubreTech Create a new project Open an existing project Load project from the PLC Save the current project Save the current project under a new name Save allocation list to use with CyBro OPC or UniOP Designer Select printer and printer options Print the current project Close the current project Open recently opened project Exit 10 Chr Chris ijj Copy Chrl C fi Paste Chri V Delete Select All Ckri A gd Find Ctrl F Replace Ckri R Go to Line Mumber Ctrl G Propert
76. ting caused by shaft vibration or electromagnetic noise High speed counter and Com2 serial port can not be used at the same time Function hsc start will interfere with COM2 serial communication After the power up counter value is undetermined If HSC is not used high speed inputs A and B may be used as standard binary inputs For connections and technical specifications of HSC please check the hardware manual cubreTech High speed counter e High speed counting High speed counting By default the high speed counter is stopped To start counting use function hsc start hsc start start high speed counter To stop counting use function hsc stop se Ee Ee a To determine if HSC is stopped or started use function hsc active If HSC is started hsc active returns true otherwise returns false dii Ise eGo eese eee x lalo eee comas ds TET SILIO seu were eb e SIA abi To read the current position of high speed counter use function hsc read Reading is possible no matter if the counter is active or not Counter value type is longint and may be stored in a variable of the same type Cue OO enon sees To set the counter to the desired value use function hsc write Usually this is performed only when the counter is stopped but it is possible to write a new value even if the counter is active and running Nee wees 124000 amp As an example the following line increments the counter by 500 counts Ine
77. to point a fixed host name e g host a domrnain com to the public or WAN IP address assigned by your Internet Service Provider typically a dynamic IP address This allows servers located on your Local Network configured using Game amp Application Sharing to be accessible using this alias rather than the IP address assigned by your Internet Service Provider e Configuration Use DynDNS Yes Internet Service Internet Username damirskranec Password ade He oe le ale al ake le IP address 85 10 56 170 Dynamic DNS service dyndns Hostname damir getmyip corn Update successful cybreTech Networking e Connection options If router has no DynDNS support install update client on a local PC If firewall is active allow outgoing traffic and open UDP port 8442 for incoming connections When connection is made remote operation is same as in a local network Hardware autodetect program send on line monitor kernel maintenance all functions are available 4 Wide area connection using relay server CyPro meus 5 e a pm m amp m A desktop PC router a router b CyBro 2 192 168 0 3 192 168 0 1 1 0 0 1 2 0 0 2 192 168 1 1 192 168 1 2 192 168 0 3 1000 solar cybro 8442 192 168 0 3 1000 solar cybro 8442 1 0 0 1 2000 solar cybro 8442 1 0 0 1 2000 solar cybro 8442 solar cybro 8442 2 0 0 2 8442 solar cybro 8442 2 0 0 2 8442 solar cybro 3000 192 168 1 2 8442
78. tract variable or constant from accumulator multiply accumulator with variable or constant divide accumulator with variable or constant remains of dividing accumulator with variable or constant test if accumulator equal to value test if accumulator not equal to value test if accumulator greater then value test if accumulator greater or equal value test if accumulator lower then value test if accumulator lower or equal value unconditional jump to position indicated by label jump if condition true jump if condition not true call subroutine call subroutine if condition is true call subroutine if condition is not true 73 Appendix e Instruction list summary Type conversions x to y convert acc from type x to type y bit word integer long real Allowed type conversions bit word int long real word int long r acc const var 4 B 4 4 i i i i i i x 4 4 GG 4 cyoretech in Appendix e Structured text summary Structured text summary Operators MEE EA EECSCTOM A E MOI DI IC I CT lo Lele seme pp same MEE Flow control if then else if expression then statements elsif expression then statements else statements Sumo EE case of cas
79. u sock var OL sock var Y LL p 10s gt Socket is transmitted periodically once in 10 seconds 3 On request T sock req A SOCK Vat ia XXH sock var 2211 T L clear by kernel p set by plc program Socket is transmitted on request Transmission begins when plc program set the request bit Kernel responds by clearing the request and sending the socket Request bit is the first bit variable in the socket By convention request bit is always sent as 1 Received socket will not cause retransmition Request is automatically cleared after the scan To trigger transmission by an external device e g another CyBro use a second socket Request variable can not be common because it is automatically cleared after reception cubreTech Networking e Socket examples 4 On change LE gt sock var m o hh sock Val LL OL sock var di Sl Socket is transmitted each time an socket variable is changed Received socket will not cause retransmition Sockets are transmitted only when plc is running Socket examples Event driven action On request output socket may be used to send a single event to the network Each controller may trigger the event each one will receive the event and the request will reset automatically Number of controllers is not limited The example shows an event to turn all lights off SP n Ra if k
80. ue Int is a 16 bit signed number It should be used for counting encoding states fixed point arithmetic and similar Long is a 32 bit signed value It should be used when numbers bigger then 32 767 are expected cubreTech T Programming e Variables Real is a floating point number Floating point instructions typically consume three times as much memory as integer and processing of the floating point numbers is about ten times slower then integers Word is an array of 16 bits It doesn t represent a value it is a handy method to perform logical operations to 16 bits simultaneously Arithmetic operations are not applicable for word variables In bit out bit in word and out word variables represent physically connected binary bit and analog integer signals Structures timers and counters are structured data types consisting of several dedicated fields Constants are used to represent a value that will not be changed As an example Pi 3 14 can be defined for trigonometrical calculations Data types do not apply for constants Type conversion instructions are also available but should be used with caution because they are likely to cause errors Limited number of type conversions indicates proper planning and good programming style Retentive variables Retentive variables retain their value when power supply goes down but also when PLC is stopped started To make variable retentive set the retentive flag in the gl
81. xor SCO OOS Wis Oe Wow seek Returns real value of decimal number starting from the given position If character at a specified position is space the next character is taken until the number is found Conversion continues until the first non digit character is encountered Example Communication is used to set the parameters of the current PLC program Message may contain keywords OPEN CLOSE or set values TEMP 25 CYCLE 100 separated by spaces Incoming message may contain request to set one or more parameters a e ORIEN lt i Eje E Mavi veuve c cod di O SOS ES Mim nena Well ve 0 y Sc pes stone pp IR If positions l ihen Se Ee SOS EOS EAR E pocion Mi hen ced ewe gue e eos O SOL EE cubreTech D High speed counter e General High speed counter General High speed counter HSC is a hardware device capable of counting external pulses from an encoder in both directions The counter is 32 bit signed register 2000 1000 0 1000 2000 Counter input may be one phase usually called A or two phase usually called AB Z stands for additional zero input usually used to determine absolute position of the controlled device Several counting modes are available None high speed counter disabled Z only high speed counter disabled zero input used as interrupt input A AB x1 one phase or two phase counting single precision A AB Z x1 one phase or two phase counting single precision zero input activ
82. ze 28542 bytes Size 28542 bytes Magic 27182 OK Magic 27182 OK CRC D973h CRC D973h IEX baud rate 100kbps IEX baud rate 100kbps Y HSC mode None HSC mode None E NAD alias None NAD alias 4004 Load Send Close To determine actual addres open Get PLC Info dialog box Loader tab shows the original NAD serial number and Kernel tab shows alias cubreTech Additional features e Password protection Password protection Begining with version 2 5 0 CyBro has option to restrict access with password Depending on selected protection level protection may extend to a plc program variables and sockets For example if protection level is Program protected anybody can freely read and write variables but will need password to send a new program Program Properties ES General Modbus Master Push Protection A bus ethernet protection level C Unrestricted access C Program protected C Program variables and sockets protected Full protection CyBro not visible Password FordPerfect42 Mote protection level and password are common for all programs in a project Password protection is effective only for Ethernet Serial access is not restricted even if CyBro is configured for a full protection Password may contain any combination of letters and numbers of reasonable length It is case sensitive Don t use spaces special symbols or national characters Password is common for a

Download Pdf Manuals

image

Related Search

Related Contents

User Manual - Stellar Drive Clone  INSTALLATION MANUAL  Oscilloscope Measurement Labs  mode d`emploi - L`uritonnoir  Goldstar FC200 service manual  Harbor Freight Tools Variable Auto Darkening Welding Helmet with Metal Head Design Product manual  Manual de usuario Vacon NXL    Soporte motor ventilador  V7 Professional Backpack 16"  

Copyright © All rights reserved.
Failed to retrieve file