Home
User manual Supervisor
Contents
1. N N D S rs a R403 136 SERAD S A Supervisor documentation rom 1 Read 16 bits variables 16 bits non ro aucune to FEh sign s rom Write 32 bits variable 32 bits wo aucune to FEh sign from 1 Write 8 bits variable 8 bits non wo aucune to FEh sign tomi Write 16 bits variable 16 bits non wo aucune to FEh sign s 9 3 Intructions list 9 3 1 List of the CANopen instructions A Read and write the dictionary CANSETUP Read or write a parameter byte CANSETUP Read or write a parameter word CANSETUP amp Read or write a parameter long integer B Modification of local variables CANLOCAL Read or write a local variable byte CANLOCAL Read or write a local variable word CANLOCAL amp Read or write a local variable long integer C Modification of remote variables CANREMOTE Read or write a remote variable byte CANREMOTE Read or write a remote variable word CANREMOTE amp Read or write a remote variable long integer D Instructions in mode PDO CAN Read or write data CANEVENT Test of a message arrival PDOEVENT Test of a PDO arrival PDO Read or write data by a PDO SETUPCAN configuration of a message E Control instructions CANERROR Faults detection CANERRORCOUNTER Controls and erases the communication errors STOPCAN Starts the CANopen module STARTCAN Stops the CANopen module F Instructions in mode PDO SDOEVENT Allow to know if a wrtting has be
2. 8 14 9 Affect Equal Syntax Accepted types Description Remarks Example See also lt Expression1 gt lt Expression2 gt Or lt Variable gt lt Expression2 gt Bit Byte Integer Long integer real or Char string this operator affects lt Variable gt to lt Expression2 gt or tests if lt Expressionl gt is equal to lt Expression2 gt lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type as 10 IF b 5 THEN eae gt ES lt lt gt 8 14 10 Greater gt Syntax Accepted types Description Remarks Example See also lt Expression1 gt gt lt Expression2 gt Byte Integer Long integer real or Char string this operator tests if lt Expression1 gt is greater than lt Expression2 gt lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type IF b gt a THEN gt ESS lt le 8 14 11 Greater or equal gt Diff_rent Syntax Accepted types Description Remarks Example See also lt Expression1 gt gt lt Expression2 gt Byte Integer Long integer real or Char string This operator tests if lt Expression1 gt is greater or equal than lt Expression2 gt lt Expressionl gt and lt Expression2 gt must be numerica
3. Bit for 1 output bloc Byte for 8 inputs bloc Integer for 16 inputs bloc For example OUT Jack On Output writing OUT LAMP Defaut 5 OUTB Data 00110000b Bloc of eight inputs writing OUTW B OFFFFh Bloc of sixteen inputs writing C Outputs reading All outputs can also be read The reading value is the last written value This feature is very useful when more than one program are using the same output bloc So it is possible to write only desired outputs in one operation without changing the others For example To put 1 on the fourth lower bit of a 8 bits output bloc named IO1 use the following program OUTB Bloc1 0UTB Bloc1 OR 00001000b set of the fourth bit of a eight inputs bloc R403 59 SERAD S A Supervisor documentation D Events handling We can wait for a state change on an input with the function WAIT The syntax is WAIT lt Condition gt The WAIT function is used to handle a special state condition during a normal execution The execution is stopped as long as condition is false When the state condition is true the execution continues This function is very useful to wait for end of movement or mechanical thrusts sensor Example WAIT Lim_S Cutter On Waiting for a soft thrust error Stop Cutter Axis stop WAIT Inp StartButton 0n waiting for StartButton pressed E State test We can test the input state with the structure IF THEN ELSE The syntax is IF l
4. 1 1 21 1 3 Task Line This command sort globals variables At first we find saves globales variables in growing order of their address then not saves globales variables in type order bit octet string Inside the same type a alphabetical order is doing 3 10101 This command compiles the project A first phase verifies the syntax of each task the configuration of variables etc When a task has a syntax error the basic task is edited and the error is highlighted with the position of the cursor It is possible to compile only one task choose a task in the task s list right s click on your mouse and select VERIFY SYNTAX This command give detailed informations on project on programme memory and memory of uses datas This command allows the user to define its print type printer paper etc The paper orientation can t be changed R403 20 SERAD S A Supervisor documentation Impression Icon Action This command print all of a custom project The SUPERVISOR configuration all the basic s task and the ladder are printed Quit Action This command quit the SPL software Projects list Action A click on a project of this list opens it 3 4 2 Constants Variables Tasks menu Project Tasks Communication Debug Options Help Fi Add Modify Delete Q Show The four commands of this submenus act on the main windows of the project The actions of each one are
5. A command to print S Commands to add a rung roi to insert a rung before the selected one and to delete the selected rung 3 4k 4 f gt Commands to cut M copy ir and paste a chart a The cut or copied chart is the selected one The paste chart is inserted on the free selected case gt Commands to cut de copy and paste a rung B The cut or copied rung is the selected one The paste rung is inserted before the selected one gt The SUPPR key clears the chart on the selected case To delete a parallel link you need to select this chart in the toolbar and to click in the case of the link The Go at rung function allows to go to a particular rung R403 _ 4d SERAD S A Supervisor documentation 4 PROGRAMMATION LANGUAGE 4 1 Introduction 4 1 1 Description Supervisor Programming Language is a complete programming language and easy to use with its structured programming constructions as found in most other modern programming languages This language is built around a multitask kernel and the basic language to ensure flexible and powerful programming The basic language also contains all PLC function The language manages the constants and variables like global local or stored variables A project developed with SPL software can contain up to 28 tasks working in parallel Each task have a priority level and can be describe by the basic or ladder editor An extra task treats the fastest e
6. Complement operator sus 111 R403 6 SERAD S A Supervisor documentation 8 14 95 OPEN Open a communication pott ses 111 82142962 OR OR Opera Orns RE Re nt ee le tite de 111 8 14 97 OUT Output Writing occ ceecescceecseecseeeneeeeeeseeeseceeeceseseesseeesecesecaeceaecaaecaeecseeeaeeeaeeneeeereees 112 8 14 98 OUTEMPTY Communication output buffer empty 112 8 14 99 OUTB 8 outputs writing ses 112 8 14 100 PIXEL Draw point 112 8 14 101 PLCINIT PLC function initialisation ss 112 8 14 102 PLCINP Read TOR input 113 8 14 103 PLCINPB Read a 8 inputs block ss 113 8 14 104 PLCINPNE Read a negative edge on PLC TOR input 113 8 14 105 PLCINPPE Read a positive edge on PLC TOR input cocooonooccoccnonononcnononononononn nono nnnnonnnonnonnnnnos 114 8 14 106 PLCINPW Read a 16 inputs block 114 8 14 107 PLCOUT Write a Output isnie niiit eisini i eiee eis isei ioi 114 8 14 108 PLCOUTB Write a 8 outputs block 115 8 14 109 PLCOUTW Write a 16 outputs block 115 8 14 110 PLCREADINPUTS Read the PLC inputs ssssssesesessssesessesseseseststseststststststsestsesesesesesesesese 115 8 14 111 PLCWRITEOUTPUTS Write the PLC outputs ss 115 8 14 112 POWERFAIL Power fail detect sise 115 8 14 113 PRINT Writing on a communication pott see 116 8 14 114 PROG Program start ssl coe cusvbieccedeaces skesoaecenceesnsebdscceddecee stuvudeschudheescnevtdasences dad
7. Example See also RIGHTS lt String gt lt Number gt String Char string Number Integer This function returns the lt Number gt right characters of a string To find the characters number in lt String gt use LEN lt String gt a Sensorl bS RIGHTS a 1 Result bs 1 LEFTS 8 14 124 RTRIMIS Remove the right spaces Syntax Accepted types Description Example See also RTRIMS lt Expression gt Expression Char string Returns a string copy without the right spaces a Menu t bS LTRIMS a Result b Menu LTRIM 8 14 125 RUN Launch a task Syntax Description Remarks Example RUN lt Name gt This instruction is used to launch a stopped task ex task declared with manual start This function has no effects on a suspended automatic running tasks or already launched task Beginning R403 118 SERAD S A Supervisor documentation Wait Inp Power On RUN Cutter Wait Inp Power 0ff HALT Cutter Goto Beginning See also CONTINUE HALT SUSPEND 8 14 126 SEEK Moving to a save file Syntax SEEK 3 lt Long moving gt Syntax 2 lt Variable gt SEEK 3 Accepted types lt Long moving gt lt Variable gt long integer Description The syntax 1 allow to moving in the save file of lt Long moving gt characters The moving start at the current position The syntax 2 allow to know the current position in
8. SDO receive COB Id pe DS fion sign SDO transmit COB ID Peels non sign node ID of the SDO 8 bits non client sign 1280 Number of elements sign SDO transmit COB ID 32 bits fion sign 3 node ID of the SDO 8 bits non serer sign 1400 0 Number of elements sign COB ID 32 bits non sign SDO receive COB Id Transmission type 32 bits non sign 8 bits non sign Pee SR aucune 200h Node Id 1401 0 Number of elements rT a sign 1 COB ID 32 bits non sign 2 Transmission type sign 300h Node Id 1402 0 Number of elements eg ie sign 4 COB ID 32 bits non Le sign 2 Transmission type sign 1403 0 Number of elements sign 1 COB ID 32 bits NON i sign DEA E Transmission type sign 1404 Number of elements sign 1 COB ID 32 bits non sign EF 8 bits non 2 Transmission type Re sign 1405 0 Number of elements sign aucune aucune aucune type d appareil registre d erreur interne registre d etat sp cifique au constructeur nombre d erreurs apparues Nombre de PDO support Nombre de PDO synchrone support Nombre de PDO asynchrone support Nombre de SDO support param tre du 1er SDO serveur COB ID de r c ption du 1er SDO serveur COB ID d envoi du 1er SDO serveur Node ID du SDO client param tre du 1er SDO client COB ID de r c ption du 1er SDO client COB ID d envoi du 1er SDO client Node ID du SDO serveur param tre de r ception du 1er
9. 10 SERAD S A Supervisor documentation 2 INSTALLATION STARTING 2 1 Environnemental consideration SUPERVISOR must be installed vertically to have a natural convection cooling SUPERVISOR must be sheltered from humidity liquid projection and dust Technical features Power supply 24 Vdc 15W amp Watchdog NO Contact liberate from potential 48Vac maxi 2A maxi Service temperature 0 to 45 C Storage temperature 20 to 70 C 2 2 Safety The security rules impose a manual restart after a default due to a power supply falling down a watchdog default or an emergency stop amp SUPERVISOR s watchdog must be connected in serial with the emergency stop loop amp The watchdog must be closed at the beginning of the program When a fault is detected Internal fault power fail the watchdog is automatically open Linked the Power Electrical cupboard OK to a PLC input and treated it in a safety basic task R403 11 SERAD S A Supervisor documentation 2 3 Connections 2 3 1 General explications amp SUPERVISOR PC cable must be shielded with shield connected at each end It will have to be disconnected from the SUPERVISOR when it is not used All these cables as well as the inputs outputs cables will have to be separated and distant of the power modules amp Inductive load must have an interference eliminator diode in DC and filter in AC Diodes and filters must be 2 3 2
10. Parameter Connect Value CONNECT Meaning Modem answer when connecting Parameter Busy Value BUSY Meaning Modem answer if the line is busy Parameter Hangup Value ATH Meaning Selecting the way to hang up Parameter HangupOk Value NO CARRIER Meaning Modem answer when hanging up Parameter CommandTimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the modem going to the command mode Parameter HangupTimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the hanging up All missing parameter is automatically set to the default values indicated on the first using Parameters for an Westermo TD31 or TD32 modem type Parameter Initl Value ATZ Meaning Using default factory settings Parameter Init TimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the modem answer Parameter Init2 Value AT amp F amp KO R403 148 SERAD S A Supervisor documentation Meaning Remove the DTR and DSR handling Parameter Init2TimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the modem answer Parameter Dial Value ATDT for vocal dial ATDP for a pulse dial Meaning Selecting the way to call Parameter DialTimeOut Value 600 Meaning Maximal waiting delay in 1 10 before the modem connection Parameter Ok Value OK Meaning Modem answer if the command have been handled correc
11. R403 133 SERAD S A Supervisor documentation StartCan CardName Speed Node Id Halt INIT End Prog Warning be sure that there is only one task in automatic mode otherwise pass the others in manual mode In both cases compile and transfer the program Validate the test by clicking on START in the local card The percentage of errors will tell you very quickly if the Can Open bus is right on a hardware point of view for these two SUPERVISOR NB The errors percentage is calculated with the values printed in the View page Therefore it may be useful to clear these values from time to time 9 2 5 Dictionary The dictionary contains the different parameters and variables of the board They are directly accessible for the SUPERVISOR with the functions CANSETUP The variables tables are accessible with the functions CANLOCAL To access to the other CANopen peripheral parameters you have to use the functions CANREMOTE R403 134 SERAD S A Supervisor documentation 1000 1001 1002 1003 predefined error field sign 1004 PDO sign Number of 32 bits r non 100B 100F Index 1 Device type Error register Manufacturer Status Register actual error number of PDO s supported Node ID Number of SDO s supported ne S 32 bits non sign 32 bits r non 32 bits r non 32 bits r non 32 bits non 32 bits r non 32 bits non 00080008h 00080008h 00010001h sign
12. 121 8 14 138 STATUS Task state 121 814 139 SUB S bro tn eenen anna tag a e aa a a tnt eaae 122 8 14 140 SUSPEND Suspend a task 122 8 14 141 STRINGS String creation ses 122 8 145142 1AN Tap ni nt ii ee eine 123 S144143 MME Time Das ne Re ne nt a tant at names ocre Dos 123 8 14 144 TIMER Wide time base seen 123 8 14 145 TIMES Current hour ss 123 8 14 146 TX485 Modify RS485 output state 124 8 14 147 UCASES Uppercase siennes 124 8 14 148 VAL Convert a string in NUMETIC esse 124 8 14 149 VERSION Operating system Version seen 124 8 14 150 VLINE Draw a vertical line 124 8 14 151 WAIT EVENT Event waiting 125 8 14 152 WAIT KEY Key Waiting 125 8 14 153 WAIT Condition Waiting 125 8 14 154 WATCHDOG Watchdog ses 126 R403 7 SERAD S A Supervisor documentation 8 14 155 WHILE While Do End While ss 126 8 14 156 XOR Exclusive OR operator ccecccesccsseessessceesceseceecesecesecaecnaecsaecaeecaeeseecaeecaeeeseeneeeneeenreens 126 O A sone cedocs sues seenss sie cence T T sone telle EE sousdeassecbosenen 127 OST DENON AAE A MEIN NIN Me A Miletus tian AA ecu bade A ech cats 127 Oa che EL LOYE LA TA PE RON UE PE EE NL 127 9 1 2 CANopen COMMUNICATION ssssssssesseeesesseeeseesseenseeneeneeeereeneneeneeneennenseenneeneeneeneennees 127 9 1 3 Network configuration seen 129 9 1 4 Type of send messages ces cess ecv
13. is greater than one The first index of an array is 1 The index can be an immediate value a byte variable or integer variable Example Position PositionArray 5 Warning A writing at the 0 index in an array is forbidden this error can make trouble in the operating cycle The variable can be a stored variables On a power cut the variable value is preserved There are 20 000 stored variables at address 1 to 20 000 Then a stored variable must be assigned to an address Warning The user must beware of the crossing of variables when he assigns them For example an array with 50 elements is assigned at the address 100 the next variables must be assigned at an address greater than 150 The crossing of variables can be used in one case to allows the address access with multiple variables Example TableModbus array of 50 integer assigned at address 100 DecompteurPiece integer variable assigned at address 100 If TableModbus 1 0 Then Goto EndProduction If DecompteurPiece 0 Then Goto EndProduction This two last program lines are the same but the last one is the most explicit Unlike the local variables you need to define the global variable before you use it An non stored variable will be used as a link between tasks Whereas the stored variable are used to preserve adjust parameters etc Defined types are R403 2 SERAD S A Supervisor documentation Bit Variable non sauvegard e
14. 1 octet Etat On True False Variable sauvegard e 6 octets Octet Variable non sauvegard e 1 octet Variable sauvegard e 6 octets Entier 0 65535 Variable non sauvegard e 2 octets NumBoucle Variable sauvegard e 6 octets 1000 2 147483 647 Variable sauvegard e 6 octets 100 000 j 1 7 x 1038 Variable sauvegard e 6 octets 256 152 Ww CRE CS O 255 Longueur cha ne 1 Erreurl But e atteinte 4 2 3 Local variables These variables are accessible only in the task where they are declared main program and sub programs The accepted types are bit byte integer long integer real char string Their values are not preserved between each power on and are cleared to zero You often need to store values temporarily when performing calculations with Basic You need to preserve the values to compare them but without stocking them in a global variable The local variables don t need to be defined before being used They have an identification character at the end of the name to indicate the data type The local variables of a task can t be used by an other task Two variables with the same name used in two tasks are two different variables In a task the variable can be used in the main program and the subprograms The treatment of a local variable is fastest than the global variable A local array can t be defined Warning Don t use so much local string variables because each local string variabl
15. 30 SERAD S A Supervisor documentation 3 4 5 Options menu SPL Language Supervisor Language gt This sub menu allows the selection of language Editor Supervisor Editor This sub menu allows to customize the colour of the font and the background of text key words in the editor of basic task Colors Type of Texte normal Color text i f Chaines de caract res modification Commentaires u T Text F background Result To modify a colour first you should select a type of text Then you choose one colour and you click on it with the left click to change the font colour or the right click to change the background colour A screen shows the result of the modification Project PC Com _Broject Setup Communication Debug Options PC Com R403 31 SERAD S A Supervisor documentation This sub menu allows the selection of the communication port of the PC which is in link with SUPERVISOR Model Project Setup Communication Debug Options Help Supervisor gt Project PC Com gt Operating system gt Mod le d Y Supervisor 80 Compiler gt Supervisor 640 Multitasking This sub menu allows to change to Supervisor model Compiler Project Setup Communication Debug Options Help Supervisor Project PC Com gt Operating system gt Mod le gt Compiler gt With trace code Multitasking Avec code de debug Force using brackets With tra
16. EXIT SUB GOTO JUMP PROG END PROG SUB END SUB 8 2 Arithmetical 8 3 Mathematical Call a subroutine Call a subroutine bloc end Exit subroutine Branch to label Branch to label Program Subroutine Addition Subtraction Multiplication Division ABS Absolute value ARCCOS Cosine invert ARCSIN Sine invert ARCTAN Tangent invert COS Cosine DIV Integer divide EXP Exponential FRAC Fractional part INT Integer part LOG Logarithm MOD Modulus SGN Sign SIN Sine SQR Square root TAN Tangent ds Exponent R403 82 SERAD S A Supervisor documentation 8 4 Loops FOR TO STEP NEXT REPEAT UNTIL WHILE DO END WHILE 8 5 Logical lt lt gt gt AND NOT OR XOR 8 6 Test CASE IF THEN ELSE END IF 8 7 Char string Left shift Right shift AND operator Complement Operator OR operator Exclusive OR operator Lower Lower or equal Different Equal affect Greater Greater or equal Multiple tests Test structure ASC Convert char to ASCII CHR Convert ASCII to char FORMAT Created a formatted string INSTR Search a sub string LCASE Lowercase LEFT Left part of string LEN String length LTRIM Suppress left spaces MID String part RIGHTS Right part of string RTRIM Suppress right spaces SPACES Spaces made string STR Convert numeric to string R403 83 SERAD S A Supervisor documentation STRING UCASE VAL 8 8 PLC 8
17. Input reading Syntax INP lt Input gt Accepted types lt Input gt Bit Description This function gives the state of a digital input Remarks lt Input gt must represent an input name TOR The returned data type is Bit Example C INP HighCutter See also INPB INPW OUT OUTB OUTW 8 14 69 INPB 8 digital inputs reading Syntax INPB lt Input gt Accepted types lt Input gt Byte Description This function gives the state of 8 digital inputs TOR Remarks lt Input gt must represent the 8 inputs name The returned data type is Byte Example B INPB Data See also INP INPW OUT OUTB OUTW 8 14 70 INPUT Data reading Syntax INPUT lt Number gt lt Variable gt lt Variable gt Accepted types Variable Bit Byte Integer Long integer real and Char string Number 1 or 2 R403 104 SERAD S A Supervisor documentation Description Remarks Example See also Reads data from the communication port and assigns the data to the variables The execution of this instruction passed to the execution of the next task lt Number gt is the number used to open a communication port with OPEN function The read data must appear in the same order that the variables list OPEN SERIAL1 AS 1 INPUT 1 A B CLOSE 1 OPEN PRINT CLOSE 8 14 71 INPUTS Char string reading Syntax Accepted types Description Remarks Example
18. L or H amp lt Text gt unexpected Prog name expected The program name must be an identifier no defined previously Prog bloc already defined More than one PROG END PROG block is defined in the task amp lt Text gt unexpected PROG or SUB expected A block begins by PROG or SUB An instruction has been added outwards a block amp No defined PROG R403 153 SERAD S A Supervisor documentation The current block was not finished before end of source file Undefined Label An unknown label has been used in a Goto instruction Undefined Sub An unknown subprogram identifier has been used in a Call instruction Undefined Event An event generated by Signal is waited by any task or a task waits for an event which will be never generated Undefined Prog An unknown task identifier has been used in the Run Halt Suspend or Continue instruction amp SRV15 Card Expected To use axis card home input in the parameter InpHome_p home input name must be the same of axis card input Instruction expected An instruction is expected Buzzer Bit constant expected The Buzzer instruction must be followed by a type bit constant Goto or Call instruction expected A Call or Goto instruction is expected in a Case Invalid exit instruction A Exit Sub instruction must be used only in a subprogram lt Text gt Expected The FOR loop counter variable must be also used in the Next instru
19. REALTOINTEGER lt Expression gt Expression real This function converts a real type data in an integer type data A Edit 1 1 4 0 0 B RealToInteger A 8 14 120 REALTOBYTE Convert a real to a byte Syntax Accepted types Description Example REALTOBYTE lt Expression gt Expression real This function converts a real type data in byte type data A Edit 1 1 4 0 0 B RealToInteger A 8 14 121 REPEAT Repeat Until Syntax Description REPEAT lt Instructions gt UNTIL lt Condition gt This structure allows to the system to execute a list of instructions in a loop as long as the given condition is wrong R403 117 SERAD S A Supervisor documentation Remarks Example See also In the structure REPEAT UNTIL the lt Instructions gt are executed at least once even if the condition is true The execution of this instruction launches the execution of the next task a 0 REPEAT PRINT 1 a a a 2 UNTIL a gt 100 WHILE 8 14 122 RESTART Restart system Syntax Description Remarks RESTART This function restarts system This can be used to test system start type If RESTART function result is false then the system start with power on and if RESTART function result is true the system has been restarted by RESTART function 8 14 123 RIGHTS String right part Syntax Accepted types Description Remarks
20. Remarks lt Delay gt 10ms to 30 000ms lt Mask gt Integer lt Counter 1 Trigger gt Integer lt Counter 2 Trigger gt Integer lt Delay gt Integer This instruction allows to configure events lt Mask gt Bits 0 7 Activate the inputs 1 to 8 of the input card A positive edge will generate the event The input take account of the invert and filter parameters entered during the board configuration Bit8 Trigger of the counter 1 reached R403 56 SERAD S A Supervisor documentation Bit9 Trigger of the counter 2 reached Bit 10 SDOEVent Bit 11 PDOEvent Bits 12 Time base lt Delay gt Delay of the time base between 10 ms and 30000 ms If the time base is unused the value of delay will be not treated When the event configuration register is affected the event task is executed when at least one event is detected The maxi time between the event detected and its treatment is equal to the task ageing time If you want to modify the event configuration register you ll be treated this instruction in a normal basic task or an event task before the execution of GETEVENT instruction Reading the events detected The GETEVENT instruction is consumed and read the events detected Syntax lt Variable gt GETEVENT lt Varlable gt is an integer type with the same configuration of bits like the lt Mask gt parameter of MODIFYEVENT instruction Each bit assign to an event
21. See also lt Variable gt INPUT lt CommNumber gt lt NumberOfChar gt Variable Char string CommNumber 1 or 2 NumberOfChar Byte Reads lt NumberOfChar gt characters from the communication port and stores them in a char string The execution of this instruction launches the execution of the next task lt CommNumber gt is the number used to open the communication port with OPEN instruction lt Variable gt must be a variable char string type The task is blocked on this instruction when the number of character received is different than this specified in the instruction OPEN SERIAL1 AS 1 AS INPUTS 1 5 Read 5 characters from the communication port CLOSE 1 OPEN PRINT CLOSE 8 14 72 INPW 16 digital inputs reading Syntax Accepted types Description Remarks Example See also INPW lt Input gt lt Input gt Integer This function gives the state of the16 digital inputs lt Inputs gt must represent the name of a 16 digital inputs board Data type returns is integer AS INP Bloc INP INPB OUT OUTB OUTW 8 14 73 INSTR Search a sub string Syntax Accepted types Description Remarks Example INSTR lt string 1 gt lt string2 gt string string2 Char string This function searches a sub string in a char string and returns the position of the first occurrence of the sub string lt String1 gt is the researched string lt String2
22. WAIT Inp StartCycle On DIFFUSE Start WAIT EVENT Start WAIT HALT GOTO Beginning END PROG Inp StopCycle On SlaveTask END PROG This example is the same like the last example but used the DIFFUSE instruction Wait The second mechanism which waits an event is the WAIT instruction This instruction doesn t allow the execution of the task if the expression is not valid The Wait instruction used a global variable or an input To send an event you must assign a value to the global variable in another task The example below is the same like the SIGNAL and WAIT EVENT example but with the mechanism of WAIT Master Task Slave Task WAIT Inp StartCycle On SignalVariable 1 WAIT SignalVariable 1 SignalVariable 0 This mechanism has an execution time longer than the other mechanism The initialization of the global variable is an extra time in the execution 5 1 4 Counters The SUPERVISOR has two 16 bits counters Each inputs card SIO can be assign to a counter Warning When the counter is at its maximum value the counter is initialized to zero at the next edge maximum value 65535 Configuration SETUPCOUNTER instruction allows the counter configuration Syntax SETUPCOUNTER lt Counter gt lt Input gt lt Invert gt lt DesactivateFilter gt R403 62 SERAD S A Supervisor documentation Accepted types lt Counter gt 1 or 2 lt Input gt Byte
23. take place in the OS folder Execute the command INSTALL lt Serial port of PC gt For a serial plug on COM1 INSTALL COM1 gt Installation starts with old operating system erasure The Waiting for erasure message appears on PC screen gt Then programming is starting When programming is done SUPERVISOR restarts with Error n 23 because there is no user program Compile tasks and transfer in the SUPERVISOR 3 2 Architecture 3 2 1 Folders Gfx contains all the chart amp Lib contains all the file with DLL extensions for the running of the software Str contains the language file OS contains a copy of the SUPERVISOR operating system Help contains all the help file for the SUPERVISOR and SPL Project contains all the files and folders of the user s project R403 16 SERAD S A Supervisor documentation 3 2 2 Project contents The project folder is a reserved folder for the user s project Each project is composed on a ProjectName prj file and a ProjectName rep folder This folder have the file below amp a configuration file ProjectName cfg a global variable definition file ProjectName var a global constant definition file ProjectName cst a file per basic task ProjectName tsk an extra file per ladder task ProjectName lad The result of compilation gives some binary file ProjectName bin and ProjectName b00 to ProjectName b07 The s
24. 110 SERAD S A Supervisor documentation Example See also 8 14 94 NOT Syntax Accepted types Description Remarks Example See also AS MKIS AS If A 770 then A 32 MKI CVI CVIR Complement operator NOT lt Expression gt Expression Bit Byte Integer This function returns the complement lt Expression gt must be an integer valid expression a 0FF00h b NOT a Result b 00FFh AND OR XOR 8 14 95 OPEN Open a communication port Syntax Description Remarks Example See also 8 14 96 OR Syntax Accepted types Description Remarks Example See also OPEN lt CommunicationPort gt AS lt Number gt Authorizes the reading writing operations on a communication port You must open a communication port before any input output operation lt CommunicationPort gt is a char string which defines the parameters with this following syntax SERIALn speed data parity stop N Physical number or 2 Speed 150 300 600 1200 2400 4800 or 9600 bauds Data 7 or 8 bits Parity E even O odd M mark S space or N without Stop 1 or 2 bits lt Number gt defines the communication canal number used by the functions Dialog 80 160or 640 linked to SERIAL2 SERIAL2 affected to the canal 1 OPEN SERIAL2 9600 8 N 1 As 1 PRINT lt MAIN MENU gt INPUT PRINT CLOSE OR operatorr lt
25. A Supervisor documentation Example Font 4 41x 15 c with text and black background 16x22mm Font 5 16 1 x 40 c with text and white background 3x4mm Font 6 91x 30 c with text and white background 4x7mm Font 7 61 x 20 c with text and white background 12x20mm Font 8 41 x 15 c with text and white background 16x22mm FONT 1 Locate 2 15 Print MODE AUTO 8 14 57 FORMATS Syntax Accepted types Description Remarks Example FORMATS lt Expression gt lt Number gt lt Precision gt lt Car gt lt Sign gt lt LeftAlign gt Expression real Number Precision Byte Car string char Sign LeftAlign Bit This function creates a formatted string The argument lt Expression gt must be a valid numerical expression lt Number gt is the minimum number of characters of the string lt Precision gt is the number of character after the decimal point lt Car gt is the substitution character used to reach this minimum number if it is necessary lt Sign gt indicates if the character or must be added at the beginning of the string lt LeftAlign gt indicates if the string is left aligned a 1 2562 bS FORMATS a 5 2 0 1 as 1 25 8 14 58 FRAC Fractional part Syntax Accepted types Description Remarks Example See also FRAC lt Expression gt lt Expression gt real This function provides the fractional part of the lt Expression gt
26. ARCTAN TAN 8 14 134 SIGNAL Event generation Syntax SIGNAL lt Name gt Description This instruction generates an event R403 120 SERAD S A Supervisor documentation Remarks lt Name gt must be the name used by WAIT EVENT instruction The only first task which was waiting for this event can then continue Example Programl Program2 WAIT EVENT Ready SIGNAL Ready See also WAIT EVENT DIFFUSE 8 14 135 SQR Square root Syntax SQR lt Expression gt Accepted types Expression real Description This function returns the square root of lt Expression gt Example a SQR 2 8 14 136 SPACES Space made string Syntax SPACES lt Number gt Limits Number 1 to 255 Accepted types Number Byte Description This function returns a space made string Example a SPACES 10 Result a See also STR VAL 8 14 137 STR Char characters convert Syntax STR lt Expression gt Accepted types Expression Byte Real Description This function returns a string which represents a numerical expression value Remarks When the numbers are converted in text a head space is always reserved for the sign of lt Expression gt If lt Expression gt is positive the string returned by Str contains a head space and the sign plus is insinuated Warning This function can send back a value according to the notation of type with exponent It s preferable to
27. CTRL C paste CTRL V and cut CTRL X 5 Communication tools the terminal panel command E helps to defines the text on it Th dialog box is defined with the front of the terminal panel selected in the Option menu To generate the code corresponding with the text on the terminal panel display you should choose the Write command To show the result of a part of code you should select some text and the Read command The clear command clears the screen of the terminal panel R403 42 SERAD S A Supervisor documentation amp The edit command helps to define an numeric or alphanumeric edit on a terminal panel amp The format command helps to define the code to format a variable 3 5 2 Ladder task editor Toobar Merm lo _ xT 4h HE Pb lt gt lt gt O 7 c Fk O Cursor E The ladder editor is composed with an editor zone of the ladder program the grid a toolbar of chart that can be inserted and a toolbox A ladder program have lot of rungs limited to 50 in a task Each rungs have an optional comment an expression and 1 to 5 outputs The tool bar can define the type of chart that can be put on the ladder grid To select a chart you just have to click on the button with the wanted chart The ladder grid allows to put different chart and so to define the program A selected case of the ladder grid is indicated with a black background To pu
28. Expression gt Accepted types lt string gt string char of 4 bytes Expression Long integer Description This function MKL convert long integer value in a string of 4 bytes Least significant byte and then most significant byte Example AS MKLS A amp if A amp 66306 then A 2310 See also MKLR CVL CVLR 8 14 91 MKLRS Convert long integer reverse to a string Syntax lt string gt MKLR lt Expression gt Accepted types lt string gt string char of 4 bytes Expression Long integer Description This function MKLR convert long integer value in a string of 4 bytes The most significant word and the least significant word Example AS MKLS A amp if A amp 66305 then A 0132 See also MKLS CVL CVLR 8 14 92 MKIS Convert an integer to a string Syntax lt string gt MKIS lt Variable gt Accepted types lt string gt string char of 2 bytes Variable Integer Description This function MKI convert long integer value in a string of 2 bytes Least significant byte and then most significant byte Example AS MKIS AS if AS 256 then AS 01 See also MKIR CVI CVIR 8 14 93 MKIR Conversion Integer reverse String Syntax lt string gt MKIR lt Variable gt Accepted types lt string gt string char of 2 bytes Variable Integer Description This function MKI convert long integer value in a string of 2 bytes Most significant byte and then least significant byte R403
29. Expression1 gt OR lt Expression2 gt Expression1 Expression2 Bit Byte Integer This function makes a binary OR between two expressions lt Expressionl gt and lt Expression2 gt must have the same type This function returns the same data type as its arguments AS A OR 000FFh AND NOT XOR and IF R403 111 SERAD S A Supervisor documentation 8 14 97 OUT Output writing Syntax OUT lt Output gt lt Expression gt Accepted types Expression Bit Description This function sends a logical state to a digital output Remarks lt Output gt must represent an output name Example OUT Cutter ON See also INP INPB INPW OUTB OUTW 8 14 98 OUTEMPTY Communication output buffer empty Syntax lt Expression gt OUTEMPTY lt Number gt Accepted types lt Expression gt bit Description This function returns communication output buffer state Remarks lt Number gt is number used to open communication port with the OPEN function Example WAIT OUTEMPTY 1 See also CARIN CAROUT 8 14 99 OUTB 8 outputs writing Syntax OUTB lt Outputs gt lt Expression gt Accepted types Expression Byte Description This function sends logical states to a 8 logical outputs block Remarks lt Outputs gt must represent the name of a 8 outputs bloc Example OUTB Bloc1 0Fh See also INP INPB INPW OUT OUTW 8 14 100 PIXEL Draw point Syntax PIXEL X Y Color
30. Result b 65 CHR 8 14 19 ARCTAN Invert tangent Syntax Accepted types Description Remarks Example See also ARCTAN lt Expression gt Byte Integer Long integer real This function returns the arctangent of lt Expression gt lt Expression gt must be a numerical valid expression the function ARCTAN takes the ratio of two sides of a right triangle and returns the corresponding angle The ratio is the length of the side opposite the angle divides by the length of the side adjacent to the angle a ARCTAN 3 pi 4 ARCTAN 1 SIN COS and TAN 8 14 20 BACKLIGHT S640 in stand by Syntax BACKLIGHT lt duration gt Units duration minutes Accepted types duration Integer Description this function defines the duration in minute during the backlight of S640 will stay active if any of the key panel are pressed Remarks When backlight is switched off if a key panel is pressed the backlight is switched on The default duration is equal to 15 minutes Duration 0 backlight switch off 1 gt backlight always switch on Duration gt 1 gt delay in minutes Warning The backlight life duration is about 10 000 hours Example BACKLIGHT 120 the backlight S640 will be switch off R403 9 SERAD S A Supervisor documentation if a key panel is not pressed by the users in the two hours last 8 14 21 BEEP Brief sound Syntax BEEP Description t
31. SETOUT OUTPUTS1 3 2 first outputs card invert 8 14 130 SETTIME Set the hour Syntax SETTIME lt Hours gt lt Minutes gt lt Seconds gt Accepted types lt Hours gt lt Minutes gt and lt Seconds gt Integer Description This instruction set the current hour See also GETTIME SETDATE 8 14 131 SETUPCOUNTER Counter configuration Syntax SETUPCOUNTER lt Counter gt lt Input gt lt Invert gt lt Filter gt Accepted types lt Counter gt 1 or 2 lt Input gt Byte lt Invert gt lt Filter gt bit Description This instruction defines the counter configuration Remarks lt Counter gt Counter number 1 or 2 lt Input gt Input number of the input card lt Inversion gt edge choice 0 for a positive edge 1 for a negative edge lt Filter gt Filter validation 0 without filter 1 for a 2ms filter See also COUNTER S CLEARCOUNTER 8 14 132 SGN Sign Syntax SGN lt Expression gt Accepted types Expression Long integer real Description This function returns a real equal to 1 for the negative numbers 1 for the positive numbers and 0 for the zero number Example a SGN 10 Result a 1 8 14 133 SIN Sine Syntax SIN lt Expression gt Accepted types Expression real Description This instruction returns the sine of lt Expression gt lt Expression gt is expressed in radians Example lt Expression gt must be a numerical expression See also COS
32. This fonction returns a real value b 3 0214 a FRAC b Result a 0 0214 INT 8 14 59 GETDATE Current date Syntax Accepted types Description See also GETDATE lt Year gt lt Month gt lt Day gt lt DayInTheWeek gt lt Year gt lt Month gt lt Day gt lt DayInTheWeek gt Integer This instruction reads the current date GETTIME R403 101 SERAD S A Supervisor documentation 8 14 60 GETEVENT Events reading Syntax Accepted types Description Remarks See also lt Variable gt GETEVENT lt Variable gt Integer This instruction consumes and reads detected events All the event bit are setting if the event is detected If a new event appears during the execution of the event task event is stored and is treated as soon as it is possible MODIFYEVENT 8 14 61 GETTIME Current time Syntax Accepted types Description See also GETTIME lt Hour gt lt Minute gt lt Second gt lt Hour gt lt Minute gt lt Second gt Integer This instruction reads the current time GETDATE 8 14 62 GOTO Branch label Syntax Description Remarks Example See also GOTO lt Label gt Jumps to a label The programs with lots of GOTO instructions can become hard to read and to perfect Use the control structures FOR NEXT REPEAT UNTIL WHILE END WHILE IF THEN ELSE END IF each time it is possible A label is a name f
33. Units X Y pixel Limits X 1 to 240 Y 1to 128 Accepted types X Y byte Color Bit Description This function draws a point at coordinates X Y Remarks Colour define the colour of the point black 0 or white 1 Example PIXEL 23 15 0 Draw a black pixel at coordinates 23 15 8 14 101 PLCINIT PLC function initialisation Syntax PLCINIT lt Input table gt lt Previous input table gt lt Output table gt lt Masked output table gt Description This function indicate to the system the variable table to use R403 112 SERAD S A Supervisor documentation Remark lt Input tablea gt lt Previous input table gt Long integer table with any elements as that the system contained the input cards lt Output table gt lt Masked output table gt Integer table with any elements as the system contained the output cards lt Masked output table gt contained the output masks use by the PLC bit to 1 gt output use by the PLC exemple Masque 1 OFFFFh Masque 2 0FFFFh Picinit Entrees EntreesOld Sorties Masque See also PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 102 PLCINP Read TOR input Syntax PLCINP lt Input gt or PLCINP lt Card number gt lt Input number gt Accepted types lt Input gt Bit lt Card number gt lt Input number gt Byte Description This functionn give the state of PLC TOR input Remarks lt Input gt
34. Y1 Y2 pixel R403 124 SERAD S A Supervisor documentation Limits X1 1 to 240 Y1 Y2 1 to 128 Accepted types X1 Y1 Y2 byte Colour Bit Description This instruction draws a vertical line with its start point in X1 Y1 and its end point in X1 Y2 on the operator panel S640 Remarks Colour defines the colour of the line black 0 or white 1 Example VLINE 10 5 25 0 8 14 151 WAIT EVENT Event waiting Syntax WAIT EVENT lt Name gt Description This instruction allows to the system to wait until an event is received The execution of this instruction launches the execution of the next task Remarks In the WAIT EVENT instruction the following instructions are not executed if the event is not received This instruction provides a passive wait for event Example WHILE Ready False DO END WHILE Active waiting This program is similar to WAIT EVENT Ready Passive waiting See also SIGNAL DIFFUSE WAIT STATE DELAY 8 14 152 WAIT KEY Key waiting Syntax WAIT KEY Description This function waits for a key pressed on the operator panel and record its code in the KEY variable The execution of this instruction launches the execution of the next task Example WAIT KEY IF KEY F1 THEN GOT IF KEY F2 THEN GOT O O 8 14 153 WAIT Condition waiting Syntax WAIT lt Condition gt Description This instruction allows to
35. and can t be written Example WAIT KEY Key waiting IF KEY F1 THEN GOTO IF KEY F2 THEN GOTO 7 2 3 Edit The SUPERVISOR allow via the EDIT function to type a real with or without sign and point displaying it on an exact place on the screen In the instruction s line we choose the number of characters in the real variable the line and row number of the first character we can as well say if yes or no 0 or 1 we use the sign and or the point The syntax is lt Variable gt EDIT lt Line gt lt Row gt lt Length gt lt Sign gt lt Point gt To edit the value we use the numerical keys the DEL keys to clear ENTER to valid and ESC to stop the editing Example EditRes EDIT 1 5 4 0 0 Real four numbers edition without point no sign in line 1 and row 5 If Key ESC Then Goto MainMenu If EditRes lt 10 Or EditRes gt 50 Then Beep Goto MainMenu End If ength EditRes Goto MainMenu The EDIT function have a second syntax This second syntax allows to type access code with an asterisk displaying on a key pressed This mode is indicated by the lt Code gt bit The syntax is lt Variable gt EDIT lt Line gt lt Row gt lt Length gt lt Sign gt lt Point gt lt AccessCode gt EditCode EDIT 1 5 4 0 0 1 Real four numbers edition without point no sign in line 1 and row 5 with the access code mode If Key ESC Then Goto MainMenu I
36. distributed I O PLC PC etc Easy to program using the Windows based application SPL it has a true multi tasking core RAM and FLASH memory a real time clock and up to three serial ports RS232 RS485 CANopen The SUPERVISOR is an open system that is adaptable for all applications that comprise an HMI PLC and serial communication Performance amp 32 bits Processor at 33 MHz Y 4Mbits of non volatile RAM amp 8Mbits of Flash memory 2 serial communication ports 1200 to 9600 b s 20 inputs outputs real time clock amp watch dog backlight amp 8 character sets S640 only tactile effect keyboard Modularity SUPERVISOR have many choice of modules to adapt of your application Digital I O TOR module 20 channels RS232 RS422 and RS485 communication board CANOpen communication board R403 9 SERAD S A Supervisor documentation 1 2 Description of SPL software Generality Supervisor programming language is a user program development with SUPERVISOR running under MICRODOFT WINDOWS environment SPL can manage up to 28 basic or PLC tasks and 20 000 user variables System configuration with graphic tools Easy access to advanced instructions with tool box giving Fastest programming with the PLC tool box On line Help and full screen editor amp Debug mode to test your application with a PC amp Software oscilloscope captured and displayed up to six simultaneous parameters R403
37. eiii 56 Reading the events detected iii iii 57 Clearmg the rt iaa 57 Maia 57 Example ss inner init iia 57 4 3 6 Ladder task structure iia nan KE RR a E a a a i a 58 5 PROGRAMMATION OF RE Giicd sisccccsccteccscesvesssucsiecentessoncensevacessotcosnencseesess ssvesvencstteedsesdedeedsutssassecsesuenecs 59 Dal BOSICAUSK LEE Li ee Rte ATE As TERA PRR EEA RRS 59 3 1 1 Digital mputs outputs ii A ee RA aa ete E See eee ne St 59 AJ Inputs reading ten ln a a ee ee ee ee AE Ne 59 B Outputs WHO Hi ma ner eae RM RL a Eh 59 Outputs readin g lt 2 scccet ack A LA PE nl Be PA Ida 59 D Events Nand ling ii A dt os Re aE ces RA d dci 60 EN State tests sci nin oh ee ae es Se ee Oe A 60 OA 60 AJ Passive A O NR O te 60 Bj Active Wat A lc 60 TIME Re A e nn ne tbe teste tente 60 TIMER ooh costes So cine gests to MUR ER St ne nt nant tte me tt rit te A des 61 SAIS EVENTS Lies a D cee nn R RO ached 61 Signal or Diff scand Watt Event ee da ias aad 61 R403 3 SERAD S A Supervisor documentation 6 AIDES ee es nl E ER AR PU E E nr RI TBE POOLS 62 OA E E AEE A teonesnsas t tons entsena tre otre rie done see etant ete se 8e 23 62 COM SUPA ON 2 hoses EEE A MNT Le en E AA a ne ns ns er na Siecle fi 62 ET a E II A IN de de diet NE id ent 63 Read Pre a E PNR BREED EDs CES ROO OTSE AE AE E E A A 63 5 1 5 Enhanced PLC Function sise cesse 63 AAA Mont he ER ce EU NT ne IS chads ALS EN RR RAR 63 Utilisation du PLE Me mna ed
38. el cg oa iad es bea ited tee a eo a ee PE a ae aha a 138 GANERROR ice sess A A en An A A ON ES 138 CANERRORCOUNTER sine A A gants der A dre gran A dates 138 CANEVENT A a A a dattes a re nd eee 138 GCANEOGAL ne te a Te da ne de Sea dort ee D da de den Rand aah 138 CANopen communication eee 127 CANopen kink between two MCS iii 141 CANopen linking between a MCS and an I OS module oococoonocccccnnocccccononcccnonaonnccnnnnnn cc nano ncnnnnnno 143 CANREMOTE ir a E A donation Lane hed vate due re decia 139 GCANSET UP iis Re mr eel ak een esl ea Da dent eee ieee ia nets 139 GARIN o RL AR AS A E de ne OA eee et 93 CAROD PR D ects hewedeies 93 CASE tien th chica as AE ns hh che aca et na dE IRC E PR in te dt EA tdi 93 Char SUING sortean tina ant rt attirer habiter 83 EharacteristicS viera dadas 130 CHARO E AE ETEEN S ET PENE ladito TEA 94 CEEARGOUNTER e tasado da idad 94 C EARELASE coincida dais 95 C BARIN ass montent a a lid dia ASO A aa 94 ELEAROU Tronas 94 Clock SUb MeNU siii idad ia ardid 80 CLOSE iii bad 95 Close arcommunication port eme pans MR sr E ts ts 70 A ER E E da nn Et en Et A a den de eu A tine AE et A ne 95 COMMU NICAION A a A on a cba dre ren dun den a lists st tr 86 Communication MENU Bocce A de D LT a ana dou tn a tad 28 Compiler error MESSAGES whichis tee lunette tall en 153 CONNECCION Soenna de A Ed Aris 131 144 Contacts coils timers and counters arhan a a a A E A 65 CONTINUE aaa A ed Sara A A de EE 95 96 CONVETS
39. false when the expression is false The state of the coil is true when the Set coil is activated Counters up or down CUP Counter G CON Counter G AST 99999 AST 99999 R403 65 SERAD S A Supervisor documentation The counters up or down have two inputs and an output Each counters up or down is defined with a name and a pre selected value This pre selected value may be a fixed value or a global variable With a global variable you can modify it at any time during the execution When you used a counter up or down you must link the counter output to a coil even if the coil is not used Up counter CUP is the counter up input On a positive edge detected on this input the counter up variable is incremented When the value of the counter up variable is greater or equal to the pre selected value the counter up output is true The RST input has priority When this input is true the counter up variable is initialize to zero At the power on the counter up value is equal to zero Down counter CDN is the counter down input On a negative edge detected on this input the counter down variable is decrements When the value of the counter down variable is lower or equal to zero the counter down output is true The RST input has priority When this input is true the counter down variable is initialize to the pre selected value At the power on the counter up value is equal to the pre selected value The counter up or counter do
40. gt aS Press ENTER to start EnterPos INSTR ENTER a Result EnterPos 7 R403 105 SERAD S A Supervisor documentation See also LEN 8 14 74 INT Integer part Syntax Accepted types Description Remarks Example See also INT lt Expression gt Expression real This function returns the lt Expression gt integer part The argument lt Expression gt must be a valid numerical expression b 25 36 a INT b Result a 25 FRAC 8 14 75 JUMP Branch to label Syntax Description Remarks Example See also JUMP lt Label gt Jumps to a label The programs with lots of GOTO instructions can become hard to read and to perfect Use the control structures FOR NEXT REPEAT UNTIL WHILE END WHILE IF THEN ELSE END IF each time it is possible A label is a name following by character The execution of this instruction doesn t launch the execution of the next task JUMP Begin Begin GOTO FOR REPEAT WHILE IF END 8 14 76 KEY Last pressed key Syntax Description Remarks Example See also KEY This system variable contains the last pressed key This variable must be used after EDIT et WAIT KEY instructions The key variable is local for a task WAIT KEY IF KEY F1 THEN CALL IF KEY F2 THEN CALL IF KEY F3 THEN CALL EDIT WAIT KEY 8 14 77 KEYD
41. gt The observations window show the state of variables in a continuous mode The maximum of variables or parameters to show is limited to 100 Two commands allow user to add or delete a variable The adding command launches the execution of the SUPERVISOR R403 25 SERAD S A Supervisor documentation properties window The variable or parameter must be choose among board global variables or task You can save or load this 40 variables as a file gt The status window shows the state of the SUPERVISOR and the state of the task in a continuous mode SUPERVISOR can be remotely driven with a click on the play or stop icon displayed A click change the icon displayed The tasks can be remotely driven too separately The state of each task may be Stop Start Suspend or Continue The modification of the state is obtained with a click on the state icon of the task The trace row indicates the executed line of a task Before the code trace must be validate the project compiled again and the task sent You can also have a notion of the system s resources used for each task Scope Icon Ex Action This command launches the scope This tool is able to capture all the information of axis board or input output board This tool is able to store six different variables The scope is configured in three parts the visualization screen the acquisition configuration zone and the channels configurati
42. integer esse 97 8 14 42 CVIR Convert string to reverse integer ss 97 8 14 43 CRC CRCI6 viiite eieiei iien i E Een N Ee Een EES EEn iNT E A EE EE enas 97 8 1444 DATES Current Dates scccccscicscessesvessseceessasnscuegesnienscdsnsteugosnstensacnececsesneanessagetecgesnebecsaigeioedesseneesen 97 8 14 45 DELAY Passive waiting 97 8 14 46 DIFFUSE Event generation 98 8 14 47 DIV Integer divide iii added 98 8 14 48 EDIT Editing on operator panel 98 A NN 99 8 14 50 END Block A NN 99 8 14 51 EXIT SUB Subroutine exit iiite iiia iii ii a ieas 99 8 14 52 EXP Exponenti l senecio dida 99 8 14 53 FLASHOK Test flash memory 100 8 14 54 FLASHTORAM Restore saved variables 100 8 14 55 FOR FOR 5 NEXT LOO esses arein aiii iaa 100 8 14 56 FONT Font selected marins ne ld Math desole great 100 PAAS T FORMATS china cessed bated id detente ceeds lean ds des tite Et 101 8 14 58 FRAC Fractional part is soie h de nantes tiza 101 8 14 59 GETDATE Current dictada iaa 101 8 14 60 GETEVENT Events reading 102 8 14 61 GETTIME Current time uti diia abia 102 8 14 62 GOTO Branch label un acid di la HO ds ias 102 8 14 63 HALT Stop ata anadir 102 8 14 64 HLINE Draw horizontal line ss 103 8 14 65 ICALL Calla Sub TOUtME cuenta Ohad ae ay ou denied ot 103 8 14 66 IF Pee Then Eliot ii E EEE ETA EATE me feel die 103 8 14 67 INKEY Read a key on the operator panel ss 104 8 14 68 INP
43. is aaa tdt aiii idas 117 REPEAT sua te fn ne iio tant tn a A san nl tn nt A ten Den M ue tn 118 RESTAR Tomiin mdr Rs An tt ete An dt An a AR eet aed An Mime cs En A LS Ann en 118 R403 159 SERAD S A Supervisor documentation RONE SA iA cae A A a OR et TA 89 RIGHTS RER Re ee 118 RS465 treatments sos A add 70 RTM ed ee Oe te ee ter 118 RON aca 119 S EE A A E E A E A E A nein E E E ee PE 11 HS n AAE NN 74 SDOEVENT insister ATTE TE EE E EDEN E EAE E 140 SDOINDEX wich reits te EEA Maange andi E AEA adi eee dei thn 140 SDOSUBINDEX cocina teehee me nn need iene ald beaten 141 SEEK ii anne tn A nn tar ne aad E 119 SETDA TE A ne nn ann ne a en ee E 119 S TINP nn A A ne iad eel de rene mn deat 119 SET OU Tin A ne nn E ane id nn ae 119 SETTIME 00d ne ne nl re ii E ee oe RON nant 120 SETUPCA Nucia ias arias beduetabiatleces trade estates 141 SETURCOUNTER cuca iaa EE toria 120 ON 120 SIGNAL uote tii leidas Ed 121 SIN nette Ne Net tent es E tica drenan pened 120 SPACE Snes nl lila tl l tite ne 121 SGU aeae E tddi dolar 121 State NR 60 A NN 121 STOPGAN tesina ratita ipod baratas enfe 141 O 121 STRING Sita tent net ndlr cuis ue ai Mi fe 122 SUB one A nine a en de eed tapi A nn ere dun 122 SUDBSITACLION P E co AS awe id 87 SUSPEND E E T a AeA Ae an a Guim tnt Aine aut 122 SM DIS Se Aine Reda aan nano aan E nn ana at 67 T ANS Ror Deere ee nr Re A me dida 123 Task architecture ann ser AAA san Base ma dal esac a aea o BARS 67 FasKh
44. is already known when writing your program it is recommended to use the FOR loop structure in other case WHILE or REPEAT structures can be used FOR instruction FOR instruction allows the repeated execution of one or more instructions in accordance to a control variable increment or decrement FOR instruction syntax is described below FOR lt Counter gt lt Start gt TO lt End gt STEP lt Increment gt lt Instructions gt NEXT lt Counter gt lt Counter gt must be a local byte integer or long integer variable lt Start gt lt End gt and lt Step gt are lt counter gt type compatible expressions lt Start gt lt End gt and lt Step gt expressions are computed only one time before starting loop lt Counter gt is affected to lt Start gt value at the beginning At each loop lt Step gt value is added to lt Counter gt and if lt Counter gt is greater than lt End gt then loop is stopped For example FOR a 0 TO 15 OUT 101 l lt lt a NEXT as At each execution of NEXT instruction the multitask kernel launches the next task WHILE instruction R403 55 SERAD S A Supervisor documentation WHILE instruction allows the repeated execution of one or more instructions in accordance to an expression value WHILE instruction syntax is described below WHILE lt Expression gt DO END WHILE lt Instructions gt In this instruction if lt Expression gt is f
45. is set when the event is detected If an event appears during the execution of the event task it is stored and treated as possible Clearing the events The clearing of events is obtained with MODIFYEVENT 0 0 instruction Warnings The RUN HALT SUSPEND CONTINUE STATUS instructions didn t have any effects on event task This task don t give the hand to the other task So it must be a short task with no locked instructions ex WAIT This task mustn t have branch The END PROG instruction must appear at the end of the task to launch the event detection again If the MODIFYEVENT instruction is used in an event task a new detected event can be changed Example Init T che Task PROG ODIFYEVENT 0183H 1000 events El E2 1s time base ope Capturel on axis board 1 END PROG EVENEM PROG EventS GETEVENT IF Event 1 1 THEN v nement El END IF IF Event 2 1 THEN v nement E2 R403 57 SERAD S A Supervisor documentation END IF IF Event 8 1 THEN v nement base de temps END IF IF Event S 9 1 THEN v nement capture 1 capturel relance la capture END IF END PROG 4 3 6 Ladder task structure It s a chart form which is composed with rungs Each rungs can contain contacts coils counters and timers Free contact or free coil can also be added to the ladder
46. lt Board gt must be a CANopen board lt Index gt and lt Sub Index gt must refer to elements of the dictionary 9 3 8 CANREMOTE Read or write a remote variable Syntax 1 Syntax 2 CANREMOTE lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANREMOTE lt Board gt lt Index gt lt Sub Index gt CANREMOTE lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANREMOTE lt Board gt lt Index gt lt Sub Index gt CANREMOTE amp lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANREMOTE amp lt Board gt lt Index gt lt Sub Index gt lt Index gt from 0000h to FFFFh lt Sub index gt from 00h to FFh Syntax l and 2 lt Variable gt lt Expression gt from 00h to FFh R403 139 SERAD S A Supervisor documentation Syntax 3 and 4 lt Variable gt lt Expression gt from 0000h to FFFFh Syntax 5 and 6 lt Variable gt lt Expression gt 7FFFFFFFh Accepted types Syntax 1 and 2 lt Expression gt lt Variable gt Byte Syntax 3 and 4 lt Expression gt lt Variable gt Integer Syntax 5 and 6 lt Expression gt lt Variable gt Long integer Description This function reads or writes a remote variable in the dictionary of the SUPERVISOR CANopen board Remarks lt Board gt must be a CANopen board lt Index gt and lt Sub Index gt must refer
47. lt Invert gt lt Filter gt bit Description This instruction defines the counter configuration Remarks lt Counter gt Counter number 1 or 2 lt Input gt Input number of the input card lt Inversion gt edge choice 0 for a positive edge 1 for a negative edge lt DesactivateFilter gt 1 without filter O for a 2ms filter If the filter isn t activating the maximum frequency is 1 5 KHz Else the maximum frequency is 200 Hz Clear CLEARCOUNTER instruction initializes the counter to zero Syntax CLEARCOUNTER lt Counter gt Accepted types lt Counter gt Byte Description This instruction initialise the counter to zero Remarks lt Counter gt Counter number 1 or 2 Read 5 1 COUNTER S allows the reading of the counter Syntax lt Variable gt COUNTER_S lt Counter gt Accepted types lt Variable gt Integer lt Counter gt Byte Description This instruction reads the counter Remarks lt Counter gt Counter number 1 or 2 5 Enhanced PLC Function Pr sentation The PLC functions Enhanced PLC allow to integrate the functioning of a PLC ina multitasks basic program Like this we warrant that the I O used in this tasks are handle as a PLC The inputs are memorised in bit s copy before to be treated the ouputs to modify are memorised before to be update Utilisation du PLC The PLC use tables to memorize the status of I O Two tables of long integer for inputs and two tables
48. produced with the REALTOLONG function if the real number is to big to be stored in long integer R403 152 SERAD S A Supervisor documentation l a ERROR N 35 This error is generated by an arithmetical overflow in a calculus This is produced when the result of an operation is too great to be stocked in the provided variable receiving it IM IL HL error Ness This error is generated because an index of save variable s table is out of limites _ ERROR N 37 This error is generated because an index of not save variable s table is out of limites IZIZ NI l l _ _ ERROR N 520 This error is generated because it s unable to access to internal global bus The internal bus is bad defect _ ERROR N 530 This error is generated because it s unable to access to internal global bus The internal bus is bad defect These last five errors are generated only during user program execution When an error is detected all the task are stopped the error message is displayed on the SUPERVISOR screen the watchdog is opened and all the servo axis are in a open loop state 11 2 Compiler error messages Find lt Typel gt lt Text1 gt lt Type2 gt lt Text2 gt Expected An identifier lt Text1 gt of type lt Typel gt has been found at the time of the compilation instead of an identifier lt Text2 gt of type lt Type2 gt amp L or H expected To change an integer in Byte we must use
49. tS reading ins Me treo rere paie ne died ne Mid mdr A 59 INP Wi ee nn ne ns tee De mamans mm den nee Mean nine is 105 Installation procedure iis 428 pee lit id AA Eta dali 15 INSTR 33d cr dls pi nd tar dit teens fdo ate 105 Nica tn dit Vitis cece tains 106 INTOdUCION ra a eae et ee a ence 68 127 J JIM Ri rene A ee et ane dit inner ee 106 K KEV ireo Orr te TS Peer rp or do nan Pere ere tee eT Perr ati rere 106 KG DOAN tt nn talar metro ere mana en dune nals rio 75 KEDE a ieee dm T rere td de FD 107 K VR P ATE RSR RS e asta a der cnn ene aA soe ee eet 107 L L ASES 245 than A ee ee ead eR eo a ee b s 107 LE Digit eat tact Merete ie eh A AA E tae Ae eee A A ae ee ee 107 ETa AA ain ae dae ea a es eds ee 76 Left Shit saine e ed e ei tien aa es dae eee eee as Le a 88 LEET rar nn nan AAA edna aed eat te 107 A N crete Monnaie e he eh td al te meio bin 108 Link establishMentecichicitei eon Miettinen etait ete led ntl cd te 145 List of the CANopen instructions nn nn cnn a E a a nn annnnn 137 List of the validated modems 151 Lotal Variables A A as a aetna alii tin goa hey 47 LOCATE ket estat let dea tet adn cites lites e el cute e ld dea a ndo ty ie 108 LOG EAN EE de tet ss te easter olin Re ce nee de Silica a Wetec eda 108 A tn ne nn nn den ne A tr tenets 83 LONGTOINT GER ne ten a Men a ae ne rs 108 LOOPS EE cn Re ne tr iad ete teeta de ae tae eee tea aes etalon alee re E vin 83
50. task At the compile phase the ladder task is translated in a basic task This basic task can be displayed on a windows editor file LadderTaskName tsk R403 58 SERAD S A Supervisor documentation 5 PROGRAMMATION OF PLC 5 1 Basic task 5 1 1 Digital inputs outputs A Inputs reading The INP function is used to read 1 bit INPB a 8 bits bloc and INPW a 16 bits bloc The syntax are INP lt Digital inputs gt INPB lt Digital inputs gt INPW lt Digital inputs gt lt Digital inputs gt must represent a valid digital input identifier of 1 8 or 16 bits This identifier can be either a symbolic name used in the setup module or the hardware name of the bloc The return data type is Bit for 1 input bloc Byte for 8 inputs bloc Integer for 16 inputs bloc For example A INP Sensor input reading B1 INPB Blocl First bloc of eight input reading B2 INPB Bloc2 Second bloc of eight input reading C INPW A Bloc of sixteen input reading B Outputs writing The OUT function is used to write 1 bit OUTB is used to write a 8 bits bloc and OUTW is used to write a 16 bits bloc The syntax are OUT lt Digital outputs gt OUTB lt Digital outputs gt OUTW lt Digital outputs gt lt Digital outputs gt must represent a valid digital output identifier of 1 8 16 bits This identifier can be either a symbolic name used in the setup module or the hardware name of the bloc The return data type is
51. variables The syntax 3 and 4 are giving an access to a table of 16 bits non signed variables The syntax 5 and 6 are giving an access to a table of 32 bits signed variables lt Board gt must be a CANopen board lt Index gt must refers to a local variable of the dictionary 9 3 7 CANSETUP Read or write a parameter Syntax 1 Syntax 2 Accepted types Description Remark CANSETUP lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANSETUP lt Board gt lt Index gt lt Sub Index gt CANSETUP lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANSETUP lt Board gt lt Index gt lt Sub Index gt CANSETUP amp lt Board gt lt Index gt lt Sub Index gt lt Expression gt lt Variable gt CANSETUP amp lt Board gt lt Index gt lt Sub Index gt lt Index gt from 0000h to FFFFh lt Sub index gt from 00h to FFh Syntax 1 and 2 lt Variable gt lt Expression gt from 00h to FFh Syntax 3 and 4 lt Variable gt lt Expression gt from 0000h to FFFFh Syntax 5 and 6 lt Variable gt lt Expression gt 7FFFFFFFh Syntax l and 2 lt Expression gt lt Variable gt byte Syntax 3 and 4 lt Expression gt lt Variable gt Integer Syntax 5 and 6 lt Expression gt lt Variable gt Long integer This function reads or writes data in the SUPERVISOR CANopen board dictionary
52. 1 12 98 10 42 Normal Initialisation axes sor HELP_T 13 10 98 17 Normal NAVIG T 20 10 98 04 Normal DIALOG_T 20 10 98 04 Normal POLICE T 14 10 98 07 24 Normal AF_ORIG 13 10 98 17 48 Normal AF CYCLE 13 10 98 30 Normal ARBRE T 14 10 98 28 Normal CAME 09 12 98 229s Normal CYCLE_T 14 10 98 08 28 Normal ENTSORT 13 10 98 241 Normal LEDS_T 13 10 98 41 Normal ORIG T 28 10 98 19 56 Normal SYNC T 14 10 98 08 31 Normal AF SYNC 14 10 98 10 Normal Setup Global constants Global variables A constants Global variables Tasks In the Tasks tab all the tasks with their features name date of creation type of startup and comments are summarized In this tab we can add modify delete or show a task The Add Modify Delete or Show command need the compilation of the tasks again and a sending tasks to be done The Add command defines a new task in the project A task have different features priority normal or high type basic or ladder startup type manual automatic event and an optional comments The type of the task defines the editor type of the task R403 _ 40 SERAD S A Supervisor documentation Name PLC Task name Level of priority Normal or High Task type Basic or Ladder Start mode Automatic manual or event Priorit EErEE Type Start Automatic Gestion DCY J OK x Cancel Help The Add a tas
53. 1 gt lt Expression2 gt Accepted types Byte Integer Long integer or real Description This operator multiply lt Expression1 gt by lt Expression2 gt and return a value type identical as its operand Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt et lt Expression2 gt must have the same type Example a 10 5 cs as bS Result c 50 See also and 8 14 4 Division Syntax lt Expression1 gt lt Expression2 gt Accepted types Byte Integer Long integer or real Description This operator divide lt Expression1 gt by lt Expression2 gt R403 87 SERAD S A Supervisor documentation Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt et lt Expression2 gt must have the same type lt Expression2 gt must be different of zero This operator always return a real value Example a 10 bS 5 c a b Result c 2 0 See also 1 11 and DIV 8 14 5 Lower lt Syntax lt Expression1 gt lt lt Expression2 gt Accepted types Byte Integer Long integer real or Char string Description This operator tests if lt Expression1 gt is lower than lt Expression2 gt Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type Example a 10 IF b lt
54. 4 156 XOR Exclusive OR operator Syntax Accepted types Description Remarks Example See also lt Expression1 gt XOR lt Expression2 gt Expression1 Expression2 Bit Byte Integer This function makes a Exclusive Or between the expressions lt Expressionl gt and lt Expression2 gt must represent a bit a byte or an integer lt Expressionl gt and lt Expression2 gt must have the same data type This function returns the data type of lt Expression1 gt IF A XOR OFFOOh THEN AND OR NOT IF R403 126 SERAD S A Supervisor documentation 9 CANopen 9 1 Definition 9 1 1 Introduction The CAN bus Controller Area Network appeared in the middle of the 80ies as an answer for the data transmission in the automotive fields This kind of bus can have transmission speeds up to 1 Mb s The CAN specifications are defining 3 layers among the ISO OSI model the physical one the data linking one and the application one The physical layer defines the data transmission mode regarding the transmission support The data linking layer is the nucleus of the CAN protocol because it deals with the frame to send the arbitrage the defaults detection etc The last layer is also called CAL CAN Application Layer It is a general description of the language for the CAN networks which offers many communication services CANopen is a type of network based on the serial bus system and the application
55. 485 mode all sent characters are also received TX485 1 10 8 14 147 UCASES Uppercase Syntax Accepted types Description Remarks Example See also UCASES lt Expression gt Expression Char string This function returns a string in which all the letters of the argument have been converted in uppercases The argument lt Expression gt must be a char string Only the lowercases letters are converted in uppercases the other letters are not modified a Sensorl b UCASES a Result b SENSOR1 LCASE 8 14 148 VAL Convert a string in numeric Syntax Accepted types Description Remarks Example See also VAL lt Expression gt Expression Char string This function returns the numerical value of the string lt Expression gt The argument lt Expression gt is a char string which can be interpreted as a numerical value The VAL function stops reading the string when the first character is not known VAL doesn t know as well the spaces tabulations and line jumps The VAL function always returns a real data type aS 10 b VAL a Result b 10 STR 8 14 149 VERSION Operating system version Syntax lt Variable gt VERSION Accepted type Variable chaine de caract res Description This function return a string with the version of the operating system 8 14 150 VLINE Draw a vertical line Syntax Units VLINE X1 Y1 Y2 color X1
56. 8 1 Logical inputs outputs INP INPB INPW OUT OUTB PLCINIT PLCINP PLCINPB PLCINPNE PLCINPPE PLCINPW PLCOUT PLCOUTB PLCOUTW PLCREADINPUTS PLCWRITEOUTPUTS SETINP SETOUT WAIT 8 8 2 Timing DATE DELAY GETDATE GETTIME SETDATE SETTIME TIME TIMER TIME 8 8 3 Event handling DIFFUSE GETEVENT MODIFYEVENT Create a string Uppercase Convert string to numeric 1 digital input reading 8 digital inputs reading 16 digital inputs reading 1 digital output writing 8 digital outputs writing PLC function initialisation Read TOR input Read a 8 inputs block Read a negative edge on PLC TOR input Read a positive edge on PLC TOR input Read a 16 inputs block Write a output Write a 8 outputs block Write a 16 outputs block Read the PLC inputs Write the PLC outputs Inputs filter and invert Outputs invert Condition waiting Current date in string Passive wait Current date Current time Set date Set time Global time base Global wide time base Current time in string Send event Read event Event configuration R403 _ 84 SERAD S A Supervisor documentation SIGNAL WAIT EVENT 8 8 4 Counter CLEARCOUNTER COUNTER S SETUPCOUNTER 8 9 Display Keyboard 8 9 1 Supervisor 80 and 640 BEEP BUZZER CLS CURSOR EDIT EDIT KEY KEYDELAY KEYREPEAT LED LOCATE PRINT READKEY WAIT KEY 8 9 2 Supervisor 640 BACKLIGHT BOX FONT HLINE PIXEL VLINE 8 10 Task handling
57. APPENDIX 11 1 Execution errors messages _ _ _ ERROR N 1 to ERROR N 10 The errors from 1 to 10 indicate that a card is not well declared or a declared card in the configuration is away or has been replaced by an other type The number following the E indicates the slot For example E6 indicates that the card in the slot 6 is not well declared The system doesn t use the parameters and doesn t start user tasks NI _ l _ ERROR N 20 The error 20 indicates that the data in the saved memory have been corrupted and it is necessary to reload the configuration and the saved variables The system doesn t use the parameters and doesn t start user tasks I ee L BE ERROR N 21 The error 21 appears under SUPERVISOR power on if a parameter of the configuration is wrong The parameters must be marked and send before starting once again the SUPERVISOR The system doesn t start the user tasks i a l ERROR N 23 The error 23 indicates that there are no user tasks in the SUPERVISOR NI l _ ERROR N 30 When a user program makes a divide by zero error n 30 is displayed L ERROR N 31 This error is due to an infinite recursive call of a subprogram and indicates a stack overflow L L ERROR N 32 This error is generated when a floating point overflow is made by a number too high _111 _ ERROR N 34 When an invalid floating point operation has been detected this error is generated It is
58. ATION OF DISPLAY KEYBOARD 7 1 Supervisor description 7 1 1 Supervisor 640 Screen LCD display with CFL backlight Display area 122x66 mm Characters attributes normal reverse blinking ASCII protocol Resolution in graphic mode 240x128 pixels 4 simultaneous sizes of characters in text mode gt 3x4 mm 16 lines x 40 characters gt 4x7 mm 9 lines x 30 characters gt 5x8 mm 8 lines x 26 characters gt 7x10mm 6 lines x 17 characters Keypad 33 keys with tactile feedback 6 dynamic function keys 6 rewriteable function keys with integrated leds Control and scrolling keys Help and alarm keys Numeric and alphanumeric keys amp Buzzer 7 1 2 Supervisor 80 Screen 4x20 Characters LCD display with backlight Display area 74x23 mm Characters attributes normal blinking amp ASCII protocolKeyboard 28 keys with tactile feedback 4 dynamic function keys 6 rewriteable function keys with integrated leds Control and scrolling keys R403 73 SERAD S A Supervisor documentation Help and alarm keys Numeric and alphanumeric keypad Buzzer 7 2 Operator functions 7 2 1 Screen Four functions give the access of the operator panel screen The CLS function clears the screen The syntax of this function is CLS This instruction have specific extensions CLS B clear the screen with a black background CLS W clear the screen with a white background To display
59. CS Syntax CALL VARIABMCS 1 Ho Keys F1 Variable number F3 Read FS Real time read Byte 127 TYPE READ WRITE F2 Variable type F4 Write F6 Stop to read Manual 000000000000 Variables START R403 290 SERAD S A Supervisor documentation 4 Next variable Previous Variable ESC Exit menu or return in main menu 7 4 6 Memory sub menu Main menu MEMMCS Syntax CALL MEMMCS Flash contain no data Data ok on poweron Battery ok BACKUP RESTOR ERASE RESTART VALID Keys F1 Backup data in flash F2 Restore dat a from flash F3 Clear data in flash F4 Restart SUPERVISOR F6 Valid data in memory ESC Exit menu or return in main menu 7 4 7 Clock sub menu Main menu TASKMCS Syntax CALL TASKMCS 8 17 52 27 6 HOUR MINUTE SECOND DAY MONTH Keys F1 Next page F2 Previous page ESC Exit menu or return in main menu 2002 TEAR R403 80 SERAD S A Supervisor documentation 7 4 8 Tasks sub menu Main menu TASKMCS Syntax CALL TASKMCS Task Task Task Task Task Task Task Task ON te oo Po FAGE PAGE Keys F1 Previous page ESC Exit menu or return in main menu E E E F2 Next page Stopped Stopped Stopped Stopped Stopped Stopped Stopped Stopped R403 81 SERAD S A Supervisor documentation 8 OPERATOR AND INSTRUCTIONS LIST 8 1 Program CALL ICALL END
60. E EEE IEEE RE EE 90 82 T4217 ARCSIN Invert Mi a EE EIKE EEEE EE 90 8 14 18 ASC Convert char to ASCII nee eee 91 8214 19 ARCTAN IN TN 91 8 14 20 BACKLIGHT S640 in stand by seen 91 8 14 21 BEEP Brief Us 92 8 14 22 BOX Draw DOX penitentes a a a ahs te ner dt rss sion st Med te Mist 92 8 14 23 BUZZER Continuous Sound sisia en eer e e a e aves 92 8 14 24 CALI Subroutine Call 26s entente trio Aaa Westone 93 8 14 25 CASE Multiple tests 2e ins tte ets iss 93 8 14 26 CARIN Input buffer state secs stat tentent mate he resident rare ips 93 8 14 27 CAROUT Output buffer state 93 8 14 28 CHR Convert ASCII to char inner 94 8 14 29 CLEARCOUNTER Counter clear 94 8 14 30 CLEARIN Clear input buffer sise 94 8 14 31 CLEAROUT Clear output buffer sise 94 8 14 32 CLOSE Close communication port 95 814 339 CLS Clear s reen 20m A A Ne ME RS taie tees PE 95 8 14 34 CLEARFLASH Clear flash memory 95 R403 5 SERAD S A Supervisor documentation 8 14 35 COUNTER S Counter reading sus 95 8 14 36 CONTINUE Continue task execution sise 95 E NI nr tiennent tete teen tete late ds 96 8 14 38 CURSOR Print or clear the cursor seen 96 8 14 39 CVL Convert string to long integer siens 96 8 14 40 CVLR Convert string to long reverse integer cecceceeseeeseesceeeeeeseeeeeeeceseeeeneeeeeeeesseeseeses 96 8 14 41 CVI Convert string to
61. ELAY Delay before key repeat Syntax Units Accepted types Description Remarks KEYDELAY lt Expression gt Expression 1 32 of second Expression Byte This instruction defines the delay before the automatic repetition of a key when this is pressed The default value is 1 second 32 R403 106 SERAD S A Supervisor documentation Example See also KEYDELAY 10 KEYREPEAT 8 14 78 KEYREPEAT Keyrepeat period Syntax Units Accepted types Description Remarks Example See also KEYREPEAT lt Expression gt Expression 1 32 of second Expression Byte This instruction defines the delay which separates each automatic key repetition when this is pressed The default value is 0 3 second 10 KEYREPEAT 5 KEYDELAY 8 14 79 LCASES Lowercases Syntax Accepted types Description Remarks Example See also lt Expression gt LCASE lt String gt String Char string This function returns a string in all the letters of the argument have been converted in lowercases The argument lt Expression gt must be a char string Only the uppercases are converted in lowercases the other letters are not modified a Sensorl bS LCASES a Result b sensorl UCASE 8 14 80 LED Driving LEDs Syntax Accepted types Description Remarks Example LED Number State State bit Th
62. ION rr dt bn 86 Convert datatypes cada ae a a nee ae dades 48 R403 156 SERAD S A Supervisor documentation COS aka Ae Ae eRe bl E RS O SR RS ARS OE 96 COUNTER Si A aa addon 95 Colmena nt aca 62 RG ees E Pare Boe eee ee a oak ets ee ite cit ace A eal eM Re Ae re et 97 CURSORS LUE a A ae NaS 96 ON RE EP D A E E aca es 97 ON RD ooo toda li 97 DEA a o A a 96 CV Reo aces seas me o a e o a nt earth Getty saa 96 D DATES nues man A RU Di oR Ce ah ee co es tates 97 Debug MU cinc Et rate A gate elie ar ti ta 22 DELAY AT e oR PR ed den a dr De dde dr desde de IT dre 97 98 Description eies a Adele ie ed ded ei de De era tel ee AR ee EE ee 45 Dialog 640 uni A en de rene der arene i ieee 76 DICO Vitis AU dt ne a ie edi gestae 134 Diff rents E SETE RM ue datada aia ba 88 DIFFUSE iessmiantinninentes ia 98 DIV eme nt Es An dada A ent AA AE Re Pi nn at fin ida 98 DIVISION uti ia te TR ns tes TE cath EURE ita 87 E Edic aa tt nn Sos tn A a Aa eels 75 76 EDIT sine A A Ada DAS 98 EDIN E emer ete RE PO Ve AE eu re 99 ENDS ima nette gab a tee dt bat cea eats td o vid 99 Environmental consideration sise 11 Eventitasi StruCture vinane a At dde 56 VOI cad a A A dca ad RA aida 61 Events handlings sneren daa o dae 60 Example RTU Modbus driver sise 70 Execution errors messages rare nt Re nn Age ae dee Meee eee 152 EX I SWB tris vo eck Sects ae aes tod nes th oe testes a een tein tee Sarat io eee ahh 99 EXP nimes nn rad ot Raa sara test aa
63. IONS sul A LR es As TR dr AR US RUE NE NES teen on Medes 74 SA ee eee 74 DDD ds e E E E ES E EE EEEE EE as qt 75 TED A A A A AE ALU ne et nt ote as Da he 75 ED AS BUZZ rss ren neo ete tension ere te arr ere ee nn Cen eB URS ese men e tete esac iui Cicer vec Ee 76 12259 Bali A A wn maire ann tete eut he 76 J 20a LEd ns une UN Rene ete dl 76 72 NR RN 76 4 31 SUPERVISOR Key it A ES eke sk eR 76 TA IMC AIS CN US PR nr nd it mn de 77 TAT Gen raliexplica OS ii ede ee a Ba ed 77 7 4 2 Main EA D it oe Oe SRE a sn Le 77 7 4 3 Parameters SUDAN 1 5 5 de ticas 78 7 44 Manual SUD iii didas 79 TAS Variables SUb MeNU tie 79 12426 Memory sub menu ii cece ede ba hee A ow da es ee eh ae 80 T2A 7 CloCK SUD MENU ii 80 7 4 8 Tasks UD Me id de ce eden teat seeds oes Ph A Et a tic 81 OPERATOR AND INSTRUCTIONS LIST ccccssscosscesssscesccessccesccesssccesccecssccesccecscccesccecseceesececssecesee 82 R403 4 SERAD S A Supervisor documentation OLOR Es pere ne ANR ee fo Ath es idoles bin E ER dei cada RAI DS d 82 8 2sArithmetica Lister dattes taf da dirt fe 82 SIMA A a te in idee 82 S A TOONS ie tbs Sn tn Ai 83 aE EM LODICAL EE A A A AS 83 SO Teens teur r a rh hs tee dde ee Rd ee A te nt MT SE ter Cr Fa dame Od n 83 ST Char SNE AA A A a a e SS 83 NN NN 84 8 8 1 o0sicaliriputs OUtpUtS ii dd 84 8 92 TIMIN ashes esc e PR a red dr cad E ede ae Dn A eT eee 84 8 8 3 Event handling nent leech ces di hante bea de or seeds des odessa d
64. Input reading 252 A ath Gyan eh KE EE EEE AE man E niet 104 8 14 69 INPB 8 digital inputs reading ss 104 8 14 70 INPUT Data reading sin dressent ae une ate siete ath dette EE 104 8 14 71 INPUTS Char string reading iii 105 8 14 72 INPW 16 digital inputs reading ses 105 8 14 73 INSTR Search a sub string ss 105 8 14 74 INT OEP nee ins ardt ne entente nt vs 106 8 14 75 J MP Branchto lado luisa menti rs 106 8 14 76 KEY Last pressed key sise 106 8 14 77 KEYDELAY Delay before key repeat ss 106 8 14 78 KEYREPEAT Keyrepeat period ses 107 8 14 79 LCASES Lowercase ner 107 8 14 80 LED Driving LEDS ea n A A E a a a 107 8 14 81 LEFTS String left part serrer 107 814 827 LEN String lengths a a a a citer e rent le titine 108 8 14 83 LOCATE Cursor position 108 8214 842 LOG Logan a e e a Ales tannins 108 8 14 85 LONGTOINTEGER Convert a long integer to integer 108 8 14 86 LTRIMS Suppress the left spaces 108 8 14 87 MIDS String pario ninia nica iaa ca iaa adecco 109 8 14 88 MOD Modulus ssissininsineninrininenrnrninenaaientintiit etienne 109 8 14 89 MODIFYEVENT Events configuration 109 8 14 90 MKLS Convert long integer to string 110 8 14 91 MKLRS Convert long integer reverse to a string 110 8 14 92 MKIS Convert an integer to a string 110 8 14 93 MKIRS Conversion Integer reverse String 110 8 14 94 NOT
65. LOWER tide esters ante aceite ale eon tn ole MR ne de ne 88 Lower or i F EEA A en Mer a ete andi Ll ee 88 LF RIMS RS Mn min cia et Met a ra er nn Athen eB 108 M Mal MENU a een armani hie ans een ne EET a Ta until 77 Management or tasks Arri rnan ananta aa a fee ante ida EARRAS Ah ne RR reader ed ua Aos 50 Manual sub menu for digital inputs ss 79 Mathematical drea eh anea Ii db aided ln eda ap aR 82 Memory pranoi MESS EX tiennent A Gate evi ei Aenean eee 45 Meman SUD MU dia 80 MIDS Stas ek a e o da a o th ro 109 MKIDizs uns Ra e o o o ls ee 110 R403 158 SERAD S A Supervisor documentation MKIRG a Ret es mute eo da es Msn eke Ae Ot te Ot acto st ar 110 MWK Ecce po a te Ee hk Ne Oe al ee E ok co hs eR tite Os 110 A RES al ee a ae ial cn eee ee es ee E NS 110 MODES a o nd rary en ree ee a Toray errr een he 109 MODIRY EVEN detrei ee al eae Mh SR ct tea casa duchies testa Rene re ed AA de 109 MUI PIG Atl OM ota ata aa a dace SN dado 87 MultitaskK PrINCIples lt 0 id 49 N Network Configuration nan baaa 129 NO Toate A Er A A Maasai a eee 111 Numeric notations shine ein A el eae a ee i eed d 49 O OPEN nats ne eet a e et do edo 111 Opening a communication port sise 68 OPTIONS MENU A tev cachet AE edad a dain eae 31 OR LR A An i ee ne ta ee ls an ie nn er An re 111 OUT sn th tie a eich a Mahle ee a tak 112 O UTB attente deat vas ad ete ete NET ete sa hms Soin ie Aad ees sae oleh tan eld id 112 OUTEMPUY ns stats a o e
66. NT Writing on a communication port Syntax PRINT lt Number gt lt Expression gt lt Expression gt j Description Writes data on a communication port Remarks lt Number gt is the number used to open the communication port with the OPEN instruction A semicolon at the end of this instruction means that the previous character is printed immediately after the last character A comma means that the next character is printed at the next line by adding a line feed Print is equal to Print 1 If a real expression is printed then decimal part is not printed and Format function must be used if the transmit buffer is full the task is blocked and continues when a place in the transmit buffer is liberated Example PRINT 1 A B PRINT LENGTH See also OPEN PRINT CLOSE 8 14 114 PROG Program start Syntax PROG Description This keyword begins a main program bloc It is as well used to identify the end of the main program block when it is preceded by END lt Name gt is optional Remarks One and only one PROG END PROG bloc must be defined in a program Example PROG END PROG See also END 8 14 115 RAMOK Test ram status Syntax RAMOK Description This function indicates if at the last start up of the SUPERVISOR the RAM data checksum was valid Remarks If RAMOK 1 start up valid If RAMOK 0 and data flash copy zone is not blank the SUPERVISOR backups the data flash zo
67. NbBus A2 AdresseModbus NombreModbus If A1 gt A2 Then Jump ErreurAdresse If NumFonction 16 Then Jump WriteWord R403 71 SERAD S A Supervisor documentation reading words ReadWord If NumSUPERVISOR lt gt NumeroSUPERVISOR Then Jump ErreurLiaison Txd S T 1 A AdrBus AdresseModbus 1 ReadWordBcl Txd Txd Mkir TableModbus A AS AS 1 I I 1 If I lt NbrBus Then Jump ReadWordBcl Txd Chr Len Txd Txd CmtMessages CmtMessages 1 Jump MessageTxd Write Words 1 WriteWord I 1 J 0 AS AdrBus AdresseModbus 1 WriteWordBcl TableModbus A Cvir Mid Rxd 8 J 2 AS AS 1 I I 1 J J 2 If I lt NbrBus Then Jump WriteWordBcl Txd Mid Rxd 3 4 CmtMessage amp CmtMessage 1 Jump MessageTxd TRANSMIT Erreurs ErreurLiaison ErrLiaison ErrLiaison l Jump InitRxd rreurAdresse NumFonction NumFonction 128 TxdS Chr 2 ErrAdresse ErrAdresse amp tl Jump MessageTxd rreurData NumFonction NumFonction 128 TxdS Chr 3 ErrData amp ErrData amp tl Send message MessageTxd Clearin 2 clear rxd buffer If NumSUPERVISOR 0 Then Jump InitRxd Txd Chr NumSUPERVISOR ChrS NumFonction Txd Sum Crc Txd Print 2 Txd MkiS Sum Jump InitRxd 1 ti ti End Prog R403 72 SERAD S A Supervisor documentation 7 PROGRAMM
68. PDO COB ID utilis par le PDO Type de la r ception param tre de r ception du 2 me PDO COB ID utilis par le PDO Type de la r ception param tre de r ception du 3 me PDO COB ID utilis par le PDO Type de la r ception param tre de r ception du 4 me PDO COB ID utilis par le PDO Type de la r ception param tre de r ception du 5 me PDO COB ID utilis par le PDO Type de la r ception param tre de r ception du 6 me PDO R403 135 SERAD S A Supervisor documentation 32 bit COB ID aes aucune COB ID utilis par le PDO 8 bit Transmission type Sane 254 Type de la r ception Nluitab rorelements 8 bits non 2 param tre de r ception du sign 7 me PDO COB ID Fee non aucune COB ID utilis par le PDO sign Transmission type pay 254 Type de la r ception 1 1800 1801 BE 1802 1803 1804 1805 1806 N o Number of elements ne sign 5 8 bits non param tre de r ception du 8 me PDO 32 bits n COB ID a aucune COB ID utilis par le PDO sign 8 bits Transmission type 7 254 Type de la r ception sign 5 N 2 Number of elements API non 2 2 o COB ID Fe ous non 1800 CoB D utilis par le PDO sign Node Id N param tre d mission du 1er sign 8 bits non Transmission type sign 254 Type de l mission o PDO 8 bits non param tre d mission du 2 me Number of elements AA sign PDO 32 bit 280h COB ID a COB ID utilis par
69. PLC Terminal SUPERVISOR User manual SERAD SA 271 route des cr tes 44440 TEILLE France T 33 0 2 40 97 24 54 amp 33 0 2 40 97 27 04 http www serad fr gt lt info serad fr S UM EN We reserve the right to make changes to all or nart of the Supervisor documentation Table of Contents T INTRODUCTION AAA NN 9 l l Description of SUPERVISOR u ccccccccceccsssesetseeeecuseeesecuseescsesseesecsessecaseeececeeseesecsesaecsseecaeesseeeeseeaeseeereaaeets 9 Generalitat e tado Sone ed lcd eo o nt pla ess e lo fon eut M a RTE en 9 PEC e le e A O 9 Modularity 22 55 ass dd 9 1 2 Description Of SPL SOfWANE 200 AAA nan a i RN eae te aes eR ee ees 10 Generality week ee RL hae AG Aaa ee Base nan en 10 2 gt AINSTALLATION STARTING cesccscssestinscevecs cscsatecescdeccectstcussctevecsessatensssevestsvcsetectsutsedeuscctexesesdesedeses 11 2 1 Environnemental consideration issus 11 DDE SGPC NS 11 DES CO MNE CAOS ER Roca esa ce le de ler eae Se oe dE nee oct ses ee 12 2 3 1 Getieral ex pli Cations men neir RARE EO REEE Hance ashes esse a 12 2 3 2 SUPELVISO Essen een ni cates eee Case ia ceases cased ner en ne eas Sete eo nee ee en en ee rte a nier es 12 ea 12 A NN 13 PG lt gt SUPERVISOR C ble it 13 DISTA A bee lien eo ogee 14 B SPLSOFTWARE nn NN 15 Tia INSTA A rss ni E A en RGR al ob PR On ae eR sa no E bash aba 15 3 1 1 System Configurations sense teinte EEE EG E SEE r E eseina Sa 15 3 1 2 I
70. RAD S A Supervisor documentation 9 2 3 Connections SERIAL 3 HWE OPTS FEWELLE CE o sc oe Jal caer a roe I Use a cable with 2 twisted shielded pairs and a general shielding type LiY CY CY or equivalent one pair for CAN L and CAN H one pair for the GND Link the shieldings to the terminals Example with 2 MCS 32 EX and 1 SUPERVISOR in a Can Open network Py SCAN board SCAN board MCS n 1 MCS n 2 Warning At each end of the Can Open network do not forget a 120 Q ending resistor between CAN_H and CAN L for a Dialog 80 Dialog 640 Supervisor 640 or SCAN board the installation of the jumper JP1 can validate this resistor For example in the previous configuration we have SUPERVISOR 640 Jumper JP1 ON SCAN board n 2 Jumper JP1 OFF SCAN board n 3 Jumper JP1 ON Maximal transmission speed regarding the length of the Can Open network Maximal transmission speed Network length R403 131 SERAD S A Supervisor documentation 10K to 125 kBauds 500 m 250 kBauds 250m 500 kBauds 100 m 800 kBauds 50m 1 Mbauds 25m 9 2 4 Test and diagnostic of the Can Open network From the SPL software activate the debug mode and then double click on the SCAN board VIEW page State Active Error La Rx zz Tx Server SDO Client SD0 Po OS O o m Ts PDO Rs PDO Card visualisation of the communication errors number in the board and it
71. Send event Passive event wait RAZ counter Counter read Counter configuration Brief sound Continuous sound Clear screen Clear or display cursor Editing alphanumeric data capture Last key Delay before repeat key Repeat key period driving leds Cursor position Print a text Pressed key Key waiting Screen saver control Draw box Font selection Draw horizontal line Draw point Draw vertical line CONTINUE Continue task execution HALT Stop task RUN Start task SUSPEND Suspend a task STATUS Task state R403 85 SERAD S A Supervisor documentation 8 11 Communication CARIN CAROUT CLEARIN CLEAROUT CLOSE INPUT INPUT OPEN AS OUTEMPTY PRINT TX485 Input buffer state Output buffer state Clear input buffer Clear output buffer Close communication port Data reading Char string reading Open a communication port Output buffer status Write on the communication port Modify RS485 output state 8 12 Flash Security and other functions CRC CLEARFLASH FLASHOK FLASHTORAM POWERFAIL RAMTOFLASH RAMOK RESTART VERSION WATCHDOG 8 13 Conversion CVL CVLR CVI CVIR LONGTOINTEGER MKL MKLR MKIS MKIR REALTOLONG REALTOINTEGER REALTOBYTE Return a checksum value Clear flash memory Test data in flash memory Restore from flash memory Power failure detect Backup to flash memory Test ram memory Restart system Operating system version Watchdog Convert string to
72. Supervisor S640 placed as close to the charge as possible E N vA N N o OPTION ENNO SERIAL 1 SERIAL 2 SERIAL 3 luso SPTS MAL SUBD PTS FEMEL SUBD 9PIS SERIAL 3 Led de d faut FEMELLE PIN RS232 PIN RS422 RS485 CANBUS Alimentation externe 1 1 24Vde 700mA Mini Redress e filtr e 2 RXD 2 x 3 TxD 3 RX Valeurs limites 20 32VDC Ondulations comprises 4 4 RX Protegee par un fusible 2A Maxi ST GND 5 GND cn s SERIAL 2 6 5 E 7 TXS TRX B CAN ons ollelelele E E l 8 8 TX RX A CANH 9 9 NON ISOLEE SOLEE O Ny V LIASON RS232 10M MAX Supervisor documentation S80 PEN a Y OPTIONAL ENTAUO SERIAL 1 SERIAL 2 SUBD 9PTS MALE SUBD 9PTS FEMELLE a Led de d faut uns RS232 RS422 RS485 CANBUS Alimentation externe SERIAL 24Vde 700mA Mini Redress e filtr e o Valeurs limites 20 32VDC Ondulations comprises x Protegee par un fusible 2A Maxi RX ss RX o Emi GND GND GND wanes seve peg cL ie _ TX TRX B CANL alimentation TX TRX A CANH S S RS232 hi NON ISOLEE ISOLE 10M MAX WATCHDOG is a NO contact 48 VAC maxi 2A maxi PC lt gt SUPERVISOR cable Female SUBD9 Female SUBD9 SUPERVISOR SERIAL PC COM 1 soldering side soldering side PC SERIAL CABLE r Mex length 10X O R403 13 SERAD S A S
73. THEN lt Instructionl gt ELSE lt Instruction2 gt lt Expression gt must be a bit type value If lt Expression gt is true then lt Instructionl gt and following instructions are executed If lt Expression gt is false then lt Instruction2 gt and following instructions are executed In the second syntax form only one instruction is executed for each condition all instructions are in the same line and END IF statement is omitted Nesting if instructions are possible but an ELSE always refers to the nearest IF instruction b Multiple tests Multiple tests are performed with CASE instruction CASE instruction syntax is described below CASE lt Expression gt GOTO CALL lt Subroutl Identif gt lt Subrout2 Identif gt lt Expression gt type must be byte integer or long integer With this instruction subroutines will be called in accordance to lt Expression gt value For lt Expression gt 1 the first subroutine is called for lt Expression gt 2 the second subroutine is called For example REPEAT INPUT 1 Choices Read choice from serial peripheral devic ON Choice CALL FirstChoice SecondChoice ThirdChoice UNTIL Choice 0 GOTO FIN SUB First Choice Called if the first choice is selected END SUB SUB SecondChoice Called if the second choice is selected END SUB SUB ThirdChoice Called if the third choice is selected END SUB FI x c Loops If the loop number
74. Text gt unexpected Char from 0 to 9 expected A real or decimal number uses the characters 0 to 9 System constant Unexpected end of file A no complete system constant has been found lt Text gt unexpected System constant expected A system constant is expected Number Unexpected end of file A number finishes by a number amp lt Text gt unexpected Number from 0 to 9 expected A number finishes by a number lt Caracter gt unexpected A no waited character has been found R403 155 SERAD S A Supervisor documentation Index A PRBS ic ies a AAA RRA SRE 90 ACUVE Wang nee A A nt ce Le dan eee 60 61 AGdITION ee nee es nn nn ne ne nr ee GE ence Goa ed eae 87 Altec Equal iii ds adh aan dea dat aetna Seen E AS A ns 89 AND inst Re fe awa des AA AAA A dan ag OP Gennes 90 ARCCOS a ns A aah in eR Adee ee sen terne ns ae tate 90 AROS IN A ab esd aR AGA antes ne ede nt ME aed eR a estes 90 ARCTAN rcs tc esc Soot Si Sr tanta ho tie a tea eta ohh ew tnt tone ocean ed dentate anne 91 Arithm tical crates hosts dat dada 82 TENS CR ER POPE EE e UP TCT OPER TBE CEA EN A DRE Poti EU dc ERREURS or 91 B Backlight ram en RAT e te tie Sa am sr rade nan ish nan sad add ire dat 76 BACKEIGH Ta onto ae dodo 91 Basic task StrUCUS a ta te A ta loa 51 Bars eect hea O O S dis 92 BOU n ies 92 BUZZ e fee O ds a ads nda de 76 BUZZER A ad AO ONLY 92 C CALL e e ge Mes eka it nor ee os 93 CAN UNS Be Ee PEE id BEN rea
75. The CVL function converts a string of 2 bytes created with the MKIS instruction in an integer value The most significant byte then the least significant byte A amp CVI A If AS chr 0 chr 1 then A amp 0 1 256 256 CVIR MKI MKIR 8 14 42 CVIR Convert string to reverse integer Syntax Accepted types Description Example See also lt Variable gt CVIR lt Expression gt Variable Integer Expression string of 2 bytes The CVL function converts a string of 2 bytes created with the MKI instruction in an integer value The least significant byte then the most significant byte A CVIR A If A chr 3 chr 2 then As 3 256 2 1 770 CVI MKIS MKIR 8 14 43 CRC CRC16 Syntax Accepted types Description Example CRC Value CRC lt Expression gt Expression Char string This function return the checksum value in a char string with the modbus RTU format CRC 16 AS CRC messages 8 14 44 DATES Current Date Syntax Description Example See also DATES This instruction returns a 10 characters string under the form dd mm yyyy where dd is the day 01 31 mm is the month 01 12 et yyyy is the year a DATES Result aS 01 01 1996 TIMES TIME TIMER 8 14 45 DELAY Passive waiting Syntax Units Accepted types DELAY lt Duration gt Duration milliseconds Duration Integer R403 97 SERAD S A Supervis
76. a MOD 2 Result a 1 DIV 8 14 89 MODIFYEVENT Events configuration Syntax MODIFYEVENT lt Mask gt lt Counter 1 trigger gt lt Counter 2 trigger gt lt Delay gt Limits lt Delay gt 10ms to 30 000ms Accepted types lt Mask gt Integer lt Counter 1 Trigger gt Integer lt Counter 2 Trigger gt Integer lt Delay gt Integer Description This instruction allows to configure events Remarks lt Mask gt Bits 0 7 Activate the inputs 1 to 8 of the input card A positive edge will generate the event The input take account of the invert and filter parameters entered during the board configuration Bit8 Trigger of the counter 1 reached Bit9 Trigger of the counter 2 reached Bit10 SDOEVent Bit11 PDOEvent Bits 12 Time base lt Delay gt Delay of the time base between 10 ms and 30000 ms If the time base is unused the value of delay will be not treated R403 109 SERAD S A Supervisor documentation When the event configuration register is affected the event task is executed when at least one event is detected The maxi time between the event detected and its treatment is equal to the task ageing time If you want to modify the event configuration register you ll be treated this instruction in a normal basic task or an event task before the execution of GETEVENT instruction See also GETEVENT 8 14 90 MKLS Convert long integer to string Syntax lt string gt MKL lt
77. a THEN See also ere 8 14 6 Lower or equal lt Syntax lt Expression1 gt lt lt Expression2 gt Accepted types Byte Integer Long integer real or Char string Description This operator tests if lt Expression1 gt is lower or equal than lt Expression2 gt Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type Example a 10 IF b lt a THEN See also 8 14 7 Left shift lt lt Syntax lt Expression1 gt lt lt lt Expression2 gt Accepted types Byte or Integer Description This operator shifts lt Expression2 gt bits from lt Expression1 gt from right to left Remarks lt Expression2 gt is the number of bits to shift The shifting is not circular Example a 100b b a lt lt 2 Result b 10000b See also ee 8 14 8 Different lt gt Syntax lt Expression1 gt lt gt lt Expression2 gt Accepted types Byte Integer Long integer real or Char string Description This operator tests if lt Expression1 gt and lt Expression2 gt are different R403 88 SERAD S A Supervisor documentation Remarks Example See also lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type as 10 IF b lt gt a THEN 1 E Er Ss A Es Z J
78. ables tasks between PC and SUPERVISOR A second optional serial port RS232 or RS485 can be installed on Serial2 These 2 ports can be treated in basic tasks With the port we can open or close it or reading or writing data The function of conversion like MKI CVI MKL CVL can be used to optimize the coded and decoded of message 6 2 Opening a communication port To open a communication port Motion Control Basic provides the OPEN instruction OPEN instruction has the following syntax OPEN lt Communication port gt AS lt CommNumber gt lt Communication port gt is a string that identifies physical communication port name and setup lt CommNumber gt is the number used to identify the opened communication port This number will be used by READ WRITE and CLOSE functions lt Communication port gt string can be decomposed in five parts SERIAL2 Speed Data Parity Stop Speed Communication speed 150 300 600 1200 2400 4800 or 9600 b s Data Number of data bits 7 or 8 Parity Parity checking mode E for Event O for Odd M for Mask S for Space or N for None amp Stop Number of stop bits 1 or 2 The string must respect the parameters order Speed data parity and stop parameters are optionals When the task is compiled and if the parameters are not defined the system takes the default parameter defined in the configuration screen double click on the SUBD of the Serial communica
79. alse before the WHILE structure beginning there is no loop While lt Expression gt is true lt Instructions gt are executed At each execution of END WHILE instruction the multitask kernel launches the next task REPEAT instruction REPEAT instruction allows the repeated execution of one or more instructions in accordance to an expression value REPEAT instruction syntax is described below REPEAT lt Instructions gt UNTIL lt Expression gt In this instruction if lt Expression gt is right before the REPEAT structure beginning there is one loop lt Instructions gt are executed unit lt Expression gt is right At each execution of UNTIL instruction the multitask kernel launches the next task 4 3 5 Event task structure Each extra task can manage about 16 events 7 PLC inputs 8 capture input and 1 timer Extensive events tie to standard axis s board are also free see chapter Enhanced Event Function This task is defined once times in a project When you want to create one you must chose the event start mode Events configuration At each power on of SUPERVISOR no events are configured This configuration is realized in a normal basic task initialization task with the MODIFYEVENT instruction Syntax MODIFYEVENT Events configuration Syntax MODIFYEVENT lt Mask gt lt Counter 1 trigger gt lt Counter 2 trigger gt lt Delay gt Limits Accepted types Description
80. ameters and the data tables are stored in a two dimensions array called dictionary Each data or parameter is defined by an address index and a sub index address The SCAN bus can communicate with another device of the network by different ways It can let data at other devices disposal by writing them in its local table any other peripheral can then read and write this local table It is the way used for example to communicate between an intelligent operator terminal Dialog 80 or 640 The SCAN bus can also read and write a local table of another device This operation is then done with the instructions CanRemote 9 2 2 Characteristics amp A SDO default server to set the parameters of the remote board by a supervisor amp A SDO client to access to variables and peripheral parameters such as displays PLC PC boards amp 8 PDO in emission to drive the outputs of the I Os modules or signal an event to SUPERVISOR amp 8 PDO in reception to receive the inputs of the I Os modules or signal an event to SUPERVISOR An array of 254 variables 8 bits non signed with read and write access for SDO An array of 254 variables 16 bits non signed with read and write access for SDO An array of 254 variables 32 bits non signed with read and write access for SDO Erreur Signet non d fini Direct access functions to the bus CAN to send and receive specific messages such as the functions NMT et DBT R403 130 SE
81. andling E O Diane 85 TASK on Lo IS AS 50 FASKS SUDEMENU gt si o etanol pentane ta AO tata nd nn Tan ee RAR dada 81 TeSt E tn 83 Test and diagnostic of the Can Open network 132 TIME cet to ot il ita acia 123 MES O e enredo entrer eee 123 PME Reese Soe stn Re nee A E E A I EE tdi etais ST Rat anale de 123 ERAS Oaths ive ati nets ee as 124 Typeof s nd messages iia lada sha sense aeatyalcdewbesee TRTA 130 U UCASE Sd Rn eet eee eee 124 V MAL datar iaa Mout a ns tile hasdees 124 VEUEN EEE aai A A A E E E EA 79 VERSION santa lll ada EE E A EEE 124 V N E e Gita a batik a a a a RE 124 W WAIT sat Heian ait ERE a alada 125 126 R403 160 SERAD S A Supervisor documentation WAIT EVENT RS iS Aaa CRS Se AS Shee ee SO eS Ble NO ie ne eh ee 125 WAIT EY estas ttc dido hee Th eset athe cee 125 WATCHDOG Has Sie Se iis RSS RS MAO ee ae ase Sale Aes 126 WHILE cate tae ii i ee Ae alee ea Gitte das 126 Writing Gata A en Jeet dan sca A N E Rae ones 69 X OR ne A ten eue N D Rue ee ed 126 R403 161 SERAD S A
82. as 116 8 14 115 RAMOK Test ram status essences 116 8 14 116 RAMTOFLASH Backup saved variables 116 8 14 117 READKEY Return the state of terminal keyboard 117 8 14 118 REALTOLONG Convert a real to a long integer ee eeeceseceecseeeceececseeeseeeneeeeeeeeeeereeerens 117 8 14 119 REALTOINTEGER Convert a real to an Integer eeceecceseceseeeseeeeecseceecaeecseesseeeeeeneeeneeees 117 8 14 120 REALTOBYTE Convert a real to a bytes 117 14 121 REPEAT Repeat Until id man veel ah AO nae a de 117 8 14 122 RESTART Restart system 118 8 14 123 RIGHTS String Tight Paid leeis 118 8 14 124 RTRIMS Remove the right spaces seins 118 S 14 125 RUN Lancha task hein os 118 8 14 126 SEEK Moving to a save file esse 119 8 14 1127 SETDATE Set the date wis cried ici diaria cee EEE ERE ERE EE EART O 119 8 14 128 SETINP Input filters and invert ron nr nn nr nnrrnnrnnn ran naar 119 8 14 129 SETOUT Outputs Vd a adi 119 8 14 130 SETTIME Set th hour ansien eit rien cous En E A ETE EN dia nd 120 8 14 131 SETUPCOUNTER Counter configuration ss 120 S142 1322 SONO ss 120 S14 2133 SIN MER bres EEA A 120 8 14 134 SIGNAL Event generation crossi ense i eE e E EEE E EEEE NEETER 120 8 14 1357 SOR Square TOOL es ne E NEE EAE AT EE EEA A EE ES A E AER A 121 8 14 136 SPACES Space made string ire 121 8 14 137 STR Char characters convert
83. as the same rights and the data exchange is directly regulated between each participant device The profile of a device defines the necessary parameters for a communication The contents of this profile is specified by the constructor Devices with the same profile are directly interchangeable Most of the parameters are described by the constructor The profile has empty places too which are for the future functionality extensions In most of the master slave buses the efficiency of the master determinates the comportment of the whole network Moreover slaves can not communicate directly one with the other All these characteristics are increasing the transmission errors CANopen suppress all of these drawbacks The timing comportment can be specified individually for each respective task of the participant R403 128 SERAD S A Supervisor documentation 9 1 devices Like that the whole communication system does not need to have more efficiency if only some of the devices need so Moreover an automatic task can be separated for each of the participant devices So the performances of the network manager can be used in an optimised way and can increase at any time by adding new participant devices The variables mapping used during the PDO type exchanges permits to use in an optimal way the current bandwidth of the bus CANopen determinates default values of all the parameters 3 Network configuration The CanOpen network is ma
84. can be obtained in two different ways Number of elements for a variable gt 1 for an array Address for stored variable from 1 to 20 000 amp In the Variables menu A right click opens a menu with the Add command R403 39 SERAD S A Supervisor documentation 3 4 The modify command allows the modification of the global variables parameters except its type This command can be obtained in two different ways In the Variables menu select the variable to modify before A right click opens a menu with the Modify command select the variable to modify before The Delete command suppresses a variable of the project This command can be obtained in two different ways In the Variables menu select the variable to delete before A right click opens a menu with the Delete command select the variable to delete before The Show command allows the vizualisation of a variable state This command shows all the value of an array It can be obtained in three different ways In the Variables menu select the variable to show before A double click on the variable to show A right click opens a menu with the Show command select the variable to show before When you want to show a camtable variable the cam editor is launched In this editor we can define the profile of a cam 10 Tasks tab valise PRJ Piel ES Startup Priorit Comments INITT 0
85. cates an error 23 R403 29 SERAD S A Supervisor documentation SUPERVISOR Flash Project Setup Communication Debug Options Help Setup gt Variables gt Tasks gt Supervisor Flash Copy datas in flash memory Ctrl Y D Run Supervisor Ctrl B Y Test datas in flash memory Ctrl Z M Stop Supervisor Ctrl H Remote control Copy data in flash memory Action This command creates a backup in flash memory of the setup parameters and of the first 10000 stored variables in the non volatile RAM memory At each SUPERVISOR power on a checksum is made to test the validity of the data in non volatile RAM If an error is detected SUPERVISOR transfer the flash memory backup in the non volatile RAM and launches tasks If there is no backup SUPERVISOR indicates an error 20 Clear data in flash memory Action Run SUPERVISOR Icon Action Stop SUPERVISOR Icon Action Remote control Action This command clear the data s copy in the flash s memory 2 This command launches the execution of the tasks in SUPERVISOR This command stops the execution of the tasks in SUPERVISOR WatchDog becomes OFF All the servo board are in an open loop state analogue command 0 The Security instruction has no effect on SUPERVISOR With this command you have access in mode Remote Control You can drive the SUPERVISOR at distance with a modem and a telephone line see chapter Remote Control R403
86. ce code Action This command adds some information to the compiler to obtain the trace code in task This command is interesting to test systems but the compiled file are biggest and the execution of task is ran slowly When it is activate or disable you need to compile the tasks again Force using brackets Action This command strengthens the test of brackets during the compilation Multitasking Action This command allows the modifications of multitasking parameters A dialog box appears and allows the modification of the ageing time task and the normal slice time Operating system Action This command update or clear the operating system Attention this procedure is reserved to experienced user R403 32 SERAD S A Supervisor documentation 3 4 6 Help menu BECHETCHET Wiisertiame Wizard Action This command allows the displaying of icon information About Action This command launches a dialog box which indicates the software version etc 3 4 7 Configuration tab lt Supervisor Programming Language Peripheriques Serial 3 dee Serial 2 Accessories Serial 1 Global constants Global variables On the configuration window there are two zones The first zone is on the left with the front of SUPERVISOR This zone allows the SUPERVISOR configuration We can configure the display machine the SERIAL1 SERIAL2 SERIAL3 INPUTS and OUTPUTS The second zone is on the right with the na
87. ction If Instruction expected An instruction is expected after an If Else Instruction expected An instruction is expected after an Else amp SERIAL1 or SERIAL2 Expected In Open instruction the name of the communication port is either SERIAL1 or SERIAL2 amp POS VEL ACC or DEC expected The TRAJ instruction accepts only POS VEL ACC or DEC as parameter Undefined variable The variable contents is used before being defined by an affectation String expression expected A type string expression is expected Bit expression expected A type bit expression is expected t Comment bloc Unexpected end of file R403 154 SERAD S A Supervisor documentation A comments bloc begins by Comment bloc Unexpected char An other character as has been found String constant Unexpected end of file A string constant must finish with quotation marks Comment bloc Unexpected end of line A comment bloc finishes by Bad hex number An hexadecimal number uses the characters 0 to 9 and A to F Bad binary number A binary number uses the characters 0 to 1 Not an hex value An hexadecimal number uses the characters 0 to 9 and A to F Not a binary value A binary number uses the characters 0 to 1 Not a decimal value A decimal number uses the characters 0 to 9 Real constant Unexpected end of line A real constant must finish by a number after the decimal point Y lt
88. ctive after a delay if user don t push on a key panel The backlight becomes active when a key pane is pushed The syntax is BACKLIGHT lt Delay gt lt Delay gt defines the active time of the backlight after the last key press This value is an integer which represents the minutes The zero value allows the backlight to be always inactive and 1 always active By default lt Delay gt is equal to 15mn Warning le Backlight have a 10000h life duration 7 2 6 Leds To drive the leds of the SUPERVISOR you can use the LED number State instruction The number parameter is the key name where the led is F1 F6 or for the specific leds its name ALARM or HELP The State parameter defines the state of the led switch off 0 switch on 1 or blink 2 Warning The leds of keys F7 F12 on the SUPERVISOR are driven by the LED F1 LED F6 instruction 7 3 Keys 7 3 1 SUPERVISOR keys IZ F1 F12 POINT R403 76 SERAD S A Supervisor documentation Es EA 0 9 ES UP HELP v DOWN ALARM gt RIGHT Es ESC LEFT pe MOD RETURN ge SIGN 7 4 Internals menus 7 4 1 General explications This menus allow Test inputs outputs in a manual mode Read and write the global stored variables Control the storage and restoration of the data in flash Adjust the date and the time amp Modify the state of the watchdog This internal menus are executed with the CALL i
89. d and ESC key to escape For writing an alphanumeric character push several times on the associated numeric key to change the character The record of the character makes itself automatically when you don t push on the associated numeric touch or you push on other touch Remarks lt Line gt and lt Row gt are the first character position lt Length gt is the maximum number of characters The system variable KEY contains the last pressed key If the edition is aborted then KEY ESC and otherwise KEY RETURN Example AS EDITS 2 9 5 capture in line 2 row 9 on 5 characters maxi 8 14 50 END Block end Syntax END PROG SUB IF WHILE Description Bloc end Remarks You must specify a keyword after END Examples SUB Manuel END SUB See also PROG SUB IF WHILE 8 14 51 EXIT SUB Subroutine exit Syntax EXIT SUB Description This instruction allows to exit of a subprogram See also SUB 8 14 52 EXP Exponential Syntax EXP lt Expression gt Accepted types Expression real Description This function returns e natural logarithms base raised to lt Expression gt power R403 99 SERAD S A Supervisor documentation Remarks The argument lt Expression gt must be a valid numerical expression Example a EXP 2 See also LOG 8 14 53 FLASHOK Test flash memory Syntax FLASHOK Description This function indicates if parameters and the first 10000 saved variabl
90. d cece taa 63 EXempl sise men EE R E E E E E RA E eee 64 EED Es rl DS AE NEEE IAEI AA AE IAE ANI RR EER rie re 65 52221 PLESENtAL OM E EEE AE EE EA E E E AE E E E 65 5 2 2 Contacts coils timers and Counters iii 65 A E woe E A I EA E NEEE E E E en E A de A E A 65 OT RES A E E A A A E E T ET A 65 Counters Up Ordo WA E E E E AE 65 A E A ere E A AAA 66 5 2 3 Free contact and Cod cece ceccsccecssscececssssecesssececesssececseecsessececeessecscsssseceesaeeeceesseeeessesecseneeeceesseees 67 A SN DITS A E E A E E 67 5 2 5 Taskarchitecture ss sarien re n a tops a a e i o n eai ee aTi ARR 67 PROGRAMMATION OF SERIAL1 SERIAL2 COMMUNICATION PORTS seems 68 OL A OAUCTION PRE AEE AAEN a 68 6 2 Opening a communication port ccececccccccecerseensecseseecsecseseecsaeceeseecsaecseaeecaecseseecaeceeseceeeseateceeeeeeaeeneeeenaaes 68 6 37 REAGING data aldo da dao eaae ran inde wre ee AE 68 CATIA AAA A A A a a at E eave fergie a eee 69 6 5 Close a communication port 70 OO RISAS SAT COUN CN Draconis LT A Ei ar dede Te es Dee a ap DT etat Bee ue ae el Se RS 70 6 72 Example RTU Modbus drivet sise pme td ane ed apt es aks Mann Mimi Greenies 70 PROGRAMMATION OF DISPLAY KEYBOARD cscccssscessccessccescccesccessccessccesccesaccessseessccessecenee 73 7 1 Supervisor description rss A ARR de Re a RE es 73 1 1 1 Supervisor 640 nt Rues ohn Ga alk ne RE wa ee i een ae needa 73 Pale2 SUPCrvisOr SO Shy ete nn en le A lente Len tant 73 72 Operator JUNCT
91. de of several devices each of them can be master and slave They are identified in the network by an arbitrary number called Node Id This parameter must be unique two different devices of the Can Open network can not have the same Node Id This Node Id is very important it is the real identity card of the peripheral on the Can Open network NodeID NodeID NodeID NodeID NodeID NodeID 3 12 1 13 2 5 Example of CanOpen network configuration The wiring is as follows CAN L CAN H Gnd Devices Ending resistors between Can_H and Can_L Wiring of a Can Open network Warning Do not forget the ending resistors at each end of the Can Open network For the SERAD products SCAN DIALOG and SUPERVISOR the resistor is validated if the jumper JP1 is present If it is not the resistor is un validated For the other products see the notice R403 129 SERAD S A Supervisor documentation 9 1 4 Type of send messages There are two main kinds of messages sent on the Can Open network e The SDO are transmitting data e The PDO are transmitting events 9 2 SUPERVISOR CANopen bus 9 2 1 Presentation SCAN board The SCAN co processor board is included in the SUPERVISOR It owns three local tables of 254 data each for these 3 data formats 8 bits 16 bits 32 bits These tables can be read and written by the SUPERVISOR without going into the Can Open network with the instructions CanLocal The different par
92. different with the selected tab of the windows An adding suppression or modification of an elements needs the project to be compiled again A modification of a parameter value needs the configuration to be sent to the SUPERVISOR A modification on a global stored variable value needs the variables to be sent to the SUPERVISOR Add Icon Action This command adds a board a global constant a global variable or a task according to the tab selected Modify Icon Action This command modifies the parameters of a board a global constant a global variable or a task according to the tab selected Delete Icon ti R403 21 SERAD S A Supervisor documentation Action This command deletes a board a global constant a global variable or a task according to the tab selected Show Icon Q Action This command shows the parameters of a board a global constant a global variable or runs the ladder or basic editor according to the tab selected 3 4 3 Debug menu Project Setup Communication Debug Options Help v Debug mode Ctrl D apup SB 32 EX Tasks Inputs Terminal Ctrl U Outputs 15 Scope Cirle Serial3 Debug mode Action This command allows the working of debug mode On activate all the command of this sub menus are valid Configuration Action This sub menu displays the SPL debug window or the debug window of the slot selected According to the boa
93. e all the tasks defined in the tasks tab The validation of one of the tasks launches the basic editor in a debug mode The basic code can t be modified This mode allows the user to show the evolution of code trace if it was validate Open Serial2 9600 8 N 1 As 1 Run in step by step mode R403 23 SERAD S A Supervisor documentation Action This command allow to run the programm in step by step mode and control the good functionning of each basic in the task Breakpoint Open Serial2 9600 8 N 1 As 1 Suspend M Call _MenuMcs task al 11 num b1 11 num cis 11 num Place 3 dis 11 e num Aron x el 11 lt numf A a2 longl nun Delete b2 1ong1 num breakpoint c2 longi num d2e longi num e2 longi num a3 saved1 num b3 saved1 num c3 saved1 num d3 c savedi1 num e3 saved1 num 12 num bit long2 num bit saved2 nunf bit END PROG Breakpoint line pla Y xf 12 10 Num Breakpoint 10 Za Action This command allow to choose a ligne in the task where you want that the programm stop for control some parameters Terminal Icon Action This command launches the hyper terminal viewer This tool allows to ask the state of SUPERVISOR or to read and write the local and global variables parameters inputs and outputs R403 24 SERAD S A Supervisor documentation Activate the properties window A chvate a exe bon Done Su
94. e color of the border and lt FillColour gt the colour of the filling rectangle The HLINE function draws a horizontal line on the screen The syntax is HLINE X1 Y1 X2 lt Colour gt The X1 Y1 parameters are the starting point of the line and X2 Y1 parameters are the ending point lt Colour gt defines the colour of the line The VLINE function draws a vertical line on the screen The syntax is VLINE X1 Y1 Y2 lt Color gt The X1 Y 1 parameters are the starting point of the line and X1 Y2 parameters the ending point lt Colour gt defines the colour of the line R403 74 SERAD S A Supervisor documentation 7 2 2 Keyboard We have two functions and a system variable to use the keyboard The function Inkey allows to read a key and to stock its code in a type byte variable If no key is pressed before the function call this one returns 0 The syntax is the following lt Variable gt INKEY Example Waiting K INKEY IF K 0 Then Goto Waiting IF K F1 Then Goto MenuF1 IF Inp StartButton 0n Then Goto Start Goto Waiting The WAIT KEY function allows to wait for pressing a key and stocking then the key code in the system variable KEY Contrary to the previous function this function is locking the task as long as any other key 1s pressed The syntax is WAIT KEY Endly the system variable KEY contains the code of the last key pressed in the functions WAIT KEY or EDIT This variable is local to the task
95. e communication port SERIAL1 will be used If an operator panel is connected to the SERIAL2 port please refer to the OPEN function to affect 1 to the port SERIAL2 8 14 39 CVL Convert string to long integer Syntax lt Variable gt CVL lt Expression gt Accepted types Variable Long integer Expression string of 4 bytes Description The CVL function converts a string of 4 bytes created with the MKLS instruction in a long integer value The least significant word then the most significant word Example A amp CVL AS If AS chrsS 2 chrS 3 chrsS 1 chrs 0 then A amp 2 3 256 1 65536 0 16777216 66306 See also CVLR MKL MKLR 8 14 40 CVLR Convert string to long reverse integer Syntax lt Variable gt CVLR lt Expression gt Accepted types Variable Long integer Expression string of 4 bytes Description The CVL function converts a string of 4 bytes created with the MKLS instruction in a long integer value The most significant word then the least significant word Example A amp CVLR AS If AS chrS 0 chrS 1 chrS 3 chrS 2 then R403 96 SERAD S A Supervisor documentation See also A amp 0 16777216 1 65536 3 256 2 1 66306 CVL MKL MKLR 8 14 41 CVI Convert string to integer Syntax Accepted types Description Example See also lt Variable gt CVI lt Expression gt Variable Integer Expression string of 2 bytes
96. e ewes 84 8 8 4 COUNT se sursis id did 85 8 92 Display Keyboard 2er A te rte ces TR Rt Svc ave Lagat edo dees le nent 85 8 9 1 Supervisor 80 and 640 mentir ideada 85 SR seeeecedsaceecatateedeaded dueveestveeduativelaceseecetes 85 OL OS TASK RARAS A aap Oe Buh E Ris ren 85 S21 1 GCOMMUNICAHON omic it arts 56 8 12 Flash Security and other functions rear nn 86 SLI CONVE SON A ee Races sae lS ee ee aE he ot do 56 6 14 Alphabetical A ieee Ghana es mile a muet 87 8 14 1 Addition RN 87 8 14 2 Subtraction 2s cccccc aversbeccevaeceedeces e ses a indias 87 8 14 3 Multiplication M sec cnsesecescsdeccees saedeesdasecediasseevecedsecct cess EEEE SE riS aaas 87 8 144 O rire ere rimes ann trame sine ess detivecedetencdedsn desea e inaa 87 8 14 5 Lower Srann a nn sn ebacdse sc cees ane ere ee rene en et ee need vec E este te tenu tee 88 8 14 6 Lower or equal iii A riens teen cidad 88 BE LATE Left shift SA LR me edi ea ei oats eee iin eee 88 8 14 8 Different gt tec sedeseeesencsi EE EEE deu ie rene line restent t ias 88 8 14 9 Aff ct Equal annee dista 89 8 14 10 Greater terne Site ede eede nce sus ON 89 8214211 Greateror egual CDE rent nn nt nent sec esc outings E E ete 89 8 14 12 Right SMTP as 89 82142132 Exponent ss etiam oct 90 8 14 14 ABS Absolute Value miii sas 90 8 14 15 AND Operator AND screens i o AE EEE EOE EEO A E E RE 90 8 14 16 ARCCOS Invert COSiINE Eseia E
97. e takes 256 bytes in memory Example as 10 integer variable If Position gt 1000 Then Position 0 real variable Compteur amp Compteur amp 1 FormFeed Chr 10 ChrS 13 long integer variable string char variable The local variables can have the following types Bit 1 0 On Off ou 1 octet True False Octet 0 255 Entier 0 65535 v x x v Capteur On Donn e 128 Nb 2000 R el 2 9 x 10794 6 octets 1 7 x 1038 Chaine de caract res D 255 Pos 122 245 Mes Erreur Entier long D 4 octets Vitesse amp 120 000 2 147 483 647 E R403 47 SERAD S A Supervisor documentation 4 2 4 Convert data types To convert a data type to an other data type use the functions below ng inte ger Real String To extract a bit from a byte or integer the function BitNum can be used For a byte BitNum is between 1 and 8 1 is the least significant bit For an integer BitNum is between 1 and 16 1 is the least significant bit BitNum maybe a value or a byte variable To extract a byte from an integer the function L or H can be used The L function extract the least significant byte and H the most significant byte Examples VarOctet 4 VarBit VarOctet 3 VarOctet 16 Index 5 VarBit VarOctet Index VarBit 1 VarOctet VarBit VarEntier 259 VarOctet VarEntier L VarOctet VarEntier H VarLong 261 VarReel 38 15 VarOcte
98. ecution of this instruction launches the execution of the next task CALL Move SUB ICALL 8 14 25 CASE Multiple tests Syntax 1 Syntax 2 Accepted types Description Remarks Example CASE lt Expression gt CALL lt Label 1 gt lt Label2 gt y CASE lt Expression gt GOTO lt Label 1 gt lt Label2 gt Expression Integer This function allows to make jumps to labels in function of lt Expression gt values lt Expression gt must be an integer valid value If the Expression value is equal to zero or greater than the number of labels the task goes on at the next line The execution of this instruction launches the execution of the next task Case a GOTO Movel Move2 Goto Fin a 0 or as gt 2 Movel lav 1 Move2 las 2 Fin 8 14 26 CARIN Input buffer state Syntax Description Remarks Example See also CARIN lt Number gt This function returns the number of characters in the input buffer of the communication port lt Number gt is the number used to open the communication port with OPEN instruction This function returns an integer WAIT CARIN 1 gt 3 Wait for at least 3 received characters A Input 1 3 Read 3 characters CAROUT CLEARIN 8 14 27 CAROUT Output buffer state Syntax Accepted types Description lt Expression gt CAROUT lt Number gt lt Expression gt integer This function returns the number of characters
99. en ce tue lide ae alan do ay ole 112 Outputs reading assess ren ate A ein aioe dead et tent 59 Outputs Writing tess iac tat tat dt ade Ada 59 P Parameters SUD MENU ti Pare ln rad E lan a a aaa a tt trame tete 78 PASSIVE waiting 282754 Back teens me Pr g AAA 60 NO 140 PDOEVEN T san an sted tan rad ie tenta a A EE O re era 140 PIXEL sei Tea er VE E de a dard rene dressent ane inst dede tone ne ent ane ITE nes du 112 PEC Er en ra range ar area nets eis adie lana titra eee eae E ed Nan sate inten Ta ede ra in 84 RS 113 PECINPB anta iaa it il e a a tt can tant ten lle ana 113 P CINENESE ESS sae ata tart heat ache oc 113 PECIN PRE sad ras ig ence canes ad et Det en ant cere Jeeta 114 PEGINP VAT EEIE EAEE eed tie feats A eaten 114 PEO a a dd ee reer eee 114 PECOUT Bi aldea 115 P COUTN SR a dea 115 PECREADIN PU D EEEE AEE TAT A tad 115 PECWRITEQUTPUTS a A A E E E ete EE 115 POWEREAI RSS te aaa gu tka ete nn a a there ad 115 POSI tada A 65 Presentation SCAN board 130 PRINT anse tn eee LE en ne a tente a etage 116 PROG anni randonnee dh baer heel avs A ed eee ae 116 Programs ie tad ta lanta i N E cti 82 Project MENU 5er acetal A antenne ei a ane 18 R RAMO Ki A A at ee a ne ia ee 116 RAMTOFLASH aeiio eee a a eme a aud veau deve da ula rames mnt nn ner te dede gente 116 Reading data 3 1s ete atada 69 READKE Y citada lente aa tiara 117 REALTOBYTE cisco a lll die litio tela taba taeda des 117 REALTOINTEGER cotidianidad 117 REALTOLONG
100. en done SDOINDEX Allow to know the index of the dictionnary s object SDOSUBINDEX Allow to know the sub index of the dictionnary s object R403 137 SERAD S A Supervisor documentation 9 3 2 CAN Read and write a message Syntax 1 Syntax 2 Accepted types Description Remark CAN lt Board gt lt Data gt lt Variable gt CAN lt Board gt lt Data gt lt Variable gt Characters string This function reads or send a message lt Board gt must be a CANopen board You have to tell the parameters of the reception COBID to receive the message 9 3 3 CANERROR Faults detection Syntax Accepted types Description Remark lt Variable gt CANERROR lt Board gt lt Variable gt Boolean This function tells if a default occurred lt Board gt must be CANopen board 9 3 4 CANERRORCOUNTER Controls and erases the communication errors Syntax 1 Syntax 2 Limits Accepted types Description Remark lt Variable gt CANERRORCOUNTER lt Board gt CANERRORCOUNTER lt Board gt 0 lt Variable gt from 0000h to FFFFh lt Variable gt integer The syntax 1 tells the number of errors which had occurred since the counter has been reset The second resets the errors counter lt Board gt must be CANopen board 9 3 5 CANEVENT Test a message arrival Syntax Accepted types Description Remark lt Variable gt CANEVENT lt Board gt lt Var
101. ena a ide dae eee aon olen eae hers 99 EXPONEN arta atar te vee teense Se e aa ale ert dr an nett teas on hat ten oan a Ton aos aa ee 90 F Flash Security and other functions 86 ELLAS e coheed a eh baste ead bark es heen one ee BA ae 100 FLASHTORAM is oer ve done ak Ahad Oa ea Aa hac das 100 Folders e o ata OO A dos em 16 NT RE wel Aes Ae ao aa eases 100 101 FORMS AU noe wets Ni dk Rare eae Si ee ee SG ek DR a tee Boe ite Mal 100 FORMAT Discreet sect ate mL A ia it bid 101 PRAC IE eet RAT RM a tas de hate end Dead de duc en 101 Fr contactand coil 2 ina A awe ne ete en de Ra ee rene tree 67 G Gene ral explicatlon 2 22 ei ee A eee ed 77 CGETDATE ata a AR Pats ne SEG Res ds SOG ad dan Us de ne Ro 101 CGETEVENT LE RER Raed E esd ws sda oe advected aia 102 GETTIME fish dodne 102 Global GonsStants ss aaa adi 46 Global variables miosina da sree ag earns 46 cs E cehuess 102 Greater cti ita aaa 89 Greater or equal tac dada 89 R403 157 SERAD S A Supervisor documentation H HAL Te tant eee ae ee i ee ee ee ee 102 A elaine acl ea ie ea 33 MEINE ee led Gaede adel anid aed a ne ae ies eee 103 l CA ets hae ne Ade at de et en en Sah LA pia aly aati a al be N 103 IF 103 104 INKE Yen astres fea ae nee chi den baa a ie le eae alla Na cle aie e cn fe 104 INRP ere o te 104 INPB nn rat e nt dis e wea Meta A E 104 INPUT ne adn eae et M ne nn de etter tn it R LS 105 INPUT Gis nc aos Rai th ies id tee deci che Mas 105 Inp
102. er TempoRxd amp Time RECEIVE InitRxd PtrRxd 0 Rxd 1 WaitRxd If Carin 2 lt gt 0 Then Jump ReadRxd If PtrRxd 0 Then Goto WaitRxd If Time gt TempoRxd amp Then Goto InitRxd Goto WaitRxd 1 ReadRxd TempoRxd amp Time TimeOut amp If PtrRxd gt 2 Then Jump MessageRxd If PtrRxd 1 Then Jump Car2Rxd CarlRxd CarRxd Input 2 1 CarltRxd NumSUPERVISOR Asc CarRxd T NumSUPERVISOR lt gt NumeroSUPERVISOR And NumSUPERVISOR lt gt 0 Then Jump InitRxd PtrRxd 1 Rxd CarRxd Jump WaitRxd Car2Rxd CarRxd Input 2 1 NumFonction Asc CarRxd If NumFonction lt gt 3 And NumFonction lt gt 4 And NumFonction lt gt 16 Then Jump CarltRxd PtrRxd 2 Rxd Rxd CarRxd Jump WaitRxd MessageRxd CarRxd Input 2 Carin 2 PtrRxd PtrRxd len CarRxd If PtrRxd gt 240 Then Jump InitRxd Rxd Rxd CarRxd If NumFonction 16 Then If PtrRxd lt 7 Then Jump WaitRxd If PtrRxd lt Asc Rxd 7 9 Then Jump WaitRxd Rxd Left Rxd Asc Rxd 7 9 Else If PtrRxd lt 8 Then Jump WaitRxd Rxd Left Rxd 8 End If TraitementMessage Sum Left Rxd Len Rxd 2 Sum Crc Sum Sum Mki Sum If Sum lt gt Right Rxd 2 Then Jump ErreurLiaison AdrBus Cvir Mid Rxd 3 2 NbrBus Asc Rxd 6 If NbrBus 0 Or NbrBus gt 100 Then Jump ErreurAdresse If AdrBus lt AdresseModbus Then Jump ErreurAdresse A1 AdrBus
103. ers and variables of SUPERVISOR In this last zone there are all the parameters of each card of the project all the constants and global variables Di Estats teeeew sede EE SP Re RE eee eee ER eee Q e Variables A NS A O A AR E E E E 2 gt Tasks NAAA AAA ee NE S Supervosor 640 pas de cate E S 2 ERES 1 drive METRONIX ARS310 5 avec 1 cate CAN El Param tre CAN du drive i Node 2 Send command 600 122 Command quit message 580 Dans la fen tre transfert saisir CAN 02 01F4 000 RE SE ES NA E sale ills acrid EE S sae al ds Y modiule E S RIO40 PR EE AE RS SR PE ERE E EEE EA EE E EEN E cc SE EEEE E st DER EEN EE EE EE ey TMessage 1 E TMessage 2 ittente gt Descente maitient Le TMessage 3 ittente gt Remont e maitient y TMessage 4 ittente gt Avance coulisseau a TMessage 5 ittente gt Recul coulisseau a TMessage 6 ittente gt Ouverture pince m TMessage 7 ittente gt Fermeture pince p ioe 4 gt flea Num YW The toolbox helps the user to use movement and other instructions Tools are in subroup gt Editor tools A tool to search a word or a group of word a This search is made in the task in confusing or dissociate the upper and lower case The replace command Ss search and replace an occurence in a task The print command The next icon display a quick syntax of the check instruction of task editor amp Copy
104. es are backed up in flash memory See also RAMOK RAMTOFLASH FLASHTORAM 8 14 54 FLASHTORAM Restore saved variables Syntax FLASHTORAM Description This function restore parameters and the first 10000 saved variables from flash memory This function is automatically called by system if variables are corrupted on start up Voir aussi RAMOK RAMTOFLASH FLASHOK 8 14 55 FOR FOR NEXT loop Syntax FOR lt Counter gt lt Begin gt TO lt End gt STEP lt step gt NEXT lt Counter gt Accepted types Counter Byte Integer Long integer Description Repeats an instruction a specified number of time Remarks FOR starts the FOR NEXT loop structure FOR must appear before all the other parts of the structure lt Counter gt is a local integer variable used as loop counter lt Counter gt is equal to lt End gt 1 at the end of the loop lt step gt must be a positive value The execution of this instruction NEXT passed to the execution of the next task Example FOR i 1 TO 10 NEXT ib See also WHILE 8 14 56 FONT Font selected Syntax FONT lt Value gt Accepted types lt Value gt byte Description This function defines the font of the operator panel Remarks lt Value gt Font 1 16 lines x 40 characters with text and black background 3x4mm Font 2 91x 30 c with text and black background 4x7mm Font 3 61x 20 c with text and black background 12x20mm R403 100 SERAD S
105. es the next task The instruction ICALL allow also to branch to a subroutine but whithout automatic tipping to next task Branch to a label The GOTO instruction makes a branch to a label A label is a name with at the end Ifthe GOTO instruction is in a subroutine SUB END SUB the label must be in this subroutine A branch to a label with the GOTO instruction can be realized before or after the program For example GOTO Labell babelis With the GOTO instruction the multitask kernel launches the next task The JUMP instruction have the same features as GOTO but the multitask kernel stays in this task Operators The expressions are composed of operators and operands In Basic almost operators are binary this means that they use two operands Operators that use only one operand are called unary operands Binary operators use common algebraic form for example A B Unary operators come always before their operand for example NOT A In complex expressions precedence rules can suppress all ambiguity in operator order R403 52 SERAD S A Supervisor documentation NOT f DIV MOD AND lt lt gt gt The three fundamental rules concerning operators priority are An operand placed between two operators whose one has priority will be linked to the higher priority operator An operand placed between two operators whose priority are equal will be linked to the left operator Expressions bet
106. eseedecevcevendunivaci ds 130 9 2 SUPERVISOR CANopen Bus ccccccsccscscecscevseseeseeseesecsceescuseesesecscessuseessesecssessssseeseeseeseesecasesesseesensenseesenaees 130 9 2 1 Pr sentation SCAN board ste rm rte dns minime ete Mann agir 130 922 2 Characteristi ss rt ne A oia 130 922 32 CONNECHONS 321 ss Re en RR 131 9 2 4 Test and diagnostic of the Can Open network 132 VIEW page antenne ma nent rates Po re tt tree ed nn le anse 132 DEBUT 133 A A crstescatie ts Mask ee ee E Een ne ne geet than SET 134 De Se INITUCTONS SEE ANR ra AS EES RNs EEE Ne Me GS 137 9 3 1 List of the CANopen instructions ss 137 A Read and write the dictionary 137 B Modification of local variables 137 C Modification of remote variables ses 137 D Instructions in mode PDO iii 137 EJ Control mstructions 2 33 nn t te ere era caia 137 F Instructions in mode PDO s 137 9 3 2 CAN Read and write a message ire 138 9 3 3 CANERROR Faults detection sise 138 9 3 4 CANERRORCOUNTER Controls and erases the communication errors 138 9 3 5 CANEVENT Test a message arrival ss 138 9 3 6 CANLOCAL Read or write a local variable 138 9 3 7 CANSETUP Read or write a parameter users 139 9 3 8 CANREMOTE Read or write a remote variable 139 9 3 9 PDO Read or write data from a PDO siennes 140 9 3 10 PDOEVENT Test a PDO arrival ses 140 9 3 11 SDOEVENT Event SDOiisinissscsecscccostcassasecsscesseteastaseciten
107. exchange events with PDO The default COBID of the servers are 600h NodeID in reception and 580h NodeID in emission The default COBID of the first PDO are 200h NodelD for the reception and 180h NodelD for the emission You configures the clients in accordance with that Initialisation of the SUPERVISOR 1 Start the board at 500KBits s on the node 1 StartCan Canl1 1 5 COBID ClientSDO Rx SUPERVISOR1 COBID ServerSDO Tx SUPERVISOR2 CanSetup Can1 1280h 1 582h COBID ClientSDO Tx SUPERVISOR1 COBID ServerSDO Rx SUPERVISOR2 R403 141 SERAD S A Supervisor documentation CanSetup Can1 1280h 2 602h COBID TxPDO1 COBID RxPDO2 CanSetup Can1 1800h 1 202h Initialisation of the SUPERVISOR 2 Start the board at 500KBits s on the node 2 StartCan Can2 2 5 COBID ClientSDO Rx SUPERVISOR2 COBID ServerSDO Tx SUPERVISOR1 CanSetup Can2 1280h 1 581h COBID ClientSDO Tx SUPERVISOR2 COBID ServerSDO Rx SUPERVISOR1 CanSetup Can2 1280h 2 601h COBID TxPDO2 COBID RxPDO1 CanSetup Can2 1800h 1 201h When this initialisation is over the SUPERVISOR can exchange data and events In this example the SUPERVISOR 2 sends positioning commands to the X axis of the SUPERVISOR 1 The SUPERVISOR 1 receives the order by a PDO and tells the end of the command by sending a PDO The position to reach is read in the variable 5 of the table read 32 bits variables of the SUPERVISOR 2 The SUPERVISOR 1 also makes the X axis
108. f EditCode AdjustCode Then Goto AdjustMenu Else Beep R403 75 SERAD S A Supervisor documentation Goto MainMenu End If To edit a string char displaying it on an exact place on the screen the SUPERVISOR had the EDITS instruction In this instruction you must define the string char variable lt Variable gt the line lt Line gt and row lt Row gt of the first editing character and the maximum length of this editing lt Length gt the syntax is lt Variable gt EDIT lt Line gt lt Row gt lt Length gt To edit a character on an operator panel the numeric and alphanumeric key are used the DEL key to erase ENTER key to validate and ESC key to escape To display an alphanumeric character you need to press the key one or more times AS Edit 2 9 5 Edit in line 2 row 9 of 5 characters 7 2 4 Buzzer Two possibilities are offered to use the buzzer of the SUPERVISOR To produce or to stop a continuous sound BUZZER instruction Syntax BUZZER lt ON OFF gt To make a brief sound BEEP instruction Syntax BEEP Example IF KEY lt gt ENTER THEN BEEP emit a beep on nter key press Alarm BUZZER ON emit a continuous sound during DELAY 1000 ais delay BUZZER OFF Stop the buzzer DELAY 1000 GOTO Alarm 7 2 5 Backlight The S640 had a function to control the backlight BACKLIGHT The backlight will become ina
109. f a task can call a subroutine of the same task One and only one PROG END PROG structure must be used by a program and may appear at any place in the program During the execution of the task the execution of the key word END PROG makes a branch on the key word PROG Subroutine A subprogram must be declared by a procedure SUB END SUB This procedure may be before or after the main program R403 51 SERAD S A Supervisor documentation To call a subroutine you should use the CALL function The subroutine called must be in the same task After a subprogram call the execution continues automatically with the instruction that follows the subprogram call You can stop subprogram executions by using the EXIT SUB instruction For example SUB Calcul Result 0 IF b S 0 THEN EXIT SUB If b is equal to zero the division is impossible Result a DIV b Division END SUB A subroutine can be called anywhere in the program but it can t call itself If datas are used in program and subroutine you should use some specific variables In fact all the variable can be modified by a subroutine you can assign the specific variables of a subroutine before it was called For example Diviseur S a Dividende S b CALL Divise IF Result gt 10 THEN SUB Divise Resultat 0 IF Diviseur S 0 THEN EXIT SUB Resultat Dividende Diviseur END SUB The branch to a subroutine launch
110. f the dictionnary s object who has been wrotten R403 140 SERAD S A Supervisor documentation 9 3 13 SDOSUBINDEX Sub index SDO Syntax lt Variable octet gt SDOSubIndex lt Can Card gt Description This function allow to know the sub index of the dictionnary s object who has been wrotten 9 3 14 SETUPCAN Configuration of a message Syntax SETUPCAN lt Board gt lt TX COBID gt lt RX COBID gt Accepted types lt TX COBID gt lt RX COBID gt Long integer Description This function configures the reception and transmission COBID before sending a message Remark lt Board gt must be a CANopen board 9 3 15 STARTCAN Start a CANopen board Syntax STARTCAN lt Board gt lt Node ID gt lt Freq gt Limits lt Node ID gt from 01h to FFh lt Freq gt from to 8 Accepted types lt Node ID gt lt Freq gt Byte Description This function links the CANopen board to the network Remark lt Board gt must be CANopen board 9 3 16 STOPCAN Stop a CANopen board Syntax STOPCAN lt Board gt Description This function puts the corresponding board out of the CANopen network Remark lt Board gt must be CANopen board 9 4 Examples 9 4 1 CANopen kink between two SUPERVISOR The communication configuration between two SUPERVISOR consists of giving a NodeID number to each SUPERVISOR Then a communication with SDO is possible when those are configured You can also
111. folder with the name of the project and for the first the prj extension and the second the rep extension Copy project Action This command has the same properties as Save as However this command doesn t change the date of the project creation R403 19 SERAD S A Supervisor documentation Close project Action Search in tasks Action This command closes the running project This command searches a text a word or a part of a word in all the tasks of the project A dialog box appears and gives all the functions to succeed A double click on a result line of a search edits the basic task at the right line Occurence to search Ditterence between lower and upper case Sort variables Action Compile project Icon Action Informations Action Printer setup Action Meere la cesse LA Necherrhes F Aris RH OF Than 4x lt X On E Shis lt f FOn Than Axei 0f Ot Valdaicn wie sm l ssk sM eI Trea Arif Or 0 z E fdhs eff On Than Aref 0f Valdain 21 1 4 01 0 I TO Or M 35 O ft 251 Ard ElalusiAOV E T 014 7d IF PO O fP 127 Or 8244 35 Or xk 5 And Slalus ONE TI Ar SCIALIE T 216 Weil PianPze 11 Ard frePo 1121 PasDeLe at 01 21 sis KHOE Di fo LEMIVEX T 91 If Asis RO Then Goto Errcui LEMIVE T 34 Suis SIC Fon Goo Enicur LEMIVEY T S IfAsis off OF Then Goto Eircu leMIVEY T 23 N s ofileCff ken Gozo Ericu 4 7 TS T8 T 8 CE RE TS TY TE Te
112. global variable TIMER For example EndDelay amp TIME 5000 timer of 5s is loaded WHILE TIME lt EndDelay amp DO Loop during 5s END WHILE EndTimeOut amp TIME 200 WAIT Inp Sensor 0n Or Time gt EndTimeOut Waiting for sensor or 200ms time out TIMER The internal global variable TIMER is designed to make active waiting of time This variable is a real that represents the number of milliseconds passed since power on This variable can then be used as time base for machines which are always powered on The integer part of the global variable is the seconds and the decimal part 3 figures after the point is the milliseconds Par example EndDelay TIMER 5 250 timer of 5 25s is loaded WHILE TIMER lt EndDelay DO Loop during 5 25s END WHILE EndTimeOut TIMER 0 200 WAIT Inp Sensor 0n Or TIMER gt EndTimeOut Waiting for sensor or 200ms time out 5 1 3 Events In a multi tasking system events mechanism are very useful for inter process communication Event handling may also provide process control functions Event handling instruction allows sending waiting and receiving events Programs can wait for or sent the same event In the programming language there are two mechanisms for events functions Signal or Diffuse and Wait Event To send an event to only one task there is the SIGNAL function To send an event to all t
113. he tasks there is the DIFFUSE function Syntax SIGNAL lt EventName gt or DIFFUSE lt EventName gt The lt Eventname gt can be any non keyword name but must be used at least once in an event waiting or receiving function SIGNAL sends the event to the first task which is waiting it But DIFFUSE sends the event to all the tasks which are waiting it amp The WAIT EVENT instruction is used to wait an event The syntax of the WAIT EVENT instruction is WAIT EVENT lt EventName gt After WAIT EVENT instruction program execution is paused and will be resumed when event is received Example with SIGNAL and WAIT EVENT Master task Slave task PROG PROG RUN SlaveTask Beginning WAIT Inp StartCycle 0n R403 61 SERAD S A Supervisor documentation SIGNAL Start WAIT EVENT Start GOTO Beginning 44 END PROG WAIT Inp StopCycle 0n HALT SlaveTask END PROG In this example there is a master task that controls slave task execution Master task is waiting for start button pressed state When this state is reached the master task starts slave task by sending start event If stop button is pressed master task handles this state and stops slave task Slave task is idle and waiting for the start event When this event is received slave task executes a loop Example with DIFFUSE and WAIT EVENT Master Task Slave task PROG PROG RUN SlaveTask Beginning
114. he TIMER instruction to suppress the crossing of 2131 to 2431 Example Tempos Time 5000 loads 5s delay WAIT INP Start On Or Time gt Time if the start input is not activate in the 5s the program continues See also TIMES TIMER 8 14 144 TIMER Wide time base Syntax TIMER Description This instruction returns a real which represents the number of milliseconds from the last power on This instruction allows to execute no locking waits At the start up of the SUPERVISOR TIMER is equal to zero and increases with a step equal to 0 001 ms Example Timer Timer 5 25 loads 5 25 delay WAIT INP Start On Or Timer gt Time if the start input is not activate in the 5 25s the program continues See also TIMES TIME DATES 8 14 145 TIMES Current hour Syntax TIMES Description This instruction returns a 8 chars string with hh mm ss form where hh are the hours 00 23 mm are the minutes 00 59 and ss are the seconds 00 59 See also TIME TIMER DATES R403 123 SERAD S A Supervisor documentation 8 14 146 TX485 Modify RS485 output state Syntax Accepted types Description Remarks Example TX485 lt Number gt lt Expression gt Expression Integer This function enable RS485 port output for a specified number of characters If number is 0 then output is disabled lt Number gt is number used to open communication port with the OPEN function In RS
115. he characters in the output buffer of the communication port Remarks lt Number gt is the number used to open the communication port with OPEN instruction Example CLEAROUT 1 Print AS Write the characters See also CAROUT R403 94 SERAD S A Supervisor documentation 8 14 32 CLOSE Close communication port Syntax CLOSE Number Description The number argument is the number used in the OPEN instruction to open the communication port Remarks If you want to change the communication mode you must close and open once again the communication port Example CLOSE 1 See also OPEN INPUT and PRINT 8 14 33 CLS Clear screen Syntax CLS CLS 1 CLS 2 CLS 3 or CLS 4 only with Supervisor 80 CLS B CLS W only with Supervisor 640 Description CLS clears the four lines of the operator panel screen CLS 1 CLS 2 CLS 3 CLS 4 clears respectively the first second third and fourth line of the operator panel Supervisor 80 screen The function CLS B clears the screen of the Supervisor 640 with a black background The function CLS W clears the screen of the Supervisor 640 with a white background 8 14 34 CLEARFLASH Clear flash memory Syntax CLEARFLASH Description This function clears parameters and the first 10000 safe variables in the flash memory See also RAMOK FLASHOK FLASHTORAM 8 14 35 COUNTER_S Counter reading Syntax lt Variable gt COUNTER_S lt Counter gt Accepted t
116. he execution of this instruction don t launches the execution of the next task Exemple ICALL Move Voir aussi SUB CALL 8 14 66 IF IF Then Else Syntax 1 Syntax 2 Description Remarks IF lt Condition gt THEN lt Instruction 1 gt ELSE lt Instruction2 gt END IF IF lt Condition gt THEN lt Instruction1 gt ELSE lt Instruction2 gt Allows the conditional execution based on the expression evaluation The keyword IF begins a control structure IF THEN ELSE END IF It must appear before all other part of the structure lt Condition gt must be a boolean expression If lt Condition gt is right then lt Instructions1 gt are executed R403 103 SERAD S A Supervisor documentation If lt Condition gt is false then lt Instructions2 gt are executed Example IF a gt 1 AND a lt 10 THEN Locate 1 1 Print Length 1 Else Locate 2 1 Print Width 1 END IF See also END 8 14 67 INKEY Read a key on the operator panel Syntax lt Variable gt INKEY Accepted types Variable Byte Description This function reads a key from the keyboard of the operator panel and returns its code Remarks This function does not stop the task Cette fonction est non bloquante pour la tache If the input buffer is empty no key has been pressed this function returns 0 Example REPEAT A INKEY UNTIL A lt gt 0 8 14 68 INP
117. his instruction emits a brief sound on the SUPERVISOR Example IF KEY lt gt ENTER THEN BEEP Voir aussi BUZZER 8 14 22 BOX Draw box Syntax BOX X1 Y1 X2 Y2 BorderColour FillColour Units X1 Y1 X2 Y2 pixel Limits X1 X2 1 to 240 Y1 Y2 1to 128 Accepted types X1 Y1 X2 Y2 FillColour Byte BorderColour Bit Description This instruction draws a box with the coordinates X1 Y1 top left corner and X2 Y2 down right corner on the operator panel S640 Remarks The BorderColour parameter defines the colour of the border black 0 or white 1 The FillColour defines the colour of the filling black 0 white 1 or transparent 2 Example BOX 10 50 85 15 0 1 Black border with white fil colour x 50 15 8 14 23 BUZZER Continuous sound Syntax BUZZER lt ON OFF gt Description This function activates or desactivates the buzzer of SUPERVISOR Example Alarme BUZZER ON DELAY 1000 BUZZER OFF DELAY 1000 GOTO Alarme See also BEEP R403 92 SERAD S A Supervisor documentation 8 14 24 CALL Subroutine call Syntax Description Remarks Example See also CALL lt Name gt This instruction calls a subroutine define by SUB block lt Name gt is the block name of the subroutine A subroutine can t call itself System contains some predefined subs _MENUMCS PARAMMCS MANUMCS VARIABMCS MEMORYMCS and CLOCKMCS The ex
118. iable gt Boolean This function permits to know if a message has been receipted lt Board gt must be a CANopen board You have to tell the parameters of the reception COBID to receive the message 9 3 6 CANLOCAL Read or write a local variable Syntax Syntax Syntax Syntax Syntax Syntax Limits 1 2 3 4 5 6 CANLOCAL lt Board gt lt Index gt lt Expression gt lt Variable gt CANLOCAL lt Board gt lt Index gt CANLOCAL lt Board gt lt Index gt lt Expression gt lt Variable gt CANLOCAL lt Board gt lt Index gt CANLOCAL amp lt Board gt lt Index gt lt Expression gt lt Variable gt CANLOCAL amp lt Board gt lt Index gt lt Index gt from 0000h to FFFFh Syntax 1 and 2 lt Variable gt lt Expression gt from 00h to FFh Syntax 3 and 4 lt Variable gt lt Expression gt from 0000h to FFFFh R403 138 SERAD S A Supervisor documentation Accepted types Description Remark Syntax 5 and 6 Syntax and 2 Syntax 3 and 4 Syntax 5 and 6 lt Variable gt lt Expression gt lt Expression gt lt Variable gt lt Expression gt lt Variable gt lt Expression gt lt Variable gt 7FFFFFFFh Byte Integer Long integer This function can read or write a local variable of the CANopen board dictionary of the SUPERVISOR The syntax 1 and 2 are giving an access to a table of 8 bits non signed
119. in the output buffer of the communication port R403 93 SERAD S A Supervisor documentation Remarks Example See also lt Number gt is the number used to open the communication port with OPEN instruction WAIT CAROUT 1 lt 10 Waits for place in the buffer Print AS Characters writing CARIN CLEAROUT 8 14 28 CHR Convert ASCII to char Syntax Accepted types Description Example See also CHR lt Code gt Code Byte This function returns a one character string whose ASCII code is the argument a 97 bS CHRS a Result bS a ASASC_C 8 14 29 CLEARCOUNTER Counter clear Syntax Accepted types Description Remarks See also CLEARCOUNTER lt Counter gt lt Counter gt Byte This instruction initialise the counter to zero lt Counter gt Counter number 1 or 2 COUNTER S SETUPCOUNTER 8 14 30 CLEARIN Clear input buffer Syntax Description Remarks Example See also CLEARIN lt Number gt This instruction suppresses all the characters in the input buffer of the communication port lt Number gt is the number used to open the communication port with OPEN instruction CLEARIN 1 Wait CARIN 1 gt 3 Wait for at least 3 characters A Input 1 3 Read 3 characters CARIN 8 14 31 CLEAROUT Clear output buffer Syntax CLEAROUT lt Number gt Description This instruction suppresses all t
120. integer CLOSE 1 Close the serial port For all the numeric variables of the list the beginning of the number is detected when the first character is not a space character The end of the character is detected with a space a comma or a carriage return character An underscore character is a zero If the numeric variable is not valid the variable takes the zero value For all the string variables of the list the beginning of the string is detected when the first character is not a space character The end of the character is detected with a space a comma or a carriage return character An underscore character is a string with a string length equal to zero The INPUTS instruction reads some characters on the communication port and stores them in a string char The syntax is lt StringcharVariable gt INPUT lt ComNumber gt lt LengthOfCharacters gt This two instructions stop the task as long as the number of received characters is not valid 6 4 Writing data gt Transmit buffer Each serial port have a transmit buffer with 500 bytes length The characters which are sent by a task with the PRINT instruction are send to the transmit buffer These characters are transmitted one after one on the serial link If the transmit buffer is full 500 characters in the buffer the task which wants to send data is suspended as long as the transmit buffer is full The CLEAROUT instruction clears the buffer The CAROUT instruc
121. is function allows to drive the LEDs of SUPERVISOR Definition of the LED de F1 to F6 or ALARM or HELP Definition of their state switch off 0 light 1 blink 2 LED ALARM 2 blink alarm DEL 8 14 81 LEFTS String left part Syntax Accepted types Description Remarks Example LEFTS lt String gt lt Number gt String Char string Number Integer This function returns the first lt Number gt left characters of a string To find the character numbers in the string lt String gt use LEN lt String gt a Sensorl b LEFTS a 6 Result bS Sensor R403 107 SERAD S A Supervisor documentation See also RIGHT LEN 8 14 82 LEN String length Syntax Description Example See also LEN lt String gt This function returns the number of characters of a string a Sensorl b LEN a Result b3 7 INSTR 8 14 83 LOCATE Cursor position Syntax Limits Accepted types Description Example LOCATE lt Line gt lt Row gt Line 1 to 4 for Supervisor 80 or 1 to 16 for Supervisor 640 Row 1 to 20 for Supervisor 80 or 1 to 40 for Supervisor 640 Line Row Byte This function is used to select the cursor position LOCATE 1 1 PRINT lt MAIN MENU gt 8 14 84 LOG Logarithm Syntax Accepted types Description Remarks Example See also LOG lt Expression gt Expression real Re
122. is function change the logic state of the 8 associates images outputs Remarks lt Outputs gt must represente the name of 8 outputs blocks Exemple PLCOUTB Bloc1 0Fh See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTW 8 14 109 PLCOUTW Write a 16 outputs block Syntaxe PLCOUTW lt Output gt lt Expression gt Accepted types Expression Integer Description This function change the logic state of the 16 associates images outputs Remarks lt Outputs gt must represente the name of 16 outputs blocks Exemple PLCOUTW Bloc1 0FFFFh See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB 8 14 110 PLCREADINPUTS Read the PLC inputs Syntaxe PLCREADINPUTS Description This function read the PLC inputs and memorize them into the images bits table See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 111 PLCWRITEOUTPUTS Write the PLC outputs Syntax PLCWRITEOUTPUTS Description This function write the PLC ouputs memorized into the images bits See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 112 POWERFAIL Power fail detect Syntax POWERFAIL lt ON OFF gt Description This function activates or inhibits power fail detect Remarks Power fail detect is activated at power on R403 115 SERAD S A Supervisor documentation 8 14 113 PRI
123. it Description This function allows to edit a real number with the operator panel by using the numerical keys the DEL key to suppress the ENTER key to valid and ESC to escape The second syntax defines the access code mode of editing Code 1 In this case all the key press display a star on the operator panel The execution of this instruction launches the execution of the next task Remarks lt Line gt et lt Row gt are the first character position lt Length gt is the maximum number of characters lt Sign gt is a boolean value which indicates if the sign can be changed lt Point gt is a boolean value which indicates if the point is permitted The R403 98 SERAD S A Supervisor documentation system variable KEY contains the last pressed key If the edition is aborted then KEY ESC and otherwise KEY RETURN Example A EDIT 1 10 4 0 0 Capture in line 1 row 10 on 4 characters the sign and the point are not autorised A EDIT 1 10 4 0 0 1 Same capture with access code mode 8 14 49 EDITS Syntax lt Variable gt EDIT lt Line gt lt Row gt lt Length gt Limits Line 1 to 4 for Supervisor 80 or 1 to 16 for Supervisor 640 Row 1 to 20 for Supervisor 80 or 1 to 40 for Supervisor 640 Accepted types Variable Char string Line Row Length Integer Description This function allows to edit a by using the alphanumeric keys the DEL key to suppress the ENTER key to vali
124. ity slice All the tasks with a normal priority are executed one after one in this slice Each task executes its instructions up to the ending condition executes a locked task ageing time reached Normal slice execution time Normal slice time Maximal execution time of a normal priority slice normal slice time ageing time The normal slice time is defined in the Options menus All the task must be compiled after a modification If the execution time of all the normal priority tasks are lower than the normal slice time all the tasks are executed one times and the high priority slice is executed In the opposite case the system gives the hand at the high priority slice even if all the normal priority tasks aren t executed These tasks will be executed in the next normal priority task Example T1 T2 high priority tasks T3 T4 T5 T6 normal priority tasks Ageing time 2 ms Normal slice time 6 ms The execution cycle will be T1 T2 13 T4 T5 T1 T2 T6 T3 T4 T1 T2 TO TG T3 1 4 3 3 Management of task Each task can have a starting mode defined at its creation Automatic start At each power on of SUPERVISOR the task is launched automatically Manual start The task is not launched automatically A project must contain at least a task with automatic starting mode You should have a task which have the initialization part and the launching task part There are 5 types of instructions to
125. k command can be obtained in two different ways Comment amp In the Tasks menu A right click opens a menu with the Add command The modify command allows the modification of the tasks parameters The Modify a task command can be obtained in two different ways In the Tasks menu select the task to modify before A right click opens a menu with the Modify command select the task to modify before The Show command launches the editor of task according to the type choose basic or ladder This command can be obtained in three different ways In the Tasks menu select the task to show before A double click on the task to show A right click opens a menu with the Show command select the task to show before The Delete command suppress a task in the project This command can be obtained in two different ways In the Tasks menu select the task to delete before A right click opens a menu with the Delete command select the task to delete before Attention A ladder task is automatically traduct in basic It s advise to not write a long or complex ladder task in order to avoid time cycle detoriorations and basic traduction limit R403 4 SERAD S A Supervisor documentation 3 5 Editors 3 5 1 Basic task editor The basic editor has a zone to edit the program a toolbox to help the user and another optional zone with all the paramet
126. l valid expressions lt Expression1 gt and lt Expression2 gt must have the same type IF b gt a THEN 2 a lt les 8 14 12 Right shift gt gt Syntax Accepted types Description Remarks Example lt Expression1 gt gt gt lt Expression2 gt Byte or Integer This operator shifts lt Expression2 gt bits from lt Expression1 gt from left to right lt Expression2 gt is the number of bits to shift The shifting is not circular a 11010b R403 89 SERAD S A Supervisor documentation b a gt gt 2 Result bs 110b See also SS 8 14 13 Exponent Syntax lt Expression1 gt lt Expression2 gt Accepted types Byte Integer Long integer or real Description this operator raises lt Expression1 gt to the lt Expression2 gt power Example al b 2 a b 8 14 14 ABS Absolute value Syntax ABS lt Expression gt Accepted types Byte or Integer Description This function provide the absolute value of lt Expression gt A negative number is then converted in a positive number Remarks lt Expression gt must be a valid numerical expression The absolute value of a number is its no signed value Example a ABS 100 Result a 100 a ABS 25 Result at 25 8 14 15 AND Operator AND Syntax lt Expression1 gt AND lt Expression2 gt Accepted types Bit Byte or integer Description This function makes a binar
127. layer CAL CANopen offers only part of the communication services that CAL has at its disposal Those are the necessary advantages that need small performances computer without storage capability So the CANopen is an application layer standardised by the CIA CAN In Automation specifications DS 201 DS 207 The network manager permits an easier network initialisation The network can be extended with all the components the user wants to The CAN bus is a multi master bus The sent messages are identified instead of the connected modules as in the other field buses The network elements are allowed to send their message each time the bus is free Bus conflicts are solved with a priority level given to messages The CAN bus emits messages divided among 2032 priority levels All the network elements have the same rights so this communication is possible only without master bus Each element is deciding itself when it has data to send However it is possible to send data with another element This demand is made with the distant frame The CANopen specifications DS 201 DS 207 define the technical and functional characteristics needed by any device to be plugged in the network The CANopen bus makes a distinction from the server devices and the client devices 9 1 2 CANopen communication The CANopen communication profile permits to specify information for data exchange in real time and parameters The CANopen uses optimised services foll
128. le PDO sign Node Id Transmission type oits ead 254 Type de l mission sign 8 bits non param tre d mission du 3 me PDO PDO PDO o Number of elements sign COB ID 32 bits non aucune COB ID utilis par le PDO sign EL 8 bits non Transmission type Rue 254 Type de l mission sign N o N Transmission type 8 A 254 Type de l mission 8 bits non 2 2 Number of elements 2 COB ID qe oe non aucune COB ID utilis par le PDO sign 2 2 o param tre d mission du 5 me 5 5 8 bits non param tre d mission du 4 me Number of elements ner sign PDO COB ID Be Pps ON aucune COB ID utilis par le PDO sign 5 5 N sign Transmission type E Dis non 254 Type de l mission sign 8 bits non param tre d mission du 6 me sign o Number of elements COB ID 32 bits non aucune COB ID utilis par le PDO sign 8 bits non Transmission type hrs 254 Type de l mission sign 8 bits non param tre d mission du 7 me Number of elements Lio sign PDO COB ID 32 cine aucune COB ID utilis par le PDO 8 bits non sign 8 bits non param tre d mission du 8 me sign PD COB ID a2 e aucune COB ID utilis par le PDO Transmission type E pts oe 254 Type de l mission sign Read 32 bits variables 32 bits aucune sign N o Transmission type Type de l mission Number of elements Read 8 bits variables ts aucune sign
129. long integer Convert string to reverse long integer Convert string to integer Convert string to reverse integer Convert long integer to integer Convert long integer to string Convert reverse long integer to string Convert integer to string Convert reverse integer to string Convert real to long integer Conversion real to integer Conversion real to byte R403 86 SERAD S A Supervisor documentation 8 14 Alphabetic list 8 14 1 Addition Syntax lt Expression1 gt lt Expression2 gt Accepted types Byte Integer Long integer real or string Description This operator adds two numeric expressions and return a value type identical as its operand Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt et lt Expression2 gt must have the same type Example a 10 bS 5 c a b5 Result c 15 See also and 8 14 2 Subtraction Syntax lt Expression1 gt lt Expression2 gt Accepted types Byte Integer Long integer or real Description this operator subtract lt Expression2 gt from lt Expression1 gt and return a value type identical as its operand Remarks lt Expressionl gt and lt Expression2 gt must be numerical valid expressions lt Expression1 gt and lt Expression2 gt must have the same type Example a 10 bs 5 c a bs Result c 5 See also e et A 8 14 3 Multiplication Syntax lt Expression
130. manage the tasks Run launch a task which is stopped Suspend suspend pause a task in execution Continue continue the execution of a suspended task Halt Stop an executed task R403 50 SERAD S A Supervisor documentation Status indicates the state of the task Example Menusl task Menus2 task Prog Prog Run Menus2 If Key ESC Then Halt Menus2 Wait Status Menus2 0 Lu End Prog End Prog To synchronize the tasks each other the Signal and Wait Event instructions or global variables can be used Example ProcessEnable global bit variable Processl task Process2 task Prog Prog ProcessEnable 1 Wait ProcessEnable 1 Wait ProcessEnable 0 KX s ProcessEnable 0 End Prog 4 3 4 Basic task structure Each task is constituted with a main program defined with the key word PROG and END PROG and with subroutine defined with the key word SUB END SUB For example Task1 Task2 SUB SubRout1 SUB SubRout3 PROG 2 PROG 7 R END SUB k END SUB CALL SubRout1 e CALL SubRout3 a END PROG CALL SubRout2 CALL SubRoutd e e SUB SubRout2 ne SUB SubRout4 END PROG END SUB END SUB Main program The main program of a task can call all its subroutine but it can t call the subroutine of others tasks A task is a file In the last example the task 1 can call the subroutine 1 and 2 but it can t call the subroutine 3 and 4 A subroutine o
131. me P riph riques give the affectation of the different connectors R403 33 SERAD S A Supervisor documentation A Serial 1 Serial 1 None x r Action Allow to configure the serial port com 1 with this parameters the rate the number of data s bit the parity the bit s stop B Serial 2 Action Allow to configure the serial port com 2 with this parameters the rate the number of data s bit the parity the bit s stop R403 34 SERAD S A Supervisor documentation C Serial 3 x Carn Clear State Stopped Error ES Rx Es Tx Es Server SD0 Client SDO Tx PDO Rx PDO Action Allow to configure the CANOpen communication between SUPERVISOR and MCS32EX Local Remote Speed NodelD 500 Kb s y NodelD 1 Timeout 2 Fo 3 ms Card Link test State Stopped State Stopped Start Stop Start Stop Action Allow to supervise the CANOpen communication between SUPERVISOR and MCS32EX D Inputs a Card R403 35 SERAD S A Supervisor documentation Action Allow to give a name to inputs bloc and set a filtering b Bloc 1 Hea we ls ay a a oe te Ho Tte He Me rte BABI ld Action Allow to give a name to each input s bit and inverse them In debug mode you can see their state and modify them c Bloc2 R403 36 SERAD S A Supervisor documentation Ac
132. must represent a TOR input name The data type returned is a bit Exemple C PLCINP CouteauEnHaut See also PLCINIT PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 103 PLCINPB Read a 8 inputs block Syntax PLCINPB lt Inputs gt Accepted types Inputs Byte Description This function return the state of a block of 8 TOR inputs Remarks lt Inputs gt must represente the name of 8 inputs The data s type returned is a byte Exemple B PLCINPB Data See also PLCINIT PLCINP PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 104 PLCINPNE Read a negative edge on PLC TOR input Syntax PLCINPNE lt Input gt or PLCINPNE lt Card number gt lt Input number gt Accepted types lt Input gt Bit lt Card number gt lt Input number gt Byte Description This function indicate if a negative edge is make on the PLC TOR input Remarks lt Input gt must represente the name of a TOR input The data s type returned is a Bit R403 113 SERAD S A Supervisor documentation Exemple If PLCINPNE CouteauEnHaut Then goto FrontDetecte See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCOUT PLCOUTB PLCOUTW 8 14 105 PLCINPPE Read a positive edge on PLC TOR input Syntax PLCINPPE lt Input gt or PLCINPPE lt Card number gt lt Input number gt Accepted types lt Input gt Bit lt Card number gt lt Input number gt Byte Description This functio
133. n and 580h NodeID in emission The default COBID of the first PDO are 200h NodelD for the reception and 180h NodelD for the emission You configures the clients in accordance with that Initialisation of the SUPERVISOR Start the board at 500KBits s on the node 1 StartCan Canl1 1 5 COBID ClientSDO Rx SUPERVISOR COBID ServerSDO Tx I O CanSetup Can1 1280h 1 582h COBID ClientSDO Tx SUPERVISOR COBID ServerSDO Rx I O CanSetup Can1 1280h 2 602h COBID TxPDO SUPERVISOR COBID RxPDO I O CanSetup Can1 1800h 1 202h COBID RxPDO SUPERVISOR COBID TxPDO I O CanSetup Can1 1400h 1 182h The I Os devices need the sending of the message NMT Start so they can be operational To send this message you use the general CAN functions SetupCan Canl 0 0 Use the le COBID 0 to access to the NMT server Nmt Chr 1 Chr 2 The module NodeID is 2 Can Can1l Nmt Read and write I Os by SDO can be like that A CanRemote Can1 6000h 1 Read inputs 1 to 8 A CanRemote Can1 6000h 2 Read inputs 9 to 16 CanRemote Canl 6200h 1 01000100b Updates outputs 3 and 7 It is possible to receive inputs states and to modify outputs states with the PDO The contents of the PDO is depending on the mapping defined by the construction Wait PDOEvent Can1 1 Wiats fr a change on the inputs ES PDO Can1 1 Reads the PDO E1 ASC MIDS E 1 1 Reads the first inputs bloc If El 3 Then Uses
134. n basic It s advise to not write a long or complex ladder task in order to avoid time cycle detoriorations and basic traduction limit 5 2 2 Contacts coils timers and counters Contacts AH 4H oH AH Normal Invert Contact with positive Contact with negative contact contact edge detection edge detection An input name output name or bit name can be assigned to a contact A system bit name can be assigned only to a normal or invert contact Normal contact The state of the contact is the state of the variable assigned Invert contact The state of the contact is the invert state of the variable assigned Contact with positive edge detection The state of the contact is true when the assigned variable is in the transition state false to true Contact with negative edge detection The state of the contact is true when the assigned variable is in the transition state true to false Coils lt gt DO Normal coil Invert coil SET coil RESET coil An output name or a bit name can be assigned to a coil An input name or a system bit can t be assigned to it Normal coil The state of the coil is the state of the expression assigned Invert coil The state of the coil is the invert state of the expression assigned Coil with SET action The state of the coil is true when the expression is true The state of the coil is false when the Reset coil is activated Coil with RESET action The state of the coil is
135. n indicate if a positive edge is make on the PLC TOR input Remarks lt Input gt must represente the name of a TOR input The data s type returned is a Bit Exemple If PLCINPPE CouteauEnHaut Then goto FrontDetecte See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPNE PLCOUT PLCOUTB PLCOUTW 8 14 106 PLCINPW Read a 16 inputs block Syntaxe PLCOUTW lt Output gt lt Expression gt Accepted types Expression Integer Description This function change the logic state of the 16 associates images outputs Remarks lt Outputs gt must represente the name of 16 outputs blocks Exemple PLCOUTW Bloc1 O0FFFFh See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUT PLCOUTB 8 14 107 PLCOUT Write a output Syntax PLCOUT lt Output gt lt Expression gt or PLCOUT lt Card number gt lt Ouput number gt lt Expression gt Accepted types Expression Bit lt Card number gt lt Output number gt Byte Description This function change the logic state of image bit Remarks lt Output gt must represente the name of an output Exemple PLCOUT Couteau ON If PLCOUT Voyant Then goto Alarm See also PLCINIT PLCINP PLCINPB PLCINPW PLCINPPE PLCINPNE PLCOUTB PLCOUTW R403 114 SERAD S A Supervisor documentation 8 14 108 PLCOUTB Write a 8 outputs block Syntaxe PLCOUTB lt Output gt lt Expression gt Accepted types Expression Byte Description Th
136. n no nn ron rra nrnnnrannnnnnns 45 ADD A rics ith meh ts No lis ao ee A red oat de o lO dret Ra E nl at A 46 4 2 le Globalis onstanits allas llos 46 4 22 Global variables ta nn Du rie das ad 46 4235 Local Vanables a id ein ie 47 e A Conv rt datd types c0 2 23 seins A E nn eo e nn Gia 48 4 2 5 NUMETIC MOLALONS te ta ado eo cles Gielen er e Gia 49 ASE SR Te a dt ce he Ga leet be Rout stash RAR ee AN GR ADL EUS ee ARE Re Ge acdsee inl ak np a ee 49 4 3 1 Multitask principles ac sinusite aus Radeon tite maternels caveman 49 4 322 Task priority Le waa ochre RGR ansehen d Guess Ganka wenaaeeae 50 4 3 3 Management of task nue annee ia Wan Geka e 50 4 3 4 Basic task Structure cora epi 51 Main prootamin fre nt es Re en ne ee Me sien t s toc tsi asGdanienyet vente Me eee tes mit male eee 51 A inner Li nn 0 a ec 51 Bratich Ee EAEE Le er A ee ee rames le en Ma li acted Jue pve Mat tir 52 OP TALOTS ss tr te AE A 52 a Arithmetical operators eee 53 b s_ Binary operators A Rent nee Mes ta lie e e red 53 C1 Wary Operators sn een tel O A S 53 d Logical operators ss 54 Ce BILSIODeTALOTS nn E ee uae baste ee 4 le turn td ies E 54 f SITINC Operators cc oe Ee De o e ee ee Ass A Se 54 g Relationship operators eee 54 Bye TeStS Enr ner O liens 54 Simple tests ci raid 54 b Multiple tests ii ide 53 O ON 53 4 3 5 EventtasieS tucan IA aa ila wasn lass 56 Events Configuration is seccsccessceseeacecetcessedes
137. n the task ageing time This time is defined in the Options menu All the task must be compiled after a modification execute a lock instruction gt Wait Delay gt Beep Edit gt ClearFlash FlashToRam RamToFlash execute a loop or jump instruction gt Call gt Goto Case gt For Next gt Repeat Until gt While End While gt End Prog The Jump instruction make a jump without launching the next task In general a short task will treat events faster than a big task R403 49 SERAD S A Supervisor documentation 4 3 2 Task priority Each users task have a priority level high priority normal priority The multi task kernel allocates two slices of execution the high priority slice for the tasks with high priority a normal priority slice for the tasks with normal priority The slice chain during execution is high priority slice normal priority slice high priority slice normal priority slice amp High priority slice All the tasks with a high priority are executed one after one in this slice Each task executes its instructions up to the ending condition executes a locked task ageing time reached Maximal execution time of a high priority slice number of high priority task ageing time The ageing time is defined in the Options menus and is the same for the high and normal priority task All the task must be compiled after a modification amp Normal prior
138. ne in the ram zone and starts the task If RAMOK 0 and data flash copy zone is blank the SUPERVISOR doesn t start the task and indicates an error 20 on the status display See also FLASHOK RAMTOFLASH FLASHTORAM 8 14 116 RAMTOFLASH Backup saved variables Syntax RAMTOFLASH Description This function backups parameters and the first 10000 saved variables in flash memory See also RAMOK FLASHTORAM FLASHOK R403 116 SERAD S A Supervisor documentation 8 14 117 READKEY Return the state of terminal keyboard Syntax Accepted types Description Remarks Example lt Variable gt READKEY Variable Byte This function reads the state of the keyboard of the operator panel and returns the code of the pressed key This function does not stop the task Cette fonction est non bloquante pour la t che If the input buffer is empty no key has been pressed this function returns 0 Use this funtion if you want to make movement JOG JOG on an axe REPEAT A READKEY UNTIL a lt gt 0 8 14 118 REALTOLONG Convert a real to a long integer Syntax Accepted types Description Example REALTOLONG lt Expression gt Expression real This function converts a real type data in a long integer type data A Edit 1 1 4 0 0 B amp RealToLong A 8 14 119 REALTOINTEGER Convert a real to an integer Syntax Accepted types Description Example
139. nsotessussecatenssetsnstaecedenssoavssensacdensseateses 140 9 3 12 SDOINDEX Index SDO si o oeer re i EEEE EE AE EN EEE EN EANA TENE 140 9 3 13 SDOSUBINDEX Sub index SDO een 141 9 3 14 SETUPCAN Configuration of message 141 9 3 15 STARTCAN Start a CANopen board 141 9 3 16 STOPCAN Stop a CANopen board 141 OA EX AMPOSTA a dl ie A 141 9 4 1 CANopen kink between two SUPERVISOR ss 141 9 4 2 CANopen linking between a SUPERVISOR and an I Os module 0 00 00 ecceecceeseeeeceeeeeteeeeeeteenaees 143 10 REMOTE CONTROL sissssscsscsssontessecentecsossstenssssnsaisonssdossessnsessosenteissssnsasssasndassssendasessensasssssnsatevaonsvsonss 144 LOTE GONNECHONS cc 25 2 coos AT mL di da Es 144 L022 LANK CSTADUISNIM CHE iia mere vance tordre obebs jai Stan a Toe vita Isdin denia ELAS Ea Soh 145 L0 3 List of the validated Modems ss sense nat tn tel ea tes 151 11 APPENDIX A nn trente ti nn ind nn ni ed int etienne ne O 152 l I 1 Execution errors Messages AS ad ARAL Ae knees he ee 152 1122 COMPUEF ErrORMESSAEOS das 153 R403 8 SERAD S A Supervisor documentation 1 INTRODUCTION 1 1 Description of SUPERVISOR Generality The SUPERVISOR is an intelligent operator terminal that is capable of completely managing the automated operation of a machine Using its communication ports it can communicate by serial link or fieldbus with the various elements of an automated system such as intelligent drives
140. nstallation procedure iii id 15 3 1 3 Upgrade from previous Versions 16 TO NE UTA IA EE O EEE ee EE 16 SS O RR NO 16 3 2 2 Project Contents iii ei nte 17 ID DOSCHIPHON o tn Le Re en en 17 E ON 17 3 4 MeEnUS And ICONS rss letales 18 3 41 Project ment sense Rene tn dir tn re enter tee Me des nee ete etant en 18 3 4 2 Constants Variables Tasks menu 21 3 4 3 D bug Melo lil cia a lid seront 22 3 4 4 Comm nication MEU ii 28 O aal LE MEE N E TT RE Ne ee Re are a ls LE 31 SAO HeIB M NU EL E5 0 A Te A ands E EA 33 3 427 Confisgurationtabi58 e o TS 33 AN SIA a A ase EE A Soe ed re 34 Bj VST Deas E ER ad ha ie N est ta Seen ee E AE daa Seen Ne the EtG 34 y E EE SET ee eet O re 35 O A O OO oh ere 35 E A ON 35 DA Bl e e NS mr ner 36 A 21 101E SA E E EE O E RN 36 1 AAA REO TA 37 O AN E 38 3 4 8 Global constants abi see idecne cues a E iE E E TE iaai 38 324 9 Global variables tabia 55cm n sa 39 3242102 Tasks tab line tec Ales nid Bie ered Bieta mr he leben a en 40 R403 2 SERAD S A Supervisor documentation De cE ALON tosses ces ney ec ca usenet RA ea ese Meee deh LAN Ne Mat EAS 42 Se Sele BASIC task RN 42 25 2 Ladder task editors ss en e AR EU O RU M coches Sadia Mi te fesse lente 43 4 PROGRAMMATION LANGUAGE smsremnnennennnnnennnnnennennnnnnenennennnennnses 45 ALLAN TEO AAE AAAA Rd A de de e LA 45 ES A A O E 45 4 1 2 Memory plan of SUPERVISOR nono noconncnncn nono nncnn ron nron nr nn rr n
141. nstruction These menus are used like a sub routine The name of the menus begins with the character The syntax is CALL lt Name of menu gt 7 4 2 Main menu Main Menu MENUMCS Syntax CALL_MENUMCS Version du system Operating System Yersion 1 03 d exploitation Project TtComlO Compiled on 30 08 2001 at 09 28 57 Nom et dateide compilation projet PARAM MANU VARIAB MEM CLOCK gt Function Gives the access of all the sub menus Keys R403 77 SERAD S A Supervisor documentation Fl parameters sub menu F2 manual sub menu F3 variables sub menu F4 memory sub menu FS clock sub menu F6 Next page ESC quit menu Off lt TASK WDOG Function Gives the access of all the sub menus Keys F1 Previous page F2 taks sub menu F3 watchdog sub menu ESC quit menu 7 4 3 Parameters sub menu Parameter sub menu PARAMMCS Syntax CALL PARAMMCS System Menu Parameters Inputs Invert 000000000000 Outputs Invert 20 INPUTS OUTPUTS FILTER BACKLIGHT Keys FI Set F2 RESET R403 78 SERAD S A Supervisor documentation F1 LEFT F2 RIGHT ESC Exit menu or return in main menu 7 4 4 Manual sub menu Main menu MANUMCS Syntax CALL MANUMCS Inputs Outputs SET RESET LEFT RIGHT Keys FI Set F1 LEFT F2 RESET F2 RIGHT ESC Exit menu or return in main menu 7 4 5 Variables sub menu Main menu VARIABM
142. nt it answers OK R403 146 SERAD S A Supervisor documentation e Setting up the modem 2 connected to the PC The setting up of the modem connected to the PC is done by modifying the information in the Modem part of the SUPERVISOR INI file that is in the Windows directory C Windows or C Winnt for example This set up have to following objectives Initialising the modem Remove handling of the DSR and DTR signals to avoid automatic hang up when the communication port is closed Defining the way the calls are made and how to hang up the line Defining the messages sent by the modem Example Parameters for an 3Com Us Robotics Sportster modem type Parameter Initl Value ATZ Meaning Using default factory settings Parameter Init TimeOut Value 5 Meaning Maximal waiting delay in 1 10 before the modem answer Parameter Init2 Value AT DO8280 Meaning Remove the DTR and DSR handling Parameter Init2TimeOut Value 5 Meaning Maximal waiting delay in 1 10 before the modem answer Parameter Dial Value ATDT for vocal dial ATDP for a pulse dial Meaning Selecting the way to call Parameter DialTimeOut Value 600 Meaning Maximal waiting delay in 1 10 before the modem connection Parameter Ok R403 147 SERAD S A Supervisor documentation Value OK Meaning Modem answer if the command have been handled correctly
143. of integer for outputs The function PlcReadInputs read the status of inputs after to have memorized theirs old status to allow detection of edge R403 63 SERAD S A Supervisor documentation The function PlcInp PlcInpb PlcInpw PlcInpPe ans PlcInpNe allow to read the status of inputs and detect edges The functions PlcOut PlcOutB and PlcOutW modify bit s copy of outputs The function PlcWriteOutputs write the status of bit s copy on physical outputs Exemple In this exemple the outputs s blocks are used to count positive and negative edge of a input PROG on utilise toutes les sorties Masque 1 OFFFFh Masque 2 0FFFFh on initialise le PLC PlcInit Entrees EntreesOld Sorties Masque Repeat lecture des entr es PlcReadInputs d tection des fronts montants If PlcInpPe I1 Then PlcOutB JL PlcOutB JL 1 End If d tection des fronts descendants If PlcInpNe 11 Then PlcOutB JH PlcOutB JH 1 End If criture des sorties PlcWriteOutputs Until False END PROG R403 64 SERAD S A Supervisor documentation 5 2 Ladder task 5 2 1 Presentation Each ladder task is defined with rungs The number of rungs is limited to 50 for a task A rung is defined by one or more coils and only one expression Then coils of a same rung have the same expression A rung can have a maximum of 5 coils or contact in parallel and 10 contact in serial Attention A ladder task is automatically traduct i
144. ollowing by character The execution of this instruction passed to the execution of the next task GOTO Begin Begin JUMP FOR REPEAT WHILE IF END 8 14 63 HALT Stop a task Syntax Description Remarks Example See also HALT lt Name gt This instruction is used to stop a task which is going to be executed or suspended This function has no effect on the stopped task on the movements running and on the buffer of movements Begin Wait Inp Power On RUN Cutter Wait Inp Power Off HALT Cutter Goto Begin RUN SUSPEND CONTINUE R403 102 SERAD S A Supervisor documentation 8 14 64 HLINE Draw horizontal line Syntax Units Limits Accepted types Description Remarks Example HLINE X1 Y1 X2 colour X1 Y1 X2 pixel X1 X2 de 1 240 Y1 de 1 128 X1 Y1 X2 byte Colour Bit This instruction draws a line with its starting point in X1 Y1 and its final point in X2 Y1 on the S640 Colour changes the colour of the line black 0 or white 1 HLINE 10 15 70 0 T 15 8 14 65 ICALL Call a sub routine Syntax ICALL lt Name gt Description This instruction is used to call a sub routine define by a block SUB lt Name gt is the name of the sub routine s block Remarks A sub routine can not call himself The system had predefine sub routines _MENUMCS PARAMMCS MANUMCS VARIABMCS MEMORYMCS and _CLOCKMCS T
145. on zone X delta position Y cursor X cursor UM T DI Acuna C amp x Col ch na J tiete UM C Elies Su lien ans Corot Slat Porte ll Channel or time base select Channel or time base Starting sco pe Total number of point In the acquisition configuration zone user can define the number of samples during an acquisition cycle User can start and print an acquisition The channels configuration zone have 6 channels tabs and a time base tab For channels tabs user can define the type of the board the board and the acquisition parameter For example with an axis board the following error can be chosen R403 26 SERAD S A Supervisor documentation Channel scale to view signals Information source axis inputsfoutputs Board select Data to observ Ex position velocity The visualization screen displays the six channels A double click on this zone and the window is in full screen This window gives the position in X and Y of the cursor We can also define reference position on X and Y A click on dX or dY shows a moved vertical or horizontal line The position of the new click defines the reference position The value indicates in dX or dY is the difference between the cursor position and the reference position HIME BASE Time base scale Trigger source type IGN Trigger board Trigger condition Ex lowe
146. or documentation Description This instruction allows to the system to wait for the time lt Duration gt The task continue its execution when the duration is finished The execution of this instruction launches to the execution of the next task Example DELAY 500 0 5 s Delay DELAY Timerl 8 14 46 DIFFUSE Event generation Syntax SIGNAL lt Name gt Description This instruction generates an event Remarks lt Name gt must be the same name used by WAIT EVENT instruction Each program which was waiting for this event can then go on Example p Programl Program2 WAIT EVENT Ready DIFFUSE Ready See also WAIT EVENT SIGNAL 8 14 47 DIV Integer divide Syntax lt Expression1 gt DIV lt Expression2 gt Accepted types Expressionl Expression Integer Description This operator returns the integer divide result Remarks This operator returns an integer Example a 7 as a DIV 2 Result at 3 See also MOD 8 14 48 EDIT Editing on operator panel Syntax 1 lt Variable gt EDIT lt Line gt lt Row gt lt Length gt lt Sign gt lt Point gt Syntax 2 lt Variable gt EDIT lt Line gt lt Row gt lt Length gt lt Sign gt lt Point gt lt Code gt Limits Line 1 to 4 for Supervisor 80 or 1 to 16 for Supervisor 640 Row 1 to 20 for Supervisor 80 or 1 to 40 for Supervisor 640 Accepted types Variable real Line Row Length Integer Sign Point Code b
147. owing the data types amp PDO Process Data Object gt Data exchange in real time gt High priority identifier Synchronous or asynchronous transmission gt 8 bytes one message maximum gt Pre defined format amp SDO Service Data Object gt Access to the objects dictionary of a device gt Low priority identifier R403 127 SERAD S A Supervisor documentation gt Asynchronous transmission gt Data distributed in many telegrams gt Data addressed with an index The characteristics diffused on the CAN bus are received and evaluated by all the connected devices Each service of a CAN device is configured by a COBID Communication OBject IDentifier The COBID is an identifier which characterises the message It tells to a device if the message must be taken in account For each service PDO or SDO it is necessary to specify a COBID during the emission sending a message and a reception COBID receiving a message For the first SDO server the COBID is fix and can not be modified remotely Moreover it is calculated from the NodeID The NodelD is the parameter which characterises the device and permits the unique access to it PDO Process Data Object It is a data exchange arbitrated between 2 modules The PDO can transfer in turn some synchronisation or controlled events to realise the message sending request With the controlled events mode the load of the bus can be very reduced A device can therefore reali
148. pervzor Siste Activate the observations zone Liste of tas ke serminal screen E lypr terminal HIS ZORTE m 0 ILOG _ E TR I Observations zone Add ordelete variables or ameters inthe observations zone The terminal window has a main window and two other optional windows the observations window and the status window gt The main window allows the reading and the writing in real time of all the variables and parameters of SUPERVISOR To access to these information there are some functions Print lt Variable or Parameter Name gt display the value of a variable or a parameter lt Variable or Parameter Name gt lt Value gt assign a value to a variable or a parameter STATUS State of the tasks RUN lt Task name gt execute a task HALT lt Task name gt stop a task SUSPEND lt TaskName gt suspend the execution of a task amp CONTINUE lt TaskName gt continue the execution of a task amp CLS Clear the dialog zone amp RESTART restart SUPERVISOR EXIT close the terminal For an easy way to edit the name of variables or parameters the terminal has a window of SUPERVISOR properties In this window we can find all the parameters of each board global variables and local variables of each task The parameter or variable name appears on the terminal window on a double click on one of this variable or parameter
149. position available in the variable 1 of its table write 32 bits variable Wait PDOEvent Can1 1 Waits for the PDO which signals the message OS PDO Can1 1 Reads the PDO Ordre Asc Left 0 1 Decoding the command Pos amp CanRemote amp Can1 7180h 5 Reads the position If Ordre 1 Then Stta X Pos4 Execution in absolute If Ordre 2 Then Sttr X Pos4 Execution in relative Repeat P amp RealToLong Pos S X Read the position CanLocal amp Canl1 1 P amp Updates the position Until Move_S X 0 O Chr 0 Answer PDO Can1 1 0 Acquits the command The SUPERVISOR 2 sends its commands reads the X axis position in the variable 1 of the table read 32 bits variables and send positions in the variable 5 of the table write 32 bits variables CanLocalg Can2 5 10 25 Writes the position O Chr 1 Sends a command for absolute motion PDO Can2 1 0 Sends the PDO Repeat P amp CanRemote amp Can2 7180h 1 Reads the position Until PDOEvent Can2 1 Until the end of motion R403 142 SERAD S A Supervisor documentation 9 4 2 CANopen linking between a SUPERVISOR and an I Os module The communication configuration between a SUPERVISOR and an I Os module consists of giving a NodeID number to each of them In general cases the NodeID of an I Os device is configured with switches Then a communication with SDO and PDO is possible The default COBID of the servers are 600h NodeID in receptio
150. r select B Ez cuter In the Execute dialog box select _Parcouir In the Parcourir dialog box select the drive where the floppy disk or CD ROM is Select Ml Setup exe then in the Parcourir dialog box Select in the Execute dialog box gt The installation software is running R403 15 SERAD S A Supervisor documentation In the beginning of the installation there are some dialog box to drive the installation Destination folder Installation type Typical compact or custom Select the program manager Warning only one level of folder can be created gt The file installation starts and is indicated by the evolution of a progress bar gt The installation finishes with the adding of icon in the program manager 3 1 3 Upgrade from previous versions A program wrote with a previous version can work on a new version if a compilation is done Spl software only works with operating system provided in the OS directory of the installation directory of the software By default this directory is C Program Files Serad Spl Operation system installation is Connect SUPERVISOR SERIAL1 communication port on COM1 or COM2 of the PC Run SPL s application go to OPEN PROJET in PROJECT then in OPTIONS gt OPERATING SYSTEM click on UPDATE If you want to update by DOS follow the next instructions On Windows 95 or greater open a DOS windows With the DOS command
151. r greater Pasition gt A RS A A R403 27 SERAD S A Supervisor documentation 3 4 4 Communication menu Flash sct Constants Communication Debug Options Help Setup gt Variables gt Tasks gt Supervisor Flash gt gt Run Supervisor Ctrl B M Stop Supervisor Ctrl H Remote control Setup Project Constants Communication Debug Options Help Setup d gt Send Ctrl C Variables iT Receive Ctrl A Tasks Supervisor Flash gt gt Run Supervisor Ctrl B M Stop Supervisor Ctrl H Remote control Autodetect Action With a new project this command create automatically the configuration if the PC and the SUPERVISOR are connected Send Icon I Action The configuration sending initializes SUPERVISOR with the parameters defined in the configuration screens of each board At the beginning there is a test between the configuration in the SUPERVISOR and the configuration on the PC If an error is detected the transfer is stopped and a message appears with the card where the contents is incorrect This command is necessary after an adding deleting or modification of a board Receive Icon i gt Action This command updates the parameters in the screens configuration of boards The transfer begins with the test between the configuration in SUPERVISOR and the configuration on the PC If an error is detected the transfer is stopped and a message appears with the card where the content
152. rd in the slot the dialog box is different A dialog box with the state of the status display the state of the watchdog and the time and date in SUPERVISOR appears All of these parameters can be modified If one of this parameters is driven by an executed task the manual modification of its state may be transitory Clock Display Date 5 a fisss 2 Read Time fis 3 ic a ajo E Write Watch dog _open _Close The debug windows of I O module boards shows with leds the state of each input or output of a board A click on a led modifies the state of the input or output Tasks R403 22 SERAD S A Supervisor documentation Open Serial2 9600 8 N 1 as 1 al 11 nunf b1i 11 num cis 11e num dies 11e num el 11 num al longl b2 longl c2 longi dze longi e2 longi num numf num num num a3 saved1 num b3 savedl num c3 savedl num d3 c savedi1 num e3 savedi num 12e num bit long2 num bit saved2 num bit END PROG Suspend task Place breakpoint Breakpoint line StepByStep b3f savedl c3 savedl a3 c savedl e3 savedl END PROG al 11 numf bi 11 num cis 11 num dis lic num e1 lic num a2 longi num b2 long1 num c2 long1 num d2 long1 num e2 long1 num a3 savedl num num num num num 12e num bit long2 num bit saved2 num bit In this sub menu there ar
153. rdware and software flow controls Storing this configuration into the non volatile memory of the modem Selecting these parameters in the non volatile memory as parameter to be used at power on Example R403 145 SERAD S A Supervisor documentation Parameters for an 3Com Us Robotics Sportster modem type Command AT amp F0 Meaning Using default factory settings Command ATSO 3 Meaning Automatic pick up after 3 ringing Command AT amp HO Meaning Disable the flow control when sending Command AT amp I0 Meaning Disable the flow control when receiving Command AT amp W0 Meaning Store current parameters into the non volatile memory bank 0 Command ATYO Meaning Selecting these parameters in the non volatile memory as parameter to be used at power on When the modem take these commands into account it answers OK Parameters for an Wertermo TD31 or TD32 modem type Command AT amp F Meaning Using default factory settings Command ATSO 3 Meaning Automatic pick up after 3 ringing Command AT8C1 Meaning Activate DCD when connected Command AT amp KO Meaning Disable the flow control Command AT amp W0 Meaning Store current parameters into the non volatile memory bank 0 Command AT8 YO Meaning Selecting these parameters in the non volatile memory as parameter to be used at power on When the modem take these commands into accou
154. ripheral system But with the RS485 communication port SUPERVISOR can communicate with more than one peripheral system To send a message with a RS485 communication port SUPERVISOR must drive the communication line The TX485 instruction permits SUPERVISOR to take the line during a given number of character When a character is sent the TX485 value is decrements When this value reaches zero the line is automatically given back Warning Each character sent is received by the SUPERVISOR as the TX485 value is different to zero Example Message Motion Control System TX485 1 Len Message PRINT 1 MessageS Take the line during the sending of Messages CLEARIN 1 Clear the echo characters 6 7 Example RTU Modbus driver SLAV E232 Task Prog kkx DRIVER MODBUS ESCLAVE RS232 F KKK INITIALISATION 1 1 1 1 WARNING gt Defined in global stored variables TableModbus type integer number 255 1 NumeroSUPERVISOR 1 number of the SUPERVISOR TimeOut amp 10 10ms maximum delay between 2 received characters 1 AdressModBus 600 Start address of the table NumberModbus 300 Number of words in the table init maintenance counters CmtMessage amp 0 ErrLiaison amp 0 R403 70 SERAD S A Supervisor documentation ErrAdresses 0 ErrDatas 0 Open serial2 Open Serial2 9600 8 N 1 As 2 Clearin 2 Clear the rxd buff
155. s In the Constants menu select the constant to modify before A double click on the constant to modify A right click opens a menu with the Modify or Show command select the constant to modify before The Delete command allows to suppress a global constant to the project This command can be obtained in two different ways In the Constants menu select the constant to suppress before A right click opens a menu with the Modify or Show command select the constant to modify before 3 4 9 Global variables tab 15 Projet Sans titre Number Adress Bit s Butels RAR CamT able1 Cam table Messagel String s Setup Global constants Global variables In the Global variables tab all the variables with their features name type number address and value are summarized The number parameter defines the number of elements in this array The address parameter must be fixed if the variable is a stored variable address 1 to 20000 In this tab we can add modify delete or show a variable The Add Modify or Delete command need the compilation of the tasks again and the sending tasks In the case of a stored variable you should send the variables too The Add command defines a new global variable in the project Variable Ed Name Length Type Number nO O Adress fog V Save x Cancel 7 Help This command
156. s is incorrect If you want to stored this configuration in the project you need to execute the Save as command R403 28 SERAD S A Supervisor documentation Variables Project Setup Communication Debug Options Help Setup Variables Send Ctrl G Tasks gt ZE Receive Ctile Supervisor Flash gt gt Run Supervisor Ctrl B M Stop Supervisor Ctri H Remote control Send Icon Action the sending of stored variables initializes the value assigned to this variable in SUPERVISOR So you needn t to initialize them in a program Receive Icon Action This command provides a copy of the stored variables in SUPERVISOR in the PC I you want to store this values of variables in the project you need to execute the Save as command Tasks Project Setup Communication Debug Options Help Setup gt Variables gt Send Ctrl T Supervisor Flash gt Clear Cul D Run Supervisor Ctrl B M Stop Supervisor Ctrl H Remote control Send Icon Action This command sends all the compiled tasks in the SUPERVISOR The execution of the tasks is automatically launched after the transfer The transfer begins with the clearing of the memory During this phase the c symbol appears on the SUPERVISOR display status and a bar graph indicates the evolution of the transfer Clear Icon i Action This command clears all the tasks in SUPERVISOR memory After the execution of this command SUPERVISOR indi
157. s state 3 different states STOPPED mode the CANOpen bus waits for a StartCan instruction STARTED mode the CANOpen bus is ready to communicate ACTIVE mode the CANOpen bus is communicating Can visualisation of the transmission and reception number in free protocol Server SDO visualisation of the sent request and correct answers Client SDO visualisation of the sent correct answers and request Tx PDO visualisation of the sent PDO number sub total per PDO number Rx PDO visualisation of the received PDO number sub total per PDO number Clear click here to clear all the counters of this page R403 132 SERAD S A Supervisor documentation DEBUG page Card Link test State Active State In progress Start Stop This page can validate very easily the good comportment of two SCAN boards inside of a Can Open network The procedure is as follows On the local board stop the tasks Go to the debug menu of the SCAN board Fill in its Node Id the transmission speed and the distant card Node Id For the distant card there are two different cases There is no task in the SUPERVISOR You have to create one to start the CANOpen bus in automatic mode called INIT for example Prog Delay 2000 StartCan CardName Speed Node Id Halt INIT End Prog There are already tasks in the SUPERVISOR In the automatic task add at the beginning Prog Delay 2000
158. se a high performance with a law transfer rate The data exchange with the PDO uses the CAN advantages Sending messages can be done from an asynchronous event controlled event Sending messages can be done from the reception of a synchronisation event Recovery from a remote frame SDO Service Data Object It is a data exchange point to point A device is asking for an access in the objects list of a SDO This one sends back an information corresponding to the type of request made by the caller Each SDO can be either client and or server A server SDO can not send a request to another SDO but it can answer any request from another client SDO Unlike the PDOs the SDOs must follow a particular communication protocol The frame to send must have 8 bytes Domain Protocol Byte 0 it defines the command Upload Download Index on 16 bits Bytes 1 et 2 It defines the objects dictionary address Sub index on 8 bits Octet 3 It defines the element of the selected object in the dictionary Parameter Octet 4 7 It defines the value of the parameter read or written The network manager has a simplified mode to start the network up The network configuration is not necessary in all the cases The default configuration of the parameters may be enough If the user wants to optimise the CANopen network or increase its functionalities he can the modify himself these parameters In the CANopen networks each device h
159. string whose characters have the same ASCII code We use STRINGS to create a string which is constituted of a repeated character lt Number gt is a numerical expression which indicates the length of the returned string lt Code gt is the ASCII code of the character used to build a string and a numerical integer expression between 0 and 255 a STRING 10 0 Result a 0000000000 STR VAL R403 122 SERAD S A Supervisor documentation 8 14 142 TAN Tangent Syntax TAN lt Expression gt Accepted types Expression real Description This instruction returns the tangent of lt Expression gt lt Expression gt is an angle expressed in radians Remarks This argument lt Expression gt must be a numerical valid expression The function TAN takes an angle and returns the ratio of two sides rectangle triangle The ratio is the length of the opposite side of an angle divided by the length of the adjacent side of the angle Example a TAN PI See also SIN ARCTAN TAN 8 14 143 TIME Time base Syntax TIME Description This instruction returns a long integer which represents the number of milliseconds from the last power on This instruction allows to execute no locking waits At the start up of the SUPERVISOR TIME is equal to zero and increases up to 2431 Then it passed to 2731 and increases to 0 This cycle is about 24 days long Remarks If the SUPERVISOR is used more than 24 days you can use t
160. t Condition gt THEN lt Action1 gt ELSE lt Action2 gt The IF THEN ELSE structure is used to test a condition at a given time If lt Condition gt is true then the lt Action1 gt is executed otherwise the lt Action2 gt is executed Example IF Inp Start On THEN Input state test Out StartLed 0n RUN Cycle E LS F Out StartLed 0ff HALT Cycle ENDIF 5 1 2 Timings A Passive waiting The DELAY function is designed to make a passive waiting Its syntax is DELAY lt Duration gt lt Duration gt is a long integer expressed in millisecond It is recommended using this function for a long passive waiting because the waiting program doesn t spend any processor time With this function the p For example Debut WAIT Inp Start ON DELAY 5000 GOTO Debut B Active waiting TIME rogram is waiting the indicated duration 5 seconds delay The internal global variable TIME is designed to make active waiting of time This variable is a long integer that represents the number of milliseconds passed since power on This variable can then be used as time base for machines which are powered on less than 24 days At the power on the variable is equal to zero Up to 24 days the variable is at its maximum value 2731 R403 60 SERAD S A Supervisor documentation and passed to its minimal value 2 31 This overflow can make some timer errors In that case you must use the
161. t RealToByte VarReel VarBit 1 VarEntier VarBit VarOctet 128 VarEntier VarOctet VarLong 45200 VarEntier LongToInteger VarLong VarReel 54200 65 VarEntier RealToInteger VarReel VarBit 1 VarLong VarBit VarOctet 128 VarLong VarOctet VarEntier 45200 VarLong VarEntier VarReel 154200 65 VarLong RealToLong VarReel VarOctet 128 VarReel VarOctet VarBit 1 VarBit 1 VarOctet 1 VarOctet 3 VarOctet 1 VarOctet 38 VarEntier 1 VarEntier 128 VarEntier 45200 VarEntier 54200 VarLong 1 VarLong 128 VarLong 45200 VarLong 154200 VarReel 128 R403 48 SERAD S A Supervisor documentation 4 2 VarEntier 45200 VarReel VarEntier VarReel 45200 VarEntier 154200 VarReel VarEntier VarReel 154200 VarChaine 125 45 VarReel Val VarChaine VarReel 125 45 VarReel 1510 55 VarChaine Str VarReel VarCha ne 1510 55 5 Numeric notations Numeric values can be expressed in decimal hexadecimal or binary Example VarOctet 254 decimal notation VarOctet 0FEh hexadecimal notation VarOctet 11111110b binary notation 4 3 Tasks 4 3 1 Multitask principles The real time and multitask kernel can manage 32 tasks in parallel Y 4 internal tasks reserved to the system 27 users tasks defines in pseudo basic or ladder 1 extra task for the management of events The multitask launches the next task if the executed time of the task is longer tha
162. t a chart on the ladder grid you just have to click with the left button of the mouse on the ladder grid The parallel link goes on the top and left corner to the bottom and left corner of the case A double click on a case of a ladder grid where there is a chart allows user to configure it gt For coils and contacts a SUPERVISOR configuration screen appears on the toolbar In this zone there are all the bits variables like inputs outputs and system bits We can also find 64 bits By default there names are like lt bit gt n of bit The name of this bits can be changed by a click or with the menu which appears on a right click There are three system bits an init bit which is equal to one during the first cycle of the program and two blink bits One have a semi period equal to 500 ms and the second to 1s gt For blocs there is a specific dialog box For timer the name and the delay is configured For counter the name the type and the preset value is configured R403 43 SERAD S A Supervisor documentation 2 For free blocs a dialog box allows to edit the basic code For free contact the code will be a condition and for free coil it will be an action An error in the code edited will be only detected by the basic compiler The selected rungs is the rungs with the background of the comments in blue To edit a comments you just have to make a double click on it Commands A command to quit the ladder editor E
163. the 3 input S Chr 00010011b Writes outputs 1 2 and 5 PDO Can1 1 S Sends the PDO R403 143 SERAD S A Supervisor documentation 10 REMOTE CONTROL 10 1 Connections The remote control allows by a simple phone link to remotely control a SUPERVISOR with SPL software The remote control is composed of an integrated dialler and two modems linked by a phone link e Structure The different parts are linked as shown Liaison RS 232 a Liaison t l phonique e Liaison RS 232 Modem 2 Modem 1 e RS 232 link between the modem 1 and the SUPERVISOR 9 points SUBD pin assignment Pin Supervisor Modem 1 CD 2 RXD RXD 3 TXD TXD 4 DTR 5 GND GND 6 DSR 7 RTS 8 CTS CTS 9 R403 144 SERAD S A Supervisor documentation Use a shielded cable with shield connected at each end Linking 5640 Sb 0 5 ponis mel Medem Sb D 5 prisme e RS 232 link between the modem 2 and the PC This link between the modem and the PC is made with the cable provided with the modem 10 2 Link establishment e Setting up the modem 1 connected to the SUPERVISOR The set up of the modem connected to the SUPERVISOR is made by connecting this modem to a PC A terminal software is used to send commands to the modem This set up have to following objectives Initialising the modem Defining the number of ringing before the modem pick up to allow an automatic establishment of the link Removing all ha
164. the cursor you need to use the CURSOR on off instruction This function indicates the beginning of a data capture CURSOR lt ON OFF gt To locate the cursor on the screen there is the LOCATE instruction The origin of the screen is in the top and left corner of the screen with the 1 1 coordinates The syntax is LOCATE lt Line gt lt Row gt The PRINT function displays a text or the contents of a variableon the screen The syntax is PRINT lt Expression gt lt Expression gt When a comma is used to separate two expressions a carriage return is inserted between these expressions But if a semi column is used to separate two expressions the carriage return is not inserted character ASCII 13 D Example CLS Clear screen CURSOR ON Display the cursor LOCATE 2 4 locate the cursor at the line 2 and row 4 The FONT function defines the font to use for the text The syntax is FONT lt Value gt lt Value gt is an integer between land 8 and defines the type of font The PIXEL function switch on or off a pixel on the screen The syntax is PIXEL X Y Colour Colour may be the white Colour 1 or black Colour 0 amp The BOX function draws a rectangle on the screen The syntax is BOX X1 Y1 X2 Y2 lt BorderColour gt lt FillColour gt The X1 Y1 parameters are the top and left corner of the rectangle and X2 Y2 parameters the bottom and right corner of the rectangle lt BorderColor gt defines th
165. the save file Remarks The first character is at the position O1 Exemple P amp Seek 3 Rapport nominal ratio 0 5 Seek 3 P amp 100 D placement sur le 100 me caract re partir de la position courante See also OPEN INPUTS PRINT 8 14 127 SETDATE Set the date Syntax SETDATE lt Year gt lt Month gt lt Day gt lt DayInTheWeek gt Accepted types Year Month Day DayInTheWeek Integer Description This instruction set the current date See also GETDATE SETTIME 8 14 128 SETINP Input filters and invert Syntax SETINP lt Name gt lt Inversion gt lt Filtre gt Units Filter milliseconds Accepted types Inversion Long integer Filter Byte Description This function defines the inputs invert mask and the filter period Remarks lt Invert gt is a long integer in which each bit represents the invert of each input This parameter can be defined during the input card configuration Example SETINP INPUTS11 4 10 Second input card invert and 10 ms filter 8 14 129 SETOUT Outputs invert Syntax SETOUT lt Name gt lt Inversion gt Accepted types Inversion Long integer Description This function defines the outputs invert mask R403 119 SERAD S A Supervisor documentation Remarks lt Invert gt is a long integer in which each bit represents the invert of each output This parameter can be defined during the output card configuration Example
166. the system to wait for a condition The execution of this instruction launches the execution of the next task R403 125 SERAD S A Supervisor documentation Remarks Example See also The WAIT instruction the following instructions are not executed if the lt Condition gt is false This instruction provides a passive wait for a condition The STATE keyword is optional WHILE INP Sensor Off DO END WHILE Active waiting this program is similar to WAIT INP Sensor On Passive waiting WAIT EVENT DELAY 8 14 154 WATCHDOG Watchdog Syntax 1 Syntax 2 Description Remarks Example WATCHDOG ON OFF WATCHDOG This function allows to the user to read or write the watchdog relay state The watchdog state under power on is OFF Then it must be set to ON when the program starts WATCHDOG 0N WAIT WATCHDOG 0FF 8 14 155 WHILE While Do End While Syntax Description Remarks Example See also WHILE lt Condition gt DO lt Instructions gt END WHILE This instruction allows to the system to execute a list of instructions in a loop as long as the given condition is true The execution of this instruction launches the execution of the next task In the WHILE DO END WHILE instruction lt Instruction gt are not executed if the condition is false a 0 WHILE a lt 100 PRINT 1 a as as 2 END WHILE REPEAT 8 1
167. tion Samethings for the four last inputs E Outputs Outputs T O mi C Ej C a C a C El C E C mi Cc Action Allow to give a name to each output bit and inverse them In debug mode you can see their state R403 37 SERAD S A Supervisor documentation F Accessories Backlight C Allum C Eteint f Veille automatique 20 _Qume rome Action Allow to set the clock modify the backlight only for S640 and watchdog Chien de garde 3 4 8 Global constants tab Projet Sans titre delta Integer 1 A delta2 Butefs Global constants Global variables In the Global Constants tab all the constants with their features name type and value are summarized In this tab we can add modify or delete a global constants The add delete and modify commands need the compilation of the tasks again and the sending tasks The Add command create a new global constant to the project A dialog box appears to configure the parameters of this new constant A Kea 7 Hebe The Add a constant command can be obtained in two different ways In the Constants menu A right click open a menu with the Add command R403 38 SERAD S A Supervisor documentation The Modify or Show command allows the modification of the global constant parameters except its type This command can be obtained in three different way
168. tion port Example OPEN SERIAL2 9600 8 N 1 AS 1 SERIAL2 is opened to communicate When a port is open by a task this port can t be opened again by another task But a communication port open can be read or written by any other task A communication port must be open before the reading or writing of data You should reserve the Seriall to the downloading between SUPERVISOR and PC Otherwise you need to manipulate the plugs If Seriall is used in a task you should execute the Stop task command before the downloading 6 3 Reading data Received buffer R403 68 SERAD S A Supervisor documentation Each serial port have a received buffer with 500 bytes length If the buffer is full 500 characters are received and unread the new received characters clear the first one The CLEARIN instruction clears this buffer The CARIN instruction returns the number of characters in the buffer To read data there are two instructions INPUT and INPUTS The INPUT instruction waits the data and assigns the received data to variables The syntax is INPUT lt ComNumber gt lt Variable gt lt Variable gt lt ComNumber gt is the number specified in the OPEN instruction The reading data must come in the order of the variable list and with the same type For example OPEN SERIAL1 AS 1 Open the serial port 1 affected to canal 1 INPUT 1 BS C Read a string and an
169. tion returns the number of characters in the transmit buffer The OUTEMPTY instruction indicates if the buffer is empty and the last character is sent The PRINT instruction converts data and send them The syntax is PRINT lt ComNumber gt lt Expression gt lt Expression gt lt ComNumber gt is the number specified in the OPEN instruction For example OPEN SERIAL1 AS 1 Open the communication port 1 PRINT 1 AS BS Send a string of char and an integer PRINT 1 CS R403 69 SERAD S A Supervisor documentation PRINT 1 CHRS 10 MESSAGES ASCII 13D is not sent after MESSAGE1S PRINT 1 CHRS 10 MESSAGE2 ASCII 13D is sent after MESSAGE2 A semicolon between two expressions signifies that the next character is sent immediately after the last character A semicolon at an end line signifies that the extra ASCII character 13D is not sent A comma signifies that the character is sent at the beginning of the next line If there is no expressions list after the PRINT expression the ASCII Character 13D is sent If the parameter 1 or 2 is not specified the system send the data on 1 6 5 Close a communication port To close a communication port there is the CLOSE instruction The syntax is CLOSE lt CommNumber gt 6 6 RS485 treatment With a RS232 communication port SUPERVISOR can communicate with only one pe
170. tions Ex MOVE S X In this contact you must only edit your expression to test with the bracket Ex MOVE_S X 1 And POS X gt 2000 Free coil This type of coil allows you to execute any sort of instruction like movement instruction With this coil you can assign all types of variables Ex byte Integer long integer real or string In this coil you must only edit the instruction Ex STTA X 100 Y 150 Warning Don t use passive wait instruction This type of instructions stops anf affects the ladder task evolution Ex MOVA WAIT 5 2 4 System bits Initialization bit This bit is true on the first cycle of the ladder task Blink 0 5s The state of this system bit changes between 0 and 1 every 0 5s Blink 1s The state of this system bit changes between 0 and 1 every 1s 5 2 5 Task architecture This is the architecture of the ladder task Inputs reading Treatment of program Update of outputs With this architecture the state of inputs is loaded before the treatment of equations The outputs are updated only once times per cycle The multitask allows the ladder task to be suspended at any times of the execution cycle R403 67 SERAD S A Supervisor documentation 6 PROGRAMMATION OF SERIAL1 SERIAL2 COMMUNICATION PORTS 6 1 Introduction SUPERVISOR have an RS232 communication port on Seriall This communication port is used to send or receive the configuration vari
171. tly Parameter Connect Value CONNECT Meaning Modem answer when connecting Parameter Busy Value BUSY Meaning Modem answer if the line is busy Parameter Hangup Value ATH Meaning Selecting the way to hang up Parameter HangupOk Value NO CARRIER Meaning Modem answer when hanging up Parameter CommandTimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the modem going to the command mode Parameter HangupTimeOut Value 20 Meaning Maximal waiting delay in 1 10 before the hanging up R403 149 SERAD S A Supervisor documentation The dialler expect that the modem is setup to send an echo for all sent command and to receive a text message as answer If not the communication is unable It s possible to be sure to start with a good set up for the modem by using the factory settings as default parameters A terminal software is used to send commands to the modem Parameters for an 3Com Us Robotics Sportster modem type Command AT amp F Meaning Using default factory settings Command AT amp WO Meaning Store current parameters into the non volatile memory bank 0 Command ATYO Meaning Selecting these parameters in the non volatile memory as parameter to be used at power on Parameters for an Wertermo TD31 or TD32 modem type Command AT amp F Meaning Using default factory settings Command AT amp WO Meaning S
172. to an element of the remote dictionary You have to tell the SDO client and server parameters of the board before sending any remote variable reading or writing 9 3 9 PDO Read or write data from a PDO Syntax 1 PDO lt Board gt lt NumPDO gt lt Data gt Syntax 2 lt Variable gt PDO lt Board gt lt NumPDO gt Limits lt NumPDO gt from 01h to 08h lt Data gt lt Variable gt characters string Accepted types lt NumPDO gt Byte lt Data gt lt Variable gt characters string Description This function reads or writes a PDO Remarks lt Board gt must be a CANopen board You have to tell transmission parameters of the PDO to receive a PDO 9 3 10 PDOEVENT Test a PDO arrival Syntax lt Variable gt PDOEVENT lt Board gt lt NumPDO gt Limits lt NumPDO gt from 01h to 08h Accepted types lt Variable gt lt NumPDO gt Byte Description This function tells if a request of a PDO is effective Remark lt Board gt must be a CANopen board You have to tell the transmission parameters of the PDO to receive a PDO 9 3 11 SDOEVENT Event SDO Syntax lt Variable bit gt SDOEvent lt Can Card gt Description This function allow to know if a writting by SPO has been made in the CAN card The reading of the bit reset it 9 3 12 SDOINDEX Index SDO Syntax lt Variable integer gt SDOIndex lt Can Card gt Description This function allow to know the index o
173. tore current parameters into the non volatile memory bank 0 Command AT8 YO Meaning Selecting these parameters in the non volatile memory as parameter to be used at power on ATTENTION For Westermo modem it s also recommended to let the Dips configuration as default all OFF e Call By using the phone dialler integrated in the SPL software we can establish and interrupt the phone link The phone dialler is accessible form the Communication menu Remote control R403 150 SERAD S A Supervisor documentation 2 Dial Number Hangup Close ER RES RE After entering the phone number click on Dial button to establish the link The Hang up button allows to interrupt the link These actions are possible only if the SPL software is not using the same link in debug mode for example During the connection and disconnection the communication port is not available for the rest of the SPL application When the link is established we can use all the SPL functions including Send and receive the configuration Send and receive the variables Send the tasks Start the tasks Stop the tasks Access to debug tools Hyper terminal Scope Trace Manual mode 10 3 List of the validated modems e 3Com US Robotics Sportster Voice 33600 Fax Modem Sportster 56 K Fax Modem e Westermo TD31 TD 32 R403 151 SERAD S A Supervisor documentation 11
174. turns the natural logarithm of lt Expression gt lt Expression gt must be a numerical expression a LOG 1 2 EXP 8 14 85 LONGTOINTEGER Convert a long integer to integer Syntax Accepted types Description Example LONGTOINTEGER lt Expression gt Expression Long integer This function converts a long integer type data in integer type data A amp Time BS LongToInteger Ag 8 14 86 LTRIMS Suppress the left spaces Syntax Description Remarks Exemples LTRIMS lt Expression gt Returns a string copy without the left spaces lt Expression gt must be a char string a Menu ir bS LTRIMS a Result bS Menu i R403 108 SERAD S A Supervisor documentation See also RTRIM 8 14 87 MIDS String part Syntax Accepted types Description Remarks Example See also MIDS lt String gt lt Begin gt lt Length gt String Char string Begin Length Byte This function returns a string part lt Begin gt defines the beginning of the substring extracted and lt Length gt the number of characters to extract a MAIN MENU bS MIDS a 6 4 Result bS MENU LEFTS RIGHTS 8 14 88 MOD Modulus Syntax Accepted types Description Example See also lt Expression1 gt MOD lt Expression2 gt Expression1 Expression2 Byte Integer Long integer This operator returns an integer division rest a 5 as
175. um of the task length b0 gives the length of the compiled task Other files map uti for the SPL internal management 3 3 Description 3 3 1 Initial screen SPL software is defined by a main window with a main menu an icons bar and the multiwindows The property of multiwindows provides to users the possibilities to go to another window without to changing it leJx gado da A Eau bww So PQ BIG EB oh oe bu e LL Oooo EE z BEEN sma z RTE shaw iw F a um tom R403 17 SERAD S A Supervisor documentation 3 4 Menus and icons 3 4 1 Project menu New Project Icon O Action This command defines a new project The last running project is closed and a dialog box appear to choose the Supervisor model Then a new configuration window appears R403 18 SERAD S A Supervisor documentation 5 upervisor Programming Language Open project Icon Action Save project Af Mir ED B Serial 3 Serial 1 This command opens the Open Project dialog box The users can indicate the path of the project he wants to load This command closes the last running project on the validation of this dialog box Icon Action This command saves the complete running project Save as Action This command opens the Save as dialog box that allows user to change the path and the name of the project This command creates a file and a
176. upervisor documentation 2 4 Getting started SUPERVISOR starting follows this approach Define board placement in the setup screen Y Setup each card Send setup in SUPERVISOR using Send setup menu Define the global variables Send global variables value in SUPERVISOR amp Write each task Compile and transfer tasks in SUPERVISOR If the setup is modified it must be sent one more time R403 14 SERAD S A Supervisor documentation 3 SPL SOFTWARE 3 1 Installation 3 1 1 System configuration Minimal configuration PC 486 DX2 66 RAM 8 Mb Hard disk 35 Mb available Microsofte Windows 95 or Microsofte WindowsNT 4 0 service pack 3 CD ROM 2X SVGA colour display FFEFE ESE Mouse or other peripheral pointing system Required configuration PC Pentiumo 75 or greater RAM 16 Mb Hard disk 35 Mb available Microsofte Windows 95 or Microsofte Windows NT 4 0 service pack 3 CD ROM 4X SVGA colour display CEFF FES Mouse or other peripheral pointing system This software run on Microsofte Windows NT But it doesn t run on Unix Mac MS DOS and Microsoft Windows 3 11 3 1 2 Installation procedure The Supervisor Programming Language software is provided in a CD The installation procedure is described below amp Verify the required configuration before the software installation Insert the CD ROM in the appropriate drive amp In the menu A D marre
177. use the instruction FORMATS with number 1 Example a 10 bS STRS a Result bS 10 See also VAL 8 14 138 STATUS Task state Syntax STATUS lt Name gt Description This function returns a task state Remarks The possible values are 0 The task is stopped 1 The task is suspended R403 121 SERAD S A Supervisor documentation Example 2 The task is running Run Cutter Wait Status Cutter 0 8 14 139 SUB Subroutine Syntax Description Remarks Example See also SUB lt Name gt This keyword begins a subprogram block and is also used to define the end of a subprogram block when it is preceded by END The blocs SUB END SUB must be outside of a PROG END PROG bloc SUB Move END SUB END 8 14 140 SUSPEND Suspend a task Syntax Description Remarks Example See also SUSPEND lt Name gt This instruction suspends a task in run This instruction has no effects on stopped tasks All the movements in the buffer of movements are executed Wait Inp Start RUN Cutter Begin Wait Inp Stop SUSPEND Cutter Wait Inp Start CONTINUE Cutter Goto Begin RUN CONTINUE HALT 8 14 141 STRINGS String creation Syntax Limits Accepted types Description Remarks Example See also STRINGS lt Number gt lt Code gt Number Byte de 0 a 255 Number Code Byte This function returns a char
178. vents 4 1 2 Memory plan of SUPERVISOR Flash memory 1 Mb non volatile ram memory 512 Kb 64 Kbytes area 128 Kbytes non volatileuser file data RAM backup parameters 8 Kbytes area first 10 000 non volatile vaiables non volatile users parameters for the configuration 448 Kbytes area 120 Kbytes area 28 user tasks 20 000 non volatile global users variables 512 Kbytes area reserved system 64 Kbytes area boot non volatile global or local operating system users variables 192 Kbytes area System reserved Interrupt vectors Stack Heap R403 45 SERAD S A Supervisor documentation 4 2 Data 4 2 1 Global constants The global constants are defined with the global constant tab of the SPL software The types accepted are bit byte integer long integer real string char Constants are read only data defined in a project They are stored in the flash memory with the code of the task compiled A global constant can be used by all the tasks 4 2 2 Global variables The global variables are defined with the global variable tab of the SPL software A global variable and a constant variable can t have the same name in a project because the compiler can t do the distinction The global variable types and the global constant types are the same A global variable can be used by all the tasks and accessed at every time This variable is an array if at its creation the field number
179. ween brackets are evaluated separately so results are used as operand Operators with same priority are usually used from left to right You should used brackets to separate each expression in order to highlight the priority IF INP El 1 AND FlagRun 1 OR InitOk 0 Then a Arithmetical operators NOT operator is an unary operator and operators are used as unary and binary operators Other operators are only binary operators An unary operator has only one parameter For example NOT lt Expression gt A binary operator has two parameters For example lt Expression1 gt lt Expression2 gt b Binary operators c Unary operators R403 53 SERAD S A Supervisor documentation d Logical operators NOT Byte Integer Operand type AND Binary AND Byte Integer Operand type a XOR e Bits operators NOT AND Re CCS M XOR ESC SE ES M f String operators Char string Char string g Relationship operators Byte Integer Long integer real string Byte Integer Long integer real string B Tests a Simple tests Conditional instructions provide a simple way to choose which part of code will be executed in accordance to a condition There are two syntax IF instruction syntax are IF lt Expression gt THEN lt Instructionl gt ELSE lt Instruction2 gt ara END IF or R403 pie SERAD S A Supervisor documentation IF lt Expression gt
180. wn variable can be treated and modify in another basic task lt CounterName gt lt amp gt Example Counter name Counterl Counter up Local Variable Counterl Timer The timers are all on delay timing TON The delay may be a fixed value or a global variable All the timers uses the TIMER instruction When you used a timer you must link the timer output to a coil even if the coil is not used The variable used with the timer can be treated in another basic task Its syntax is lt Bloc Name gt lt TVAL gt This variable represents the remaining delay since the activation of timer Example Timer name Timerl Variable TimerlVal On delay timing TON Example Xa At lt 1s X Y FE ds bd Off delay timing TOFF T T ls To make this type of timer you must use an invert coil with the triggering expression in a first rung In the second rung you use the contact with the same variable as the coil in the last rung and a timer and another invert coil Example R403 66 SERAD S A Supervisor documentation 5 2 3 Free contact and coil O Free contact Free coil This type of contact and coil provides more capabilities for the ladder This type of contact and coil are the free contact and the free coil Free contact With this type of contact you can test all type of variables Ex byte Integer long integer real or string We can make test with movement instruc
181. y AND between two expressions and return a value type identical as its operands Remarks lt Expressionl gt and lt Expression2 gt must have the same type Example IF Ab AND OFFOOh lt gt 0 THEN See also OR NOT XOR and IF 8 14 16 ARCCOS Invert cosine Syntax ARCCOS lt Expression gt Limits 1 to 1 Accepted types Byte Integer Long integer real Description This function returns the arccosine of lt Expression gt Remarks lt Expression gt must be a numerical valid expression This function returns an angle expressed in radians Example pi 2 ARCCOS 0 See also SIN COS and TAN 8 14 17 ARCSIN Invert Sine Syntax ARCSIN lt Expression gt Limits 1 to 1 R403 90 SERAD S A Supervisor documentation Accepted types Description Remarks Example See also Byte Integer Long integer real This function returns the arcsine of lt Expression gt lt Expression gt must be a numerical valid expression This function returns an angle expressed in radians pi 2 ARCSIN 1 SIN COS and TAN 8 14 18 ASC Convert char to ASCII Syntax Accepted types Description Remarks Example See also ASC lt String gt Char string This function returns a numeric value which is the ASCII code for the first character of a string expression If the string length lt String gt is zero the zero value is returned aS A b ASC aS
182. ypes lt Variable gt Integer lt Counter gt Byte Description This instruction reads the counter Remarks lt Counter gt Counter number 1 or 2 See also SETUPCOUNTER CLEARCOUNTER 8 14 36 CONTINUE Continue task execution Syntax CONTINUE lt Name gt Description This instruction is used to continue the execution of a suspended task Remarks lt Name gt must be the name of a suspended task This function has no effect on the stopped or executed task Example Wait Inp Start RUN Coupe Begin R403 95 SERAD S A Supervisor documentation Wait Inp Stop SUSPEND Coupe Wait Inp Start CONTINUE Coupe Goto Begin See also RUN HALT SUSPEND 8 14 37 COS Cosine Syntax COS lt Expression gt Accepted types Expression real Description This instruction returns the cosine of the lt Expression gt Remarks The argument lt Expression gt must be a valid numerical expression expressed in radians The function COS takes an angle and returns the two sides ratio of a rectangle triangle The ratio is the length of the adjacent side divided by the length of the hypotenuse The result is between 1 et 1 Example a COS 3 14159 See also SIN ARCTAN et TAN 8 14 38 CURSOR Print or clear the cursor Syntax CURSOR lt ON OFF gt Description This function prints or not the cursor on the operator panel Remarks This function uses the communication port 1 By default th
Download Pdf Manuals
Related Search
Related Contents
Teledyne T360 User's Manual Panasonic PT-AR100U CAD Drawing Embedded Pi User Manual ASUS B400V E7602 User's Manual 中山間地域農業と棚田オーナー制度の効果について 3D-Drucker 3D-Drucker STR-DH510 Manual de instalación del espectrógrafo Boller&Chivens. Copyright © All rights reserved.
Failed to retrieve file