Home

Alto ISaGRAF USER`S MANUAL

image

Contents

1. 4 3 2 1 Modbus TCP slave protocol Three C functions are available for using this protocol Function TCPM bS O ACTION Opens 4 Modbus TCP Slave channel on an Ethernet Alto WARNING this function must be used only once SYNTAX Boolean tcombs_O analog TableNum analog TableLength analog Access PARAMETERS TableNum 1 7 TableLength 1 4095 4095 words 16 bits Access 0 2 0 R W 1 Read 2 Write RETURNED FALSE Not opened VALUE TRUE Correctly opened EXAMPLE Status tcpmbs O 1 100 0 declares a Slave Modbus TCP protocol on an Ethernet Alto CPU This channel is associated with a read write accessible table of 100 words This table is identified by the number 1 The slave number is Alto IP address Note Four masters can access this table simultaneously Function TCPM bS S ACTION Monitors the presence of 1 to 10 masters on the ModBus TCP slave channel SYNTAX Boolean tcpmbs S message IPAddress analog TimeOut PARAMETERS IPAddress message type variable containing the IP address TimeOut 0 FFFF TimeOut in milliseconds RETURNED FALSE Master absent VALUE TRUE Master present EXAMPLE Status tcpmbs_S address_M 5000 monitor the presence of the master whose IP address is contained in the address_M message type variable If this master is absent for at least 5 seconds the status will switch from TRUE to FALSE
2. Function EMail I ACTION Initialize the SMTP server address This address may be an IP address or a server name ex smtp anydomain CAUTION The mail server must be unique it is therefore prohibited initialize it several times SYNTAX Boolean Status EMail_I Message Address PARAMETERS Address message type variable containing the SMTP server address RETURNED FALSE Operation failed VALUE TRUE Operation succeeded EXAMPLE Status EMail_I Address_Server The address of the outgoing mail server SMTP is initialized It s value is that contained in the message type variable Address_Server Function EMail S ACTION Send an electronic mail via the SMTP server SYNTAX Boolean Status EMail_S Message TO Message FROM Message Content PARAMETERS TO message type variable containing the destination address of the e mail This address can be in the IP or literal form ex symbolic_adress anydomain FROM message type variable containing the address of the e mail sender This address can be in the IP or literal form ex symbolic_adress anydomain Content message type variable containing the body of the e mail RETURNED FALSE Operation failed VALUE TRUE Operation succeeded EXAMPLE Status EMail_S Adresse_Destination Adresse_Sender Mail The message contained in the Mail variable is sent from the Sender Address to the Destination Address Two oth
3. DESCRIPTION Only if Compact Flash embedded soft Initialized EXAMPLE Close CCF CCF C Close Compact Flash embedded soft Function CCF FOR ACTION Format Compact Flash board SYNTAX analog CCF FOR analog Percent boolean Quick PARAMETERS Percent 0 100 occupation percentage of Compact Flash memory over it a writing operation return status at 1000 Quick True false True Quick format for a new board or ICF volume False obligatory to format an MFS volume RETURNED See list CCF errors VALUE DESCRIPTION Only one format is necessary in case of Compact Flash isn t formatted CCF O function allow to know if the Compact Flash is or not formatted EXAMPLE Format CCF CCF FOR 85 True Format the Compact Flash 85 is the occupation percent True Quick format operation Function CCF SU ACTION Ouvre un enregistrement en donnant son format nombre et type de variables qu il comportera SYNTAX analog CCF SU analog NBBOO analog NBANA analog NBTIME analog NBMSG PARAMETERS NBBOO 0 99 Nombre de variables de type bool ennes par enregistrement NBANA 0 99 Nombre de variables de type enti res par enregistrement NBTIME 0 99 Nombre de variables de type date heure par enregistrement NBMSG 0 99 Nombre de variables de type message par enregistrement RETURNED See list CCF errors VALUE DESCRIPTION Cette fonction est utiliser avant chaque enregistrement EXAMPLE
4. Function NulTcp R ACTION Read a message in the reception queue of a telnet channel SYNTAX message NulTcp R PARAMETERS None RETURNED Message characters read in the reception queue max 255 VALUE EXAMPLE Messagel NulTcp R all characters in the reception queue will be put in the Messagelvariable reception queue will be empty Function NulTcp N ACTION Reads the number of characters located in the reception queue SYNTAX analog NulTcp N PARAMETERS None RETURNED Message characters read in the reception queue max 255 VALUE EXAMPLE Messagel NulTcp R all characters in the reception queue will be put in the Messagelvariable reception queue will be empty Alto ISaGRAF User s Manual Page 35 leroy gt AUTOMATION 4 3 2 Modbus TCP protocol This protocol consists of encapsulating the Modbus exchanges in the IP frames It uses the TCP connected mode It offers the same functionality as the Serial ModBus slave Ports on asynchronous links of the product The differences with the Modbus protocol over asynchronous Port are as follows e No slave number between 1 and 255 as the addressing is undertaken with the IP address e Usage of the TCP connected mode Alto can open four simultaneous channels with numerous masters and slaves on the network Leroy Automation sets the limit to 4 masters e No diffusion available
5. String message according to the type of modified info RETURNED Status TRUEz initialization correct VALUE FALSE initialization error DESCRIPTION For the date YYYY MM DD for the time HH MM SS hh forthe day Sunday 0 Monday 1 Tuesday 2 Wednesday 3 Thursday 4 Friday 5 Saturday 6 EXAMPLE Write or update a date time and day of the week For example Friday December 31 2002 at 23 hours 58 minutes 10 seconds and 02 hundredths of a second Booleani DayTim_W 0 2002 12 31 Boolean2 DayTim_W 1 23 58 10 02 Boolean3 DayTim_W 2 5 Function Day Time ACTION Gives the date time or day in the form of a message string SYNTAX message Status Day_Time analog InfoType PARAMETERS see User s Guide RETURNED see User s Guide VALUE DESCRIPTION ISaGRAF FUNCTION see User s Guide Alto ISaGRAF also shows hundredths of a second The time is therefore given in the following format HH MM SS hh EXAMPLE see User s Guide 3 1 5 Compact Flash memory Alto support a Compact Flash memory to store information Only UCR B530 board accept it A PC soft named ICF Manager allows you to download all storage data at CSV XLS or HTML format 3 1 5 1 9 C functions allows you to initialize format prepare save data on Compact flash e CCF O and CCF C functions initialize and close Compact Flash embedded soft e CCF_FOR function format the Compact Flash function not required if the Compac
6. Block 1 functional 1 PID_AL ACTION Initialize parameter and refresh a PID block SYNTAXE Instance boolean Auto real Pv real Sp real XO real Kp real Ti real Td timer Ts real Min real Max Commande Instance Xout PARAMETERS Auto function mode automatic Auto True manual Auto False Pv Point Value Sp Set Point X0 Output pid value for the manual mode Kp proportional gain general to all actions Ti integration constant unit s Td d rivation constant unit s Ts Sampling period unit ms Min Max limit values low and high for output RETURN VALUE Xout Output value EXAMPLE pidi is an instance of pid al dictionary BF instances pidi Auto Pv Sp XO Kp Ti Td Ts Min Max Output pidi xout Nota parameter Auto must be to false at initialization This processing is broken down into three actions proportional integral derivative Fach action can be adjusted separately meaning that control can be achieved from each of the three actions Alto ISaGRAF User s Manual Page 17 leroyz A PID is implemented through the use of a C functional block called Pid Al as follows declare a PID instance pid1 in the dictionary once during the cycle call the instance with its parameters example pid1 Autol PointValue1 setpoint1 X01 kp1 til tdi ts1 Min1 Max1 setpoint1 and are analog inputs outputi is an analog output the
7. Figure 6 Slave Jbus Theory of Communication Size and form of analog variables and words contained in exchange tables Under ISaGRAF integer variables are encoded on 32 bits They can be represented in signed decimal form 2147483648 2147483647 or unsigned hexadecimal form variables 16 bits contained in an exchange table are read in their unsigned form by the Word R function In order to obtain these variables in their signed form the WordS R function must be used See the examples given in figures 8 and 9 Example for a Master Jbus protocol Page 22 00000000 FFFFFFFF Word Alto ISaGRAF User s Manual Serial Communication Management Ana V 1500d FFFFFA24h lt ordS RC EA24h adress n DWord R EA24h J adress n 1 V Ana V 1500d FFFFFA24h BEER rudis Ana V 64036d 0000FA24h Word RO Boolean V 1 s Bit_ RO senda Jbus slave Ana V 64036d 0000FA24n Won FA24h Ana V 640364 0000FA24h Werd_WO FA24h ME Boolean V 1 Bit Wo ori 101000100101 Jbus slave Work table relating to Workbench variables Comi of T Block 3 Figure 7 Master Jbus Theory of Communication The following sections of the manual describe the procedures for implementing each protocol Important note 1 table can be associated with several communication ports The theory is to declare a table by
8. data 8 bits stop bits 1 4 2 2 Master Jbus Protocol In order to use the Master Jbus protocol on a communication port 4 C functions are available Function JbusM O ACTION Opens a Master Jbus port on an Alto SYNTAX Boolean JbusM O analog TerminalBlock analog Com analog TableNum analog TableLength analog TimeOut analog NbrTests PARAMETERS TerminalBlock 1 Alto ISaGRAF User s Manual Page 27 leroy z AUTOMATION Com 02 J2 1 33 TableNum 1 7 TableLength 1 4095 4095 words 16 bits TimeOut 0 7FFFh in milliseconds NbrTests 0 9 number of additional tests upon reception of a no slave answer RETURNED VALUE FALSE Not opened TRUE Correctly opened EXAMPLE Status JbusM O 1 1 1 100 500 3 declares the J3 connector as a Master Jbus An exchange table of 100 words is associated with this port This table is identified by the number 1 The time out is 500 ms and the number of retries in the event of a no slave answer is 3 By default the com parameters are 19200 bauds no parity 1 stop bit 8 data bits Function JbusM P ACTION Configures communication on a Master Jbus port on an Alto SYNTAX Boolean JbusM P analog TerminalBlock analog Com analog Speed analog Parity analog StopBit analog Data analog RecTOut analog BrdTOut analog BusyRet PARAMETERS TerminalBlock 1 Com 02 J
9. A NIV1 est par exemple un analog d finit dans le dictionnaire Isagraf correspondant une entr e analogique ici niveau d eau la fonction crit cette variable dans le cache Function CCFW T ACTION Ecrit une date et une heure dans le cache de la compact flash SYNTAX analog CCFW T message Date message Heure PARAMETERS Date Variable message au format suivant AAAA MM JJ AAAA ann e MM mois JJ jour Heure Variable message au format suivant HH MM SS CC HH heure MM minutes SS secondes CC centi mes de secondes RETURNED See list CCF errors VALUE DESCRIPTION Cette fonction est utiliser apr s avoir d finit le format de l enregistrement fonction CCF SU et autant de fois que le param tre NBTIME l a d fini dans cette m me fonction CCF SU EXAMPLE EnregT_CCF CCFW T Date Heure Date et heure tant d finis dans le dictionnaire Isagraf en tant que messages et utilisant directement l horloge interne d Alto Date Day_Time 0 Heure Day Time 1 voir l utilisation de l horloge pour plus de renseignements la fonction crit ces variable dans le cache Function CCFW M ACTION Ecrit un message dans le cache de la compact flash SYNTAX analog CCFW T message Msg PARAMETERS Msg Variable message qui sera crite dans la m moire cache taille maximale de cette variable 255 caract res RETURNED See list CCF errors VALUE DESCRIPTION Cette fonction est utiliser apr s avoi
10. verify Ethernet wires e green Comi LED 0 ON if J2 activate console link params com 0 or programmation in modbus protocol or byte transmission reception 0 OFF otherwise e green Com2 LED ON if J3 activate programmation in modbus protocol or byte transmission reception OFF otherwise e Ext LED e green flashes green if communication is OK between main UCR and extension UCR e orange one of extension UCR B510 board is not responding to main UCR e red any of extension UCR B510 board is responding to main UCR e Mode LED e green o OFF if incorrect 0 ON if program read in Flash memory is correct e red AES board under main UCR not recognized e Run LED e green o flashes green slowly 1 s if the TIC application ISaGRAF is run correctly o flashes green rapidly 1 10s if the equipment is in PRM mode or if the application is stopped by ISaGRAF the kernel is active but does not run the TIC application e orange fixe Alto is in prm mode Page 46 Alto ISaGRAF User s Manual Alto monitoring and diagnostic 6 3 2 AES Leds The state of an Alto input and output is identifiable with 32 green leds in front face of UCR board Correspondence of those LEDs is describe afterwards for each AES board The signification of a led ON or OFF is describe depending of input or output type Led OFF Led ON Led flashing Digital input Eiou Eti Sensoropen Sensor closed Safety input Line default Digital
11. 1 9 0 1 8 5 O 1 Read function code 3 1 word at address 5 on slave no 6 and place it at address 12 of the table JbusM T 1 1 6 3 5 1 12 TRUE sends the read frame JbusM T 1 1 6 3 5 1 12 FALSE returns the communication status e Close the communication port by ending the program JbusM_C 1 1 Alto ISaGRAF User s Manual Page 29 leroy gt 4 2 3 Byte Transmission Reception Protocol Alto ISaGRAF users can install a byte transmission reception protocol on the available serial links except the console link The C functions provided can be used to install and manage FIFO queues one for transmission and one for reception A serial link can be managed in either the RS232 or RS485 standard This simple protocol is designed to manage terminals devices with an ASCII protocol without the time constraints associated with byte transmission and reception Low level management of a serial port is carried out by Alto during an interrupt After initializing the serial link users can read or write bytes in the transmission and reception queues The bytes are transmitted or received on the line by Alto ISaGRAF during an interrupt The following C functions are provided e NulPro O opens a simple communication sequence on an Alto port NulPro P configures a simple communication sequence on an Alto port NulPro S writes in the transmission queue on an Alto port NulPro R reads in the reception que
12. 21 SLAVE JBUS THEORY OF COMMUNICATION ssssseeee enhn aane nnne anna nna aaa nnn 22 MASTER JBUS THEORY OF COMMUNICATION csseeeeeene nehmen een nina nean eaa anna anna 23 Alto ISaGRAF User s Manual Alto ISaGRAF User s Manual C FUNCTIONS INDEX MUERE 34 NulPro C Reese 33 NulPro N jos pec nr 33 NulBrO Distros A 33 NulPro Paila ess 24 NulPro R ERR 25 NulPro S eee 13 NulTEp aoreet bns Star DURUM 13 NUITGD N osos n 12 NulTGD Oise Hoi 14 NulTcp Ries ada 13 INULTOD Score as 13 PID Al nao Perera 13 RING ame M 14 SnmbpVA C ees uerbi Pot 14 SnmpVM C 2 55 95 E 12 TEPMDVME DE ass Te 11 TCPMbM_O Pre rece 11 TR MID IMEC Sara ciones m 23 TCPMDML T sions n 24 TCPMDS Di ds Mere 42 TOPMDS Supra te 42 TGPMDS Tias T TUN 29 Tapis ais 27 Trapo A 28 US PING ain LESER ERRAT 29 Word Rice AUC 27 Word W ERE ERN 26 WOFS Rusia 26 Page 51
13. Boolean JbusS_O analog TerminalBlock analog Com analog SlaveNum analog TableNum analog TableLength PARAMETERS TerminalBlock 1 Com 02 J2 1 33 SlaveNum 0 255 TableNum 1 7 TableLength 1 4095 4095 words 16 bits RETURNED VALUE FALSE Not opened TRUE Correctly opened EXAMPLE Status JbusS O 1 1 12 3 100 declares J3 on SlaveJbus A table of 100 words accessible in read or write mode is associated with this port This table is identified by the number 3 The slave no is 12 By default the communication parameters are 19200 bauds no parity 1 stop bit 8 data bits This table starts at address O Function JbusS P ACTION Configures the communication parameters of a Slave Jbus port on an Alto SYNTAX Boolean JbusS P analog TerminalBlock analog Com analog Speed analog Parity analog StopBit analog Data analog Access analog Silence analog basic NetworkAddr PARAMETERS TerminalBlock 1 Com 02 J2 1 33 Speed 75Bauds 1 110Bauds 2 150Bauds 3 300Bauds 4 600Bauds 5 1200Bauds 6 2400Bauds 7 4800Bauds 8 9600Bauds 9 19200Bauds 10 38400Bauds 11 76800Bauds 12 only on J2 115kbauds 13 only on J2 200Bauds 14 only on J2 Parity No parity 0 Even 1 Odd 2 Forced to 0 3 Forced to 1 4 StopBit e 1Stop 1 e 2Stop 2 Data e 5Bits 5 e 6Bits 6 Page 26 Alto ISaGRAF User s
14. Function TCPM bS T ACTION Set the timeout value for closing the TCP connection after any more activity from the modbus TCP master the default value is 300 seconds or 5 minutes SYNTAX Boolean tcpmbs_T analog TimeOut PARAMETERS TimeOut 0 FFFF TimeOut in seconds RETURNED FALSE timeout not set VALUE TRUE timeout set EXAMPLE Status tcpmbs_S 10 If the master don t transmit modbus request during 10 seconds the modbus TCP slave close the TCP connection with the master Page 36 Alto ISaGRAF User s Manual 4 3 2 2 Serial Communication Management Modbus TCP master protocol Two C functions are available for using this protocol Function TCPMbM O ACTION Opens one Modbus TCP Master channel on an Ethernet Alto WARNING only three Modbus TCP master channel can be opened simultaneously SYNTAX Boolean tcpmbs O analog LineNum analog TableNum analog TableLength analog Access PARAMETERS LineNum 1 3 TableNum 1 7 TableLength 1 4095 4095 words 16 bits Access 0 2 0 R W 1 Read 2 Write RETURNED VALUE FALSE Not opened TRUE Correctly opened EXAMPLE Status tcpmbm o 2 1 100 0 Open a line number 2 Master Modbus TCP protocol on an Ethernet Alto CPU This channel is associated with a read write accessible table of 100 words This table is identified by the number 1 Function TCPMbM T ACTION Send
15. OSI model application layer that depends on the UDP protocol The port number which identifies the SNMP application protocol is 161 The variables that are managed by the SNMP protocol belong to a unique structure called MIB The operations supported by Alto are e Get allows a manager to extract the value of an object SNMP variable OID in an agent Alto e GetNext allows a manager to extract the next value of an object in an agent Alto e Set allows a manager to modify the value of an object in an agent Alto SNMP Alto variables are accessible in read write mode by the SNMP manager see paragraph 3 1 for the IP manager parameters The SNMP protocol enables access to Alto variables defined by ISaGRAF in the MIB Management Information Base The MIB is a database defined formally in the ASN1 Abstract Syntax Notation 1 language whose tree structure could be the following E ig iso El org E dod E internet CA directory E E mgmt H E mib 2 CA experimental private 4 enterprises e E3 lai E agent m The input variable name is iso org dod internet private enterprises lai agent entr es and its identifier is written as 1 3 6 1 4 1 4273 10 1 0 0 being the instance of the variable with this name 4273 is the identifier of LAI PLCs 10 the identifier agent 4 3 3 1 MIB II MIB II is the standard MIB all agents owned it The MIB II ID is 1 3 6 1 2 1 MIB II is composed by 10 groups Alto h
16. RETURNED FALSE Operation not carried out VALUE TRUE Operation correctly carried out EXAMPLE Status Trapint 3 Entier 4 OID associated is 1 3 6 1 4 1 4273 2 4 0 Function Tra pstr ACTION Transmit a trap with a message SYNTAX boolean Trapstr analog Code message Mess analog OID PARAMETERS Code value of trap code Mess Message to transmit OID 1 32767 order of the SNMP variable used to identify it in the 1 3 6 1 4 1 4273 Num Agent branch RETURNED FALSE Operation not carried out VALUE TRUE Operation correctly carried out EXAMPLE Status Trapstr 7 Mess 14 OID associated is 1 3 6 1 4 1 4273 2 14 0 Example see project Alsnmp Alto ISaGRAF User s Manual Page 41 leroy gt AUTOMATION 4 3 4 e SMTP Sending electronic mail Simple Mail Transfer Protocol Standard internet protocol for sending electronic mail Number of mail transmission attempts unlimited as long as Alto has not been able to connect to the SMTP server A mail transmission attempt is aborted if the server refuses to send the mail on The object of electronic mail sent from Alto is the following Alto Message number X where X Alto serial number The Email_I and Email_S functions respectively enable the address initialisation of the server of mail being sent and to send an electronic mail
17. Rp which it eliminates by opening In the serial arrangement the sensor is mounted in parallel with Rp which it eliminates by closing In order to preserve the general nature of parameter setting ISaGRAF can indicate the equivalent resistance of the resistor network when the sensor is normally open Rcno and when the sensor is normally closed Rcnf Resistance values are given in OHMS Parallel Arrangement Serial Arrangement Rcnf Rs Rp Rline Rcnf Rs Rline Rcno Rs Rline Rcno Rs Rp Rline CAUTION Parameter setting is unique for the resistance values of all safety boards and is therefore the same for all the channels of a single board min value by defaut max value RCNO 2000 Q 6600 Q RCNF 1000 Q 6 7 x RCNO 700 Q See specific board documentation for wiring diagram and calculation of RCNO et RCNF Alto ISaGRAF User s Manual Page 43 Re m leroy gt e Masque 32 bit mask for the wiring check of the 32 inputs The wiring check is active at input n if the bit of order n is set to 1 By default the 32 bits of the mask are set to 1 FFFFFF Example input 2 and input 16 in normal mode mask must be FF7FFD that correspond in binary to 1111 1111 0111 1111 1111 1101 For each input the status bit inputs and alarm bit states encode 4 possible states 2 particulars parameters of Bx02 board This board has extra parameters to e 8 parameters Type
18. and click on button Restore Don t forget to select the right archive location directory C Isawin Lai choose at decompression step Repeat that operation for each different object type Once all the objects have been integrated into the workbench all the C functions specific to Alto may be used as standard ISaGRAF functions C functions are listed further on in this manual The Libraries utility supplied with the ISaGRAF workbench and used to generate these functions is designed to display the Data sheet specific to each function It contains all the information required to use functions or input output boards parameters return codes restrictions examples etc On line application modification and source code backup remote read functions are not available on Alto Page 4 Alto ISaGRAF User s Manual Programming Environment 2 2 3 Integrating Alto projects examples in ISaGRAF workbench Start up the ISaGRAF project management soft Same restore operation than the libraries is to perform for all projects examples in menu Tools Archive Projects select each element contained in Archive list and click on button Restore Projects examples list Alext I O extension modules implementation Alccf compact flash implementation ALhtr Backed up RT Clock implementation Aljbusmi modbus master asynchronous protocol implementation Aljbusm2 modbus master asynchronous protocol implementation with SFC ch
19. error 1000 Compact Flash full occupation over percent defined in CCF_O function 650 Not correct number of elements at writing operation 600 Not correct number of elements has been writing 500 Closing error 400 Opening error 300 Format error 200 no more allocation memory 100 Not correct parameters 1 No error correct execution 500 Embedded Compact Flash soft Not initialized 1000 Logical max threshold exceeded for a data type 3000 Quick format operation done 5000 Compact Flash board occupied Example see project AICCF This program is storing data every 10 seconds In the sequential function chart CCF Step 1 initialization function CCF_O Step 2 timer 10 seconds backup every 10 seconds Step 3 storage format preparation function CCF SU Step 4 data storage in memory buffer Step 5 closing current data buffer and automatic storage in compact flash memory 3 1 5 2 ICF Manager Start ICF Manager two windows are available In the transfer window you have to choose e The IP address of Alto ISaGRAF e The TCP communication port 700 for example e Anew binary destination file name e Select the information data mode or transfer data mode e Select Automatic conversion data option if you don t want to do it on the second window of ICF Manager Bi Industrial Compact Flash Manager 0 0 0 120 d rd El Transfert Conversion Ad
20. est aa da 34 4 3 2 Modbus TCP protocol ehh hn seen een een eee nena nese neeanenanenanenanenan 36 4 3 2 1 Modbus TCP slave protocol cccceceeeee eee cece escent enne eene 36 4 3 2 2 Modbus TCP master protocol 37 4 3 3 SNMP PFOLOGOL a ois oo ied eoi oad ans bode tna pede See end eo rou RODS Adobe ved chads Pest De y NA 39 od AMIB Ll cick shan cave pU icd nan messes nains ic amiante nan dat on ida 39 453 33925 MIB Ng T 40 43 9 3 raps SNMP add 41 4 3 4 Sending electronic mail eiie ts ERA MER ania ER ae ERR BER SEXE ER ER RT 42 INPUT OUTPUT BOARDS einer ad ii 43 ALTO MONITORING AND DIAGNOSTIC eesreenn ea nn nane a anu u nna u amu u aman 45 6 1 ERRORS TRANSFERRED TO THE WORKBENCH s assa sis a sana sna nnn 45 6 2 SWITCHING ALTO TO PARAMETER SETTING MODE iii nan nina rna nnn 46 6 3 ALTO ISAGRAF LEDs CPU AND I O BOARDS iseeeneenemenenemesee enean nna nia a 46 6 3 1 CPUSEEDS tata nies iced RIA ERAS Deck VAR A FRA teak wih cies ERARESRR ead AAA ABRA 46 6 9 2 AES Leds RSR ai METRE TES 47 General Overview 1 General Overview Alto ISaGRAF made by LEROY Automation is programmed using the ISaGRAF workbench This documentation describes how to start up the ISaGRAF workbench on Alto target Details concerning the installation and use of the ISaGRAF workbench creating a project programming etc can be found
21. its number from 1 to 7 then to use its number when declaring another port If you are using a table that has already been declared the length entered as a parameter must be the same as that of the initial table The following Jbus Modbus orders are recognized and processed by Alto ISaGRAF a AE e RN NU 1 Alto does not distinguish between output bits and input bits 2 Alto does not distinguish between input words and output words Function Word R ACTION Reads 1 word in unsigned form in a network table associated with an Alto communication port SYNTAX analog Data Word R analog TableNum analog WordAddr PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 1 RETURNED Data analog value read 0 FFFFh The most significant bits 2nd VALUE word of the analog variable are set to zero If error 10000h EXAMPLE Data Word R 1 2 Reads a word at address 2 of table 1 Function DWord R ACTION Reads 2 words in a network table associated with an Alto communication Alto ISaGRAF User s Manual Page 23 leroy z port SYNTAX analog Data DWord R analog TableNum analog WordAddr PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 2 RETURNED Data analog value re
22. output Si or Sti or Ri Output open Output closed relay output Analog input EAi parametrable threshold exceed Analog output Nota i est l indice sur les entr es et les sorties Exceeding of not parametrable threshold toujours AES Bx01 E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23 E24 S1 S2 S3 S4 S5 S6 S7 S8 AES Bx02 ET1 ET2 ET3 ET4 ST1 ST2 ST3 ST4 EA1 EA2 EA3 SA1 SA2 EA4 EA5 EA6 EA7 EA8 AES Bx03 E1 E2 E3 E4 E5 E6 E7 E8 R1 R2 R3 R4 E9 E10 E11 E12 E13 E14 E15 E16 R5 R6 R7 R8 AES Bx04 R2 R3 R4 R6 R7 R8 AES Bx06 E10 E11 E12 E13 E14 E15 16 S2 S3 S4 S5 S6 S7 S8 AES Bx07 AES Bx08 ET1 ET2 ET3 ET4 ST1 ST2 ST3 ST4 EA1 EA5 EA6 EA7 EA8 EA9 AES Bx09 ET1 ET2 ET3 ET4 ST1 ST2 ST3 ST4 EA1 EA2 EA3 EA4 EA5 EA6 EA7 EA8 Alto ISaGRAF User s Manual Page 47 zc Cw leroyz AES Bx10 AES Bx11 AES Bx12 E1 E2 ES E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23 E24 E25 E26 E27 E28 E29 E30 E31 E32 AES Bx13 E1 E2 E3 E4 E5 E6 E7 E8 R1 E
23. voie to select the analog input type e 2 parameters Type voie to select the analog output type Caution see wiring documentation P ALT DOC 005 F to parameter switches of this board Type unit Input range Type unit Output range 0 om 10VWwww 00 mV Ovwww O 08 gt gt pA 20mA 20mA 09 A X mA 0mA 20 ThermocoupleB 24 C ThemmocoupeK 28 ThemocoupeR 3 particulars parameters of Bx08 Bx09 Bx10 Bx11 boards 3 i DO d Those devices have extra parameters e 10 parameters Type voie to select the analog input type e 2 parameters Type voie to select the analog output type Caution see the wiring documentation P ALT DOC 006 F to parameter switches Input range Type Unit Output range pp O mv 10V 10V OV 10V pp o WA OmA 20mA 1V 1V 4mA 20mA 20mA 20mA 4mA 20mA Page 44 Alto ISaGRAF User s Manual Alto monitoring and diagnostic 6 Alto monitoring and diagnostic 6 1 Errors Transferred to the Workbench Two types of errors can be transferred to the workbench errors encoded by CJ text explaining the error with a number between O and 99 These are listed in the workbench user s guide errors encoded by LAI number between 100 and 255 The following errors are encoded by LAI e 0 e 0 0 e 0 0 0 0 Te e o 100 type of Flash not AMD512K Bottom TIC size is limited in this case to
24. 128 KB 101 to 105 error when saving the TIC application to FLASH e 101 read error in FLASH e 102 write error in FLASH data written in spaces reserved for an application e 103 FLASH sector access error e 104 FLASH sector erase error e 105 read error data in spaces reserved for an application 110 to 112 error when reading the TIC application in FLASH e 110 FLASH type read error e 111 memory allocation error spaces reserved for an application e 112 FLASH sector access error 113 checksum error in TIC application read in FLASH 120 and 121 Alto dynamic memory damaged Alto automatic reboot 130 illegal board added in the case of an Alto80 order 1 3 140 to 143 save error in non volatile variables e 140 error if 1 or more non volatile variables are checked there must be at least one of each type e 141 Alto memory allocation error e 142 backed up memory full e 143 backed up memory read error 150 backed up clock initialization error 151 backed up clock write error 160 R2232 control signal read error 161 RS232 control signal write error 170 communication parameter setting error on comi of terminal block 1 arams com parameter on the cpu3xx board 200 calibration configuration error in analog AES board 201 configuration error in analog output AES board 202 i AES board number i not recognized 205 1 CF failure 205 2 CF opening failure 205 3 server of CF data start failure
25. 2 1 33 Speed e 75Bauds 1 110Bauds 2 150Bauds 3 300Bauds 4 600Bauds 5 1200Bauds 6 2400Bauds 7 4800Bauds 8 9600Bauds 9 19200Bauds 10 38400Bauds 11 76800Bauds 12 only on J2 115kbauds 13 only on J2 200Bauds 14 only on J2 Parity No parity 0 Even 1 Odd 2 Forced to 0 3 Forced to 1 4 StopBit e 1Stop 1 e 2Stop 2 Data e 5Bits 5 e 6Bits 6 e 7Bits 7 e 8Bits 8 RecTOut 0 7FFFh in milliseconds silent period in addition to the 3 end of frame detection characters O by default BrdTOut 0 7FFFh in milliseconds silent period in addition to the 3 end of frame characters on broadcast O by default BusyRet 0 9 number of retries following a slave busy answer 0 by default RETURNED VALUE FALSE Not configured TRUE Correctly configured Page 28 Alto ISaGRAF User s Manual Serial Communication Management EXAMPLE Status JbusM_P 1 1 9 O 1 8 5 O 1 modifies the Master Jbus parameters on J3 port The com parameters are now 9600 bauds no parity 1 stop bit 8 data bits Additional silent period at the end of frame transmission 5 ms 1 retry following a slave busy answer Function JbusM T ACTION Sends a Master Jbus frame to an Alto port and reads the communication status SYNTAX analog JbusM T analog TerminalBlock analog Com analog SlaveNum analog FunctionCode analog SlaveAddress anal
26. 205 4 CF formatting failure 205 5 CF record opening failure 205 6 CF record closing failure 205 7 CF closing failure 205 10 CF record writing failure Alto ISaGRAF User s Manual Page 45 leroy gt AUTOMATION 6 2 Switching Alto to Parameter Setting Mode For an Alto ISaGRAF switching to parameter setting mode means running only the ISaGRAF kernel with no TIC Target Independent Code application downloaded and restablishing the console link on J2 This mode called PRM is symbolized by LED RUN light on orange on the CPU To switch to PRM mode from Windows95 98 NT 2000 XP e Switch off Alto e connect Alto J2 and the PC com1 or com2 using an RS232 cable e run the SSTBsetup exe program included on the Libraries diskette under Windows95 This program waits until it recognizes an Alto e select the communication channel on the PC 1 4 e select Run Prm function e switch on Alto e in its initialization sequence Alto switches to PRM mode and its RUN LED lights up without flashing The PC displays the message Alto set to PRM by default e Alto ISaGRAF is now in PRM mode 6 3 Alto ISaGRAF LEDs CPU and I O boards 6 3 1 CPU LEDs e red Col LED 0 OFF if operation is correct o ON if lot of collision on Ethernet network network overloaded solution reduce its traffic e green Lnk LED ON if Ethernet connection correct OFF incorrect Ethernet connection
27. 530 and B531 boards eese nenas 10 3 1 3 NOM Volatile Variabl s d e exce tov Ex UE EE wks 11 3 1 4 Backed p ClOCK cocoa pies oben eve ea bie es ma PAD es DEEP E FERE FEE ets 11 3 1 5 Compact Flash memory ss T aaae ERITA aan 12 3 1 5 1 Compact Flash implementation 12 3 1 5 2 ICF Manager 3 e ine nest cea tegen rre ter eee EX spel yee e men ennemi eee sande EE 15 3 1 6 PID GOnLFol ois PERDERE ho Dave nn rou entente dense para Bas Y rax rye Por Ou 17 3 2 EXTENSION CPU CONFIGURATION e emen rase aa nnn nare karen as hme k ansehen na nna 19 3 2 1 Mechanical setting oses ose rra ey a Ou ey sted EAR RERER denses A sante 19 3 2 2 Soft settings ies utu Fre eri Weld nha a Feed eras vea Paus Pale ot YE Ere Pal helen Fold ee DD Di 20 SERIAL COMMUNICATION MANAGEMENT e eene rr 21 4 1 THEORY OF COMMUNICATION ON SERIAL COMMUNICATION PORTS cceseeeeen nemen nnns 21 4 2 PROTOCOLS ON RS232 AND RS485 NETWORK eesssseeesee enean hann anna rna nnn nnn 26 4q 2 1 Slave JDus PFOLOCOL retos e tear eti e era nia senda venen exe ada Ex ne taa sen AR 26 4 2 2 Master Jbus Protocol wicccccccccncccccncccucucucunteucunteecentsecentseuansscuansenuausnsugnsnsgnngs 27 4 2 3 Byte Transmission Reception Protocol esses eene nnne 30 4 3 ETHERNET PROTOCOLS 15 due cer he pee e ette Cd E de ete cath 34 4 3 1 Telnet protocol e dice iaa ub nt MER RE RUE ERE be fente Mt
28. 9 E10 E11 E12 E13 E14 E15 E16 E17 E18 E19 E20 E21 E22 E23 E24 AES Bx14 AES Bx16 E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13 E14 E15 E16 Page 48 Alto ISaGRAF User s Manual Alto monitoring and diagnostic APPENDIX Modbus Jbus asynchronous and Modbus TCP return codes Decimal ea comme o o change in progress 356 oo echange correct 1025 wrong function code 1026 1027 wrong length wrong sub function code 1029 1030 wrong frame length 1281 CRC error 4096 1000 in transmission mode frame in progress 4097 1001 in transmission mode broadcast error 10 8 aoa wrong ads 59 15 The most frequently encountered communication status error codes are shown in bold type Alto ISaGRAF User s Manual Page 49 leroy gt AUTOMATION FIGURE 1 FIGURE 2 FIGURE 3 FIGURE 4 FIGURE 5 FIGURE 6 FIGURE 7 Page 50 TABLE OF FIGURES ISAGRAF ARCHITECTURE ON ALTO issssseseeeene essen nenas nr rn nn aran an rr nn aran ann 1 ALTO ISAGRAF PROCESSING O Y C E ss eese nean anna aea ana aea anna nnn 2 INPUT OUTPUT WIRING PRINCIPLE eissseeeeseee hene enean nani aaa aaa aa a a n 6 ALTO ISAGRAF THEORY OF OPERATION ssssseeeeehnee hene enne aae ea ana a aaa ann 7 ALTO COMMUNICATION CONFIGURATIONS esseeeeeen eene enne nna aea ana nnn ann nn
29. Enreg CCF CCF_SU 2 4 1 3 Pr pare le format d un enregistrement qui comportera 2 bool ens 4 analogs 1 date 3 messages Function CCFW B ACTION Ecrit un bool en dans le cache de la compact flash SYNTAX analog CCFW B bool en Value PARAMETERS Value Valeur bool enne qui sera crite dans la m moire cache RETURNED See list CCF errors VALUE DESCRIPTION Cette fonction est utiliser apr s avoir d finit le format de l enregistrement fonction CCF SU et autant de fois que le param tre NBBOO l a d fini dans cette m me fonction CCF SU EXAMPLE EnregB CCF CCFW B B DG1 B DG1 est par exemple un bool en d finit dans le dictionnaire Isagraf correspondant une entr e TOR ici tat ouvert ou ferm d un disjoncteur la fonction crit cette variable dans le cache Function CCFW A ACTION Ecrit un analog dans le cache de la compact flash SYNTAX analog CCFW_A analog Value PARAMETERS Value Valeur enti re qui sera crite dans la m moire cache RETURNED See list CCF errors Alto ISaGRAF User s Manual Page 13 I L0Y a VALUE DESCRIPTION Cette fonction est utiliser apr s avoir d finit le format de l enregistrement fonction CCF SU et autant de fois que le param tre NBANA l a d fini dans cette m me fonction CCF SU EXAMPLE EnregB CCF CCFW B A NIV1
30. FFh LengthWrite 1 128 DataAddressWrite 0 4096 address of data in Alto table RETURNED see appendix for the list of the code of returned values VALUE EXAMPLE Status TCPMBM S 2 192 168 2 4 5 1 4 20 2 30 request on line 2 to 192 168 2 4 modbus TCP slave read 1 word at address 5 on slave store at address 4 in local Alto table write 2 words at address 20 on slave words are at address 30 in local Alto table Function TCPM bM b ACTION Set the timeout value for closing the TCP connection with the slave after any more activity from the modbus TCP master the default value is 300 seconds or 5 minutes SYNTAX Boolean tcpmbm b analog LineNum analog TimeOut PARAMETERS TimeOut 0 FFFF TimeOut in seconds 0 close the TCP connection after each modbus TCP exchange gt 0 close after the timeout value set RETURNED FALSE timeout not set VALUE TRUE timeout set EXAMPLE Status tcpmbm b 1 10 If the master don t transmit new modbus request during 10 seconds the modbus TCP master close the TCP connection with the slave Page 38 Alto ISaGRAF User s Manual Serial Communication Management 4 3 3 SNMP Protocol e SNMP Simple Network Management Protocol Standard protocol used on Internet for the administration of hosts routers and other devices on the network Alto is an SNMP agent Alto SNMP variables are read write accessible for a SNMP manager SNMP is the protocol of the
31. Manual Serial Communication Management e 7Bits 7 e 8Bits 8 Access Read Write 0 Read 1 Write 2 e None 3 Silence 0 7FFFh NetworkAddr 0 FFFFh RETURNED FALSE Not configured VALUE TRUE Correctly configured EXAMPLE Status JbusS P 1l 1 9 O 1 8 2 0 1000 modifies Slave Jbus parameters on J3 The com parameters are now 9600 bauds no parity 1 stop bit 8 data bits Access is in read only mode 2 The related Jbus table starts at address 1000 Function JbusS C ACTION Closes a Slave Jbus port on an Alto SYNTAX Boolean JbusS C analog TerminalBlock analog Com PARAMETERS TerminalBlock 1 Com 02 J2 1 33 RETURNED FALSE Not closed VALUE TRUE Correctly closed EXAMPLE Status JbusS C 1 1 closes the Slave Jbus port on J3 The console link J2 by default supports the ISaGRAF slave Modbus This protocol provides access to ISaGRAF application variables via their network address This network address is defined in the workbench dictionary Only Boolean or Analog variables are accessible The Modbus functions recognized by the ISaGRAF protocol are as follows Read n bits Write 1 bit 6 Write 1 word Caution the ISaGRAF Modbus protocol does not manage error codes such as unknown Modbus address The following list shows the default communication parameters of this console link slave no 1 speed 19200 bauds parity none
32. RCES OF ALTO nn ns senescere aia aaa a aaa ada aa aaa aaa n n 2 1 2 CYCLEOF PROGESSES PERFORMED seen dne RR RR x E eg nee icine E REV EXTR ERR 2 1 39 CPU AND AES ALTO UNITS ginti ree iesu pP din eu veto ee pd Ca ese pee sote pda do sae pev vta Rods Eo ever ero Epod 2 PROGRAMMING ENVIRONMENT e ce nnnu armen uunn uum uana uma usta asma uma uana uuu nun 4 2 1 INSTALLING THE ISAGRAF WORKBENCH s nhan nina anis aa anna anna nna nnn nn 4 2 2 INTEGRATING ALTO SPECIFIC FUNCTIONS esseeeese ee ence nans nah nna nain anna anna nna nnn nn 4 2 2 1 Source files decompression sn suas sua sua sese aea aan 4 2 2 2 Integrating Alto specific libraries in IsaGraf workbench 4 2 2 3 Integrating Alto projects examples in ISaGRAF workbench esses 5 253 FIRST PROGRAM Maes Lan os Pet ns MM IA lh lp C DI ee Sn D nn sn ey 5 2 4 HARDWARE CONFIGURATION A A Tr Et de 5 2 5 MAKE APPLICATION iere e eR E YA wand 6 2 6 CONNECTING THE ISAGRAF WORKBENCH TO ALTO nine nr nnn nana rina nnn nnn nn 6 2 7 DOWNLOADING AN APPLICATION eeesseeennenehemekss emassa ananas aaa aaa aaa aaa aaa n 7 2 8 DEBUGGING AN APPLICATION siemens E Re dada 8 MAIN CPU AND EXTENSION CPU n ee nrnearn eurn rr 9 3 1 MAIN EPU CONFIGURATION a b xe Talia ut 9 3 1 1 consol link parameter esses esee hee heh EEE EEE DEDEDE EEE EEE aan nn 9 3 1 2 Particular parameters for the B
33. Word Writes the analog variable Word at address 2 of table 1 Function DWord W ACTION Writes 2 words in a network table associated with an Alto communication port SYNTAX Boolean Status DWord_W analog TableNum analog WordAddr analog Data PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 2 Data analog value to write 0 FFFFFFFFh RETURNED Status TRUE FALSE VALUE EXAMPLE Word 16 FF008800 Status DWord W 1 2 Word Writes the analog variable Word at addresses 2 and 3 of table 1 Page 24 Alto ISaGRAF User s Manual Serial Communication Management Function Bit W ACTION Writes 1 bit in a network table associated with an Alto communication port SYNTAX Boolean Status Bit W analog TableNum analog WordAddr analog BitOrder Boolean Data PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 1 BitOrder 0 Fh Data TRUE FALSE RETURNED Status TRUE FALSE VALUE EXAMPLE BitStatus TRUE Status Bit W 1 2 5 BitStatus bit 5 of word 2 of table 1 set toi Alto ISaGRAF User s Manual Page 25 leroy gt AUTOMATION 4 2 4 2 1 Protocols on RS232 and RS485 network Slave Jbus Protocol In order to use the Slave Jbus protocol on a communication port 3 C functions are available Function JbusS_O ACTION Opens a Slave Jbus port on an Alto SYNTAX
34. _ leroy 5 AUTOMATION DEVELOPMENT TOOLS FOR ALTO PLC ISaGRAF WORKBENCH Alto ISaGRAF USER S MANUAL P DOC ALTO 300E V1 7 SCOPE OF SUPPLY Alto ISaGRAF Kit includes e 1 RS232 cable from the PC to Alto e 1 Alto ISaGRAF Libraries CD Rom Alto implementation manual is supplied with Alto This documentation describes the functions of e embedded software kernel e version 4 55 e Alto ISaGRAF libraries version 3 0 TECHNICAL SUPPORT Phone 33 0 5 62 24 05 46 Fax 33 0 5 62 24 05 55 e mail support leroy autom com ISaGRAF is a registered trademark of ICS Triplex MS DOS and Windows are registered trademarks of Microsoft Corporation All other brand or product names mentioned herein are registered trademarks of their respective owners LEROY Automatique Industrielle is constantly developing and improving its products The information contained herein is subject to change without notice and is in no way legally binding upon the company This manual may not be duplicated in any form without the prior consent of LEROY Automatique Industrielle Leroy Automatique Industrielle Head office Boulevard du Libre change 31650 Saint Orens Phone 33 0 5 62 24 05 50 Fax 33 0 5 62 24 05 55 Web site http www leroy automation com 1 5 6 CONTENTS GENERAL OVERVIEW 22 200 2224 5 2 202 222 aUaRRUSERRAREDERUERRRRERERARUDUNRESNERANREERRANSSENARRREREEEE 1 1 1 HARDWARE RESOU
35. a new project by selecting File New Project in the Project Manager window set B53x on slot 0 of the input output wiring CPU unit set Bxxx on slot 1 of the input output wiring AES unit In the list of Compiler options only select TIC code for INTEL generate the application download it to Alto This minimum program doesn t perform any processing Important the console link or workbench link is located by default on J2 connector It can be located on the Ethernet link see CPU Management In the following sections of this document details are given of specific processes that can be programmed on Alto ISaGRAF 2 4 Hardware Configuration Alto hardware configuration is achieved by selecting IO connection in the Project menu This window proposes 256 input output board slots Only the first 6 can be used to program an Alto The first slot is reserved for the CPU B520 B530 or B531 Only three types of CPU are used for all Alto devices Alto ISaGRAF User s Manual Page 5 O leroy gt AUTOMATION LIDIL Alto leroy z UCR B531 rang 0 40000000 00000000 eeccccce coccccce AES B101 gt H HU GREEN E MU See rang 1 The communication Ports associated with each CPU are declared in the ISaGRAF program using specific functions Alto rack is shown vertically and the input output boards are numbered fr
36. ad 0 FFFFFFFFh VALUE initialized at the value 1 EXAMPLE Data DWord R 1 2 Reads 2 words at address 2 of table 1 Function WordS R ACTION Reads 1 word in unsigned form in a network table associated with an Alto communication port SYNTAX analog Data WordS R analog TableNum analog WordAdar PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 1 RETURNED Data analog value read 0 FFFFh The most significant bits 2nd VALUE word of the analog variable are set to 1 If error 10000h EXAMPLE Data WordS R 1 2 Read a word at address 2 of table 1 Function Bit R ACTION Reads 1 bit in a network table associated with an Alto communication port SYNTAX analog Data Bit R analog TableNum analog WordAddr analog BitOrder PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 1 BitOrder O Fh RETURNED Data analog value VALUE e bit set to 0 0 e bit set to 1 1 e error 1 EXAMPLE Data Bit R 1 2 5 reads bit 5 of word 2 of table 1 Function Word W ACTION Writes 1 word in a network table associated with an Alto communication port SYNTAX Boolean Status Word W analog TableNum analog WordAdar analog Data PARAMETERS TableNum 1 7 WordAddr 0 max value entered when opening Com 1 Data analog value to write O FFFFh The most significant bits 2nd word are ignored RETURNED Status TRUE FALSE VALUE EXAMPLE Word 16 FF Status Word W 1 2
37. art Aljbuss modbus slave asynchronous protocol implementation AlNulcar simple communication with null character treatement implementation AlNulpro simple communication transmission and reception byte protocol implementation Alpid pid implementation Alsaveva Retained variables implementation Altosnmp SNMP protocol MIB and Traps implementation AITCPe modbus TCP slave protocol implementation AITCPm modbus TCP master protocol implementation Altemail SMTP protocol implementation sending electronic mail Altxem1 horodated emails implementation Altxem2 horodated emails implementation Alxmulti multi communication protocol implementation modbus TCP master and slave asynchronous modbus master and slave e Alxmult2 multi communication protocol implementation modbus TCP slave serial link modbus asynchronous master e Alxmult3 multi communication protocol implementation modbus TCP slave NullTCP modbus asynchronous master I O extensions e Alxmult4 multi communication protocol implementation modbus TCP slave NullTCP asynchronous modbus master Compact Flash storage e Alxmult5 Gateway function Ethernet network asynchronous network modbus TCP slave protocols and modbus asynchronous master implementation e Alxmult6 multi communication protocol implementation SNMP MIB and timestamped TRAPS 2 3 First Program A minimum program without treatments can be made as follows create
38. as only the first group implemented group System 1 System content basic information to recognize the agent Note the notation is name object position type access e sysDescr 1 octet string read only agent description e SysObjectID 2 object identifier read only Identification Pointing to the branch of device 1 3 6 1 4 1 4273 10 for LAland agent 10 e SysUpTime 3 Time Ticks read only Time passed since initialisation e SysContact 4 octet string read write Contact e SysName 5 octet string read write Node name e SysLocation 6 octet string read write Location of device e SysServices 7 integer read only Service level available between 1 and 7 OSI layers Alto ISaGRAF User s Manual Page 39 eee leroy gt 4 3 3 2 MIB LAI Leroy Automation obtained from Internet Assigned Numbers Authority MIB a branch identified in the Enterprises branch LAI number 4273 In LAI 4273 branch a sub branch is defined with the agent number the parameter Num Agent SNMP is in wiring diagram of UCR board see paragraph 3 1 and in this sub branch are defined the ISaGRAF variables The SnmpVA C SnmpVM_C functions enable respectively creating the following SNMP variable types e 32 bit signed integers e messages as character strings whose length is defined at the time of the variable creation Function SnmpVA C ACTION Def
39. cation Configurations Communication on Alto is managed via 2 software layers The bottom layer is specific to each serial link It stores the bytes received detects an end of frame character when the silent period is overrun and transmits any answer from Alto It is interrupt driven specific to the serial link and is transparent for the user program The top layer is independent of the serial links It analyzes the received frame carries out any work requested by the master and prepares the answer to be transmitted This layer is processed by user functions specific to each protocol The following protocols are discussed in the following sections of this manual Protocols on RS232 and RS485 network e Slave Jbus e Master Jbus e Simple transmission reception protocol Caution the choice of serial link RS232 or RS485 depends entirely on the wiring adopted Protocols on Ethernet e ModBus TCP slave and master e SNMP Alto SNMP variables are read write accessible for a SNMP manager e SMTP Alto can send emails 4 1 Theory of Communication on serial communication Ports The other RS232 485 or RS232C serial ports support either the Modbus Jbus protocol or a specific protocol based on byte transmission reception or the console link if necessary The Modbus Jbus protocol is used on an Alto port as follows initializing or declaring a Slave or Master Modbus Jbus communication Port is done by using a specific C functi
40. ction NulTcp O ACTION Open a telnet client connection SYNTAX boolean NulTcp O message Addrip analog Numport message Login message Password Addrip IP address or symbolic address DNS Address of distant PARAMETERS machine Numport Number of port on distant machine Page 34 Alto ISaGRAF User s Manual Serial Communication Management Login Identification name to connect to the port on distant machine Password Password to connect to port on distant machine RETURNED FALSE Not opened VALUE TRUE Correctly opened EXAMPLE Status NulTcp O 192 168 239 210 2100 root ddd Open a telnet connection with a machine IP address 192 168 239 210 on his port 2100 Function NulTcp C ACTION Close a telnet client connection SYNTAX boolean NulTcp C PARAMETERS None RETURNED FALSE Not opened VALUE TRUE Correctly opened EXAMPLE Status NulTcp C Close a telnet connection with a machine Function NulTcp S ACTION Send a message in a telnet channel SYNTAX boolean NulTcp S message Msg boolean Crif Msg Message to transmit PARAMETERS Crif False message send just so True transmission with CRLF characters add to the message RETURNED FALSE Writing not done VALUE TRUE Correct writing EXAMPLE Status NulTcp_S Message2 False send variable Message2 in transmission queue of the telnet channel
41. d gt 0 NbrChar 1 255 255 max length of an ISaGRAF message if NbrChar 0 writes all the characters of the message if NbrChar n writes n characters of the message RETURNED FALSE Not written VALUE TRUE Correctly written EXAMPLE Status NulPro S 1 1 16 A0 0 sends the message located at address 16 A0 on the transmission queue associated with J3 l NulPro_R Function EG ACTION Reads in the reception queue on an Alto port SYNTAX analog NulPro R analog TerminalBlock analog Com analog MsgNetworkAdar analog NbrChar PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 MsgNetworkAddr 0 FFFFh network address of the ISaGRAF dictionary Note the message network address must be declared 70 NbrChar 1 255 255 max length of an ISaGRAF message if NbrChar 0 reads all characters of the message if NbrChar n reads n characters of the message RETURNED 1 n message read correct VALUE 0 message not read 1 message read but incorrect the message does not store all the characters 2 message read but incorrect a character could not be read in the reception queue or the character read request concerns more characters than in the message 3 no characters in the buffer EXAMPLE Status NulPro R 1 1 16 A0 20 reads 20 characters in the reception queue associated with J3 these characters are placed in the message located at network address 16 A0 Function NulPro N ACTION Reads the number of characters l
42. er functions allows to verify the SMTP server presence Function US PING ACTION Initialize the function of checking the SMTP server presence SYNTAX Boolean Status US_PING Message Address analog period analog delay PARAMETERS Address message type variable containing the SMTP server address Period period of request in minute Delay timeout authorized for the server response RETURNED FALSE Operation failed VALUE TRUE Operation succeeded Function PING V ACTION Refresh the function of checking the SMTP server presence SYNTAX Analog Status PING V RETURNED VALUE 256 server present 1280 server absent Page 42 Alto ISaGRAF User s Manual Input Output Boards 5 Input Output Boards Each of the following I O modules has a bit named presence it can be used by the application to know if module is OK or not For each input output board a data sheet Help menu is available in the ISaGRAF workbench 1 particulars parameters of Bx13 Bx14 Bx15 and Bx16 boards Those boards are equipped with an adjustable comparison device used to check the wiring of sensors by connecting a network of 2 resistors to them safety inputs These resistor networks are of 2 types the serial arrangement i e the 2 serial resistors and the parallel arrangement i e the 2 parallel resistors The serial resistor is always present In the parallel arrangement the sensor is mounted in series with
43. fficient for operation with Alto target Start up IsaGraf workbench 2 2 Integrating Alto specific Functions Leroy Automation has developed Alto specific libraries These are designed to use resources specific to Alto inputs outputs remote communication protocols etc These libraries are supplied on the Alto IsaGraf Libraries floppy disk included in this programming kit In order to install them on the workbench correctly select Libraries in the Tools menu in the main window see A22 in the IsaGraf User s Guide Access to the library is also possible by clicking on the Libraries icon in the IsaGraf program group 2 2 1 Source files decompression Insert the Alto IsaGraf Libraries CD Rom into your CD drive Execute the file LibrariesAltoIsagraf exe choose a new directory for example C Isawin Lai and start decompression The directory you choose contain now the following IsaGraf objects Family Object type File Extension Libraries IO configurations ria IO boards bia IO complex boards xia Functions iia Function blocks aia C functions ula C functions blocks fia Projects pia 2 2 2 Integrating Alto specific libraries in IsaGraf workbench Start up the IsaGraf libraries soft In menu File Other libraries select a library type IO Boards for example In menu Tools Archive select each element contained in Archive list
44. imple communication sequence on an Alto port SYNTAX Boolean NulPro C analog TerminalBlock analog Com PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 RETURNED VALUE FALSE Not closed TRUE Correctly closed EXAMPLE StatusPro C 1 1 Closes a simple communication sequence on J3 Page 32 Alto ISaGRAF User s Manual Serial Communication Management Read Write bytes Three functions allows to write read and count not ASCII characters but directly bytes it s interesting when we want to transmit or receive bytes with null bytes with Nulpro functions Null byte is considered as a end character Function BinPro S ACTION Writes in the transmission queue on an Alto port SYNTAX Boolean BinPro S analog TerminalBlock analog Com analog Variable analog NbrByte PARAMETERS TerminalBlock 1 Com 02 J2 1 33 Variable 32 bits integer containing the bytes to be send NbrByte 1 4 writes n characters of the variable RETURNED FALSE Not written VALUE TRUE Correctly written EXAMPLE Status BinPro_S 1 1 26 1 sends one byte value 26 on the transmission queue associated with J3 BinPro R Function ACTION Reads in the reception queue on an Alto port SYNTAX analog BinPro_R analog TerminalBlock analog Com analog NbrByte PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 Nb
45. in the ISaGRAF User s Guide supplied with the workbench The following diagram provides an overall view of ISaGRAF architecture on Alto Communication ressources Inputs Outputs System ressources User PC Alto Figure 1 ISaGRAF Architecture on Alto Alto target supports the ISaGRAF kernel and provides access to the following resources e Alto system clock memory etc e remote input output drivers e communication functions The ISaGRAF workbench is designed to create and modify new projects intended for the target The Libraries utility allows the user to manage Alto This includes the following functions e adding local input output boards adding remote communication drivers Modbus Jbus Slave Modbus input output drive functions leds Alto diagnostics functions board status read etc Alto ISaGRAF User s Manual Page 1 leroyz 1 1 Hardware Resources of Alto Alto is a hardware work base The ISaGRAF kernel is run on this base and uses the available hardware resources For this reason even a description of the hardware may help to understand the operating modes of Alto and the related functions Processor Intel 386 Ex Flash memory 512 Kb 64ko used for TIC IsaGraf code RAM memory 512 Kb Port Ethernet 10 base T on connector J1 Asynchronous com 232 485 channel 0 com1 on connector J2 Asynchronous com 485 channel 1 com2 on connector J3 Backed up clock FRAM backed up saved data An i
46. ines the SNMP order in the 1 3 6 1 4 1 4273 agent branch of an analog variable in the ISaGRAF dictionary SYNTAX Boolean Status SnmpVA C analog Flag analog OID analog AddrAnaVar PARAMETERS Flag 1 4 not used set to 0 by default OID 1 32767 order of the SNMP variable used to identify it in the branch AddrAnaVar 0 FFFF dictionary network address hex of the analog variable RETURNED FALSE Operation not carried out VALUE TRUE Operation correctly carried out EXAMPLE Status SnmpVA C O0 4 16220 the analog variable with address 16220 in the dictionary can be accessed by SNMP its identifier is the following 1 3 6 1 4 1 4273 2 4 0 Function SnmpVM C ACTION Defines the SNMP order in the 1 3 6 1 4 1 4273 agent branch of a message variable in the ISaGRAF dictionary SYNTAX Boolean Status SnmpVM_C analog Flag analog OID analog AddrMesVar PARAMETERS Flag 1 4 not used set to 0 by default OID 1 32767 order of the SNMP variable used to identify it in the 1 3 6 1 4 1 4273 branch AddrMesVar 0 FFFF dictionary network address hex of the message variable RETURNED FALSE Operation not carried out VALUE TRUE Operation correctly carried out EXAMPLE Status SnmpVM C 0 14 16230 the message variable with address 16230 in the dictionary can be accessed by SNMP its identifier is the following 1 3 6 1 4 1 4273 2 14 0 Example see project Alsnmp Adress of SNMP variable en
47. ion that enables applications to directly access a Datagram transmission service UDP is used for applications which are satisfied by a request response model type The reply being used as a positive acknowledgement of reception e ARP Address Resolution Protocol The link layer Protocol of the OSI model ARP allows finding the physical address of a target machine by knowing its IP address latter e ICMP Internet Control Message Protocol The interconnection protocol ICMP allows gateways and equipment to exchange information related to abnormal conditions TCP UDP This protocol suite over that of the Ethernet determines the computer communication mode and inter network connection procedures Note the ping function ICMP protocol will allow you to verify the presence of an equipment on the Ethernet network Example under DOS session tape the line ping xxx xxx xxx xxx where xxx xxx xxx xxx is the IP ADDRESS of the equipment you want to test Identification of Alto on Ethernet Function Add rIP ACTION Returns the IP address of Alto SYNTAX message Data AddrIP PARAMETERS None RETURNED IP address of Alto VALUE EXAMPLE AddressIP AddrIP 4 3 1 Telnet protocol This protocol consists in including bytes transmissions in IP frames and extract bytes from IP frames it use the TCP connected mode Five C functions are available Fun
48. ndow will appear Select Ethernet in the scrollable Communication Port menu The slave number of this port should be 1 Now click the Setup button PC PLC link parameters X Target Slave Number Communication port Control Time out seconds ETHERNET A Retries Enter the IP address of your Alto in the Internet address field Page 10 ETHERNET link parameters X Internet address 192 168 10 1 i d Port number n Cancel The Workbench uses the WINSOCK DLL library for TCP IP communications Ensure that this file is correctly installed on the hard disk 3 1 2 Particular parameters for the B530 and B531 boards e IP address this identifies the network and the device Alto PLC on a TCP IP network By default the IP address is 255 255 255 255 In this case Alto ignores the other parameters and uses a BOOTP address server which will send a free IP address to Alto Format xxx xxx xxx xxx where xxx 0 255 e Sub network mask address mask used to show the breakdown of the IP address into sub network address and device address on the sub network This 32 bit mask is composed entirely of 1 s for all the sub network address parts and entirely of O s for the device address parts Using the sub network mask Alto determine if it must contact the gateway to reach a recipient according to the IP address of the recipient and the sub network mask acc
49. nfra red CAN bus 500kbit allows to connect to a UC master two extension UC placed of each side of the master see UCR documentation 1 2 Cycle of Processes Performed Following the well known operating principle of a PLC the ISaGRAF kernel runs the following processing cycle Status Input values Input refresh Processes Output refresh Output values CPU Input Output Board Figure 2 Alto ISaGRAF Processing Cycle 1 3 CPU and AES Alto units Available CPU unit UCR Type Communication Ports Plug In cards and compact flash UCR 8521 PALTFCT301 1 RS232 RS485 Port and 1 RS485 Port UCR B530 PALT FCT 406 1 Ethernet Port 1 RS232 RS485 Port 1 RS485 Port and Yes Infrared Port UcRB531 PALTFCT305 1 Ethernet Port 1 RS232 RS485 Port and 1 RS485 Port Available plug in CPU units UCR Type Function Communication Ports Page 2 Alto ISaGRAF User s Manual General Overview Available I O units gs Digital Analog P ALT DOC 007 E P ALT DOC 002 E P ALT DOC 002 E P ALT DOC 006 E P ALT DOC 006 E P ALT DOC 006 E P ALT DOC 006 E P ALT DOC 008 E P ALT DOC 010 E Alto ISaGRAF User s Manual Page 3 leroyz 2 Programming Environment 2 1 Installing the IsaGraf Workbench Refer to the IsaGraf User s Guide and follow the instructions starting from the chapter entitled Startup The hardware and software configuration required for the IsaGraf workbench is su
50. ocated in the reception queue on an Alto port SYNTAX analog NulPro N analog TerminalBlock analog Com Alto ISaGRAF User s Manual Page 31 leroy gt PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 RETURNED VALUE NbrChar number of characters in the reception queue EXAMPLE NbrChar NulPro N 1 1 reads the number of characters located in the reception queue associated with J3 Function NulPro P ACTION Configures a simple communication sequence on an Alto port SYNTAX Boolean NulPro C analog TerminalBlock analog Com analog Speed analog Parity analog StopBit analog Data PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 Speed e 75Bauds 1 110Bauds 2 150Bauds 3 300Bauds 4 600Bauds 5 1200Bauds 6 2400Bauds 7 4800Bauds 8 9600Bauds 9 19200Bauds 10 38400Bauds 11 76800Bauds 12 only on J2 115kbauds 13 only on J2 200Bauds 14 only on J2 Parity No parity 0 Even 1 Odd 2 Forced to 0 3 Forced to 1 4 StopBit e 1Stop 1 e 2Stop 2 Data e 5Bits 5 e 6Bits 6 e 7Bits 7 e 8Bits 8 RETURNED VALUE FALSE Not configured TRUE Correctly configured EXAMPLE Status NulPro_P 1 1 9 0 1 8 modifies the communication parameters on J3 The com parameters are now 9600 bauds no parity 1 stop bit 8 data bits Function NulPro_C ACTION Closes a s
51. og Length analog DataAddress Boolean SendFrame PARAMETERS TerminalBlock 1 Com 02 J2 1 33 SlaveNum 0 255 FunctionCode e ior 2 read n bits 3 or 4 read n words 5 write 1 bit 6 write 1 word 15 write n bits e 16 write n words SlaveAddress 0 FFFFh Length 1 128 DataAddress 0 max value entered when opening Com 1 SendFrame Boolean TRUE to send the frame FALSE to read the status of the previous frame RETURNED VALUE If SendFrame TRUE 0 Frame not sent 1 Frame correctly sent If SendFrame FALSE result of sent frame status to JBUS standard e g see appendix EXAMPLE On comO of TerminalBlock 2 read 1 word at address 5 on slave 1 store at address 2 Status JbusM_T 1 1 1 3 5 1 2 TRUE read status of previous frame Status JbusM_T 1 1 1 3 5 1 2 FALSE Function JbusM_C ACTION Closes a Master Jbus port on an Alto SYNTAX Boolean JbusM_C analog TerminalBlock analog Com PARAMETERS TerminalBlock 1 Com 02 J2 1 33 RETURNED VALUE FALSE Not closed TRUE Correctly closed EXAMPLE Status JbusM C 1 1 closes the Master Jbus port on J3 port Example declaration of a Master Jbus communication port to J3 Use in an ISaGRAF project e Open the communication port JbusM O 1 1 100 500 3 e Configure the communication parameters JbusM P 1
52. om O to 5 The following is an configuration example showing the corresponding items on Alto aw ISaGRAF ALJBUS1 1 0 connection File Edit Tools Options Help 2 PB TLF 8 E b531 me E fa params com 0 em bx01 cous AdresselP 192 168 1 160 presence ne mw MasqueSousReseau 255 255 255 0 E inputs ne mwj AdressPasserelle 192 168 1 1 E outputs n mw Nom lto Alto mw NomAdresseDNS 192 168 1 1 se Num Agent SNMP 0 4 soos AdrlP Manager 255 255 255 255 mm Emplacement 6 w Community public Za j z Ls M s Jia Figure 3 Input Output Wiring Principle The logical order of each Alto board is indicated below it CPU 0 1st I O 1 The B101 board is in fact composed of several boards It only occupies one slot in the list of declared boards Note extension blocks are not configured On the wiring page an Alto is considered as a single rack 2 5 Make application e In menu Make Compiler option select the option ISA86M TIC code for INTEL e Make the application menu Make Make application 2 6 Connecting the ISaGRAF Workbench to Alto When you switch on an Alto ISaGRAF it runs the following algorithm Page 6 Alto ISaGRAF User s Manual Programming Environment Switch on amp Search for a valid application in FLASH No application in FLASH OR PRM mode Applicati
53. on OK Wait for an application to be download Application OK Save the application to FLASH Run the application Application stopped Figure 4 Alto ISaGRAF Theory of Operation The RUN LED flashes slowly at 1 sec intervals while the application is running on Alto To connect to Alto proceed as follows e connect the RS232 cable delivered with the kit between a COM on the PC and J2 connector on Alto e in the Debug menu set up the communication parameters as follows slave 1 19200 bps no parity 1 stop bit 8 data bits and no flow control Set the time out to 10 seconds for example and the number of tests to 3 Then select the communication Port used on the PC e select Debug in the Debug menu According to the diagram shown above two cases may arise e no application has been retrieved from the FLASH memory the message in the debugger display window is No application e an application has been retrieved from the FLASH memory the message in the debugger display window is name of active application Data relating to the cycle time and status of this application then appears in the main display window of the debugger Refer to section A 15 Debugging of the ISaGRAF User s Guide for details concerning the correct use of the debugger If no connection has been made between Alto and the workbench the workbench can be fo
54. on from the workbench This function is used to define the communication parameters on the Port and link them to an exchange table of n words Alto ISaGRAF User s Manual Page 21 leroy z AUTOMATION Frames coming from a master or slave will refresh this table The data of each table can be used from the workbench dictionary variables using specific functions Example of a Slave Jbus protocol Word R reads a word from a table to a dictionary analog variable in unsigned form Word W writes an analog variable from the dictionary to a word in a table Bit R reads a bit from a table to a dictionary Boolean variable Bit W writes a Boolean variable from the dictionary to a bit in a table DWord R reads two words from a table to a dictionary analog variable DWord_W writes an analog variable from the dictionary to two words in a table WordS R reads a word from a table to a dictionary analog variable in signed form Ana V 1500d FFFFFA24h 0rd RO EA24h adress n Ana V 640364 0000FA24n D Word RO FAIR ro Ana V 64036d 0000FA24h Word RO EA24h Boolean V 1 lt Bit RO tohlio1000100101 Jbus master A FA24n Ana V 1500d FFFFFA24hy LWor a Ana V 1500d FFFFFA24h Word WO ModbusTCP Boolean V 1 Bit WO oo Master ModbusTCP Workbench Work table relating Master variables to Com0 of T Block 2
55. ording to the following algorithm Format xxx xxx xxx xxx where xxx 0 255 Alto ISaGRAF User s Manual Main CPU and Extension CPU e Gateway address IP address of the gateway on the network If Alto wishes to communicate outside the network to which it belongs it must address this gateway By default this address is 127 0 0 1 and identifies Alto itself not the gateway Format XXX XXX XXx xxx where xxx 0 255 e Alto Name Alto symbolic name Must be defined Format 10 alphanumeric characters at the most e DNS Address DNS Domain Name Server IP address This server returns an IP address from a symbolic name identifying device or server on a TCP IP network Format XXX XXX XXx xxx where xxx 0 255 SNMP parameters e Num Agent SNMP Agent number in the branche LAI 4273 by default to O SNMP service deactivated e AdrIP Manager SNMP manager IP address response only for the request of this manager by default to 255 255 255 255 responses to request from any SNMP manager e Emplacement location field in Alto MIB II e Community public by default can be personnalised Alto will respond only to request send by a manager of his community 3 1 3 Non Volatile Variables Alto is equipped with a 1024 byte backed up memory To back up a variable in the event of an Alto power failure simply check the non volatile box when declaring the variable in the Dictionary With an Alto the execution pa
56. output value returned is in output1 pid1 Xout It is possible to build a P I PI PD ID or PID controller To do this simply disable the action which is not used An action is considered disabled when the parameters on which it depends are set to zero See example project pid_dem pia Setting the PID Controller The PID controller is set by selecting the following parameters Kp Ti Td The Kp Ti and Td parameters can be determined using the experimental analysis methods of the process For example the typical specifications for devices controlling chemical or thermal processes are as follows e Ti from 3 to 1000 seconds e Td from 3 to 150 seconds An on line setting method the trial and error method On line setting can be carried out in an empirical manner using the procedure summed up below install the control system remove the integral and derivative actions set the gain Kp to a low value vary the setpoint slightly and observe the system response Since the gain is very low the response will only be slight e double the gain and repeat the above step Go on in this way until the response starts to oscillate Let us call this value Kpu ultimate Kp e set Kp to Kpu 2 e repeat the same operation reducing Ti by a factor of 2 until an oscillating response is obtained for a slight variation in the setpoint e Set Ti to twice this value e proceed in the same way for the derivative constant increa
57. r d finit le format de l enregistrement fonction CCF SU et autant de fois que le param tre NBMSG l a d fini dans cette m me fonction CCF SU EXAMPLE EnregM CCF CCFW_M Msgl1 Msgl est d fini dans le dictionnaire Isagraf en tant que message la fonction crit cette variable dans le cache Function CCF SF ACTION Ferme un enregistrement ouvert met jour la m moire cache et l crit si demand dans la compact flash SYNTAX analog CCF SF bool en Doflush PARAMETERS Doflush True Forgage du flush des caches sur la compact flash c est l criture des donn es sur la compact flash False Ecriture g r e automatiquement les caches ne sont flush s que si ils sont pleins RETURNED See list CCF errors VALUE DESCRIPTION Cette fonction est utiliser apr s l criture compl te de l enregistrement en m moire cache avec les functions CCFW x attention la dur e de vie d une compact flash Taille des caches par type de variable 4096 bool ens 128 analogs 16 time 2 messages lorsque ces tailles sont atteintes l criture est forc e correspondent par secteur 512 octets EXAMPLE Flush CCF CCF SF True Force le flush des caches CCF list errors returned values by precedent functions Page 14 Alto ISaGRAF User s Manual Main CPU and Extension CPU Returned Value 30000 internal error 22000 defect Compact Flash board 21000 Writing error 20000 Reading
58. rByte 1 4 reads n bytes in the reception queue RETURNED Variable containing the read bytes VALUE EXAMPLE Variable BinPro R 1 1 4 read 4 bytes in the reception queue associated with J3 Function BinPro N ACTION Reads the number of bytes located in the reception queue on an Alto port SYNTAX Analog BinPro N analog TerminalBlock analog Com PARAMETERS TerminalBlock 1 Com 02 J2 1 J3 RETURNED NbrBytes number of bytes in the reception queue VALUE EXAMPLE NbrBytes BinPro_N 1 1 reads the number of bytes located in the reception queue associated with J3 Alto ISaGRAF User s Manual Page 33 leroyz 4 3 Ethernet protocols Once these network parameters have been correctly entered the Ethernet link will support e IP Internet Protocol a set of industry protocol standards enabling communication in a heterogeneous environment A protocol of the transport layer of the OSI model it supplies a routable enterprise network management protocol as well as Internet access e TCP Transmission Control Protocol Protocol for the Transport and Session layers of the OSI model TCP verifies if the data have been correctly transmitted over the network and if they are in the appropriate order This reliable connection oriented protocol also ensures the multiplexing of IP connections to the applications It is a connected protocol e UDP User Datagram Protocol UDP is a Datagram protocol without connect
59. rameters of an ISaGRAF application do not have to be configured as specified in the ISaGRAF User s Guide The space occupied per type of variable is as follows e 1 byte per Boolean variable e 4 bytes per analog variable 4 bytes for all the analog variables together e 5 bytes per time out variable e 1 byte per character of a message variable 3 bytes per message variable The only constraint is that if 1 non volatile variable is checked then one of each type must be checked 4 types of variables can be non volatile Boolean analog time out and message 3 1 4 Backed up Clock Alto ISaGRAF is equipped with a backed up software clock This clock gives the date time and day of the week This data can be read or written using C functions in the ISaGRAF workbench Function DayTim O ACTION Initializes access to the clock on Alto SYNTAX Boolean Status DayTim O PARAMETERS None RETURNED Status TRUE initialization correct VALUE FALSE initialization error DESCRIPTION Only one initialization is required for a project EXAMPLE Status DayTim O initializes access to the clock Function DayTim W ACTION Sets the time date and time of day on Alto clock SYNTAX Boolean Status DayTim W analog InfoType message String PARAMETERS InfoType 0 date 1 time 2 day of the week Alto ISaGRAF User s Manual Page 11 leroy z
60. rced not to retrieve an application from the FLASH memory this is Alto parameter setting mode done with SSTB soft 2 7 Downloading an Application An application is downloaded from the workbench to Alto by selecting Download in the File menu of the debugger In order to make the transfer the message No application must be displayed in the debugger display window e either in PRM mode e or by switching off the active application from the debugger by selecting Stop Application in the File menu of the debugger Alto ISaGRAF User s Manual Page 7 leroy gt AUTOMATION Page 8 Select Download to start downloading the application The debugger display window indicates what percentage of the application has been transferred At the end of the transfer the application is automatically saved to FLASH by Alto The application is then run in real time mode If an error occurs during the write to FLASH it is reported to the workbench as a number ranging from 100 to 255 see section on Errors 2 8 Debugging an Application An application can be debugged in one of two ways e either on the PC using the simulator accessed by selecting Simulate in the Debug menu e or on Alto using the debugger accessed by selecting Debug in the Debug menu Details on how to use these two debugging modes can be found in the ISaGRAF User s Guide The size of the TIC generated by the ISaGRAF workbench corresponds to the si
61. resse de l esclave e rots Vitesse de transfert ise ef res El 223 si 700 p Lente Rapide M Fichier binaire de destination p MRUproduits alto sagrafitest icf amp Conversion automatique des donn es Demande d informations Vv A R cup rer les donn es Quitter propos In the convert window you have to select e the source binary file to convert e the format and name of destination file three format are available CSV Excel Html Alto ISaGRAF User s Manual Page 15 ie Industrial Compact Flash Manager 0 0 0 120 D sJRU produitssaltoN sagrafstest icf ER LIEN __2 cations NIRU produits altoNsagraf test xls 2 Lj ee You can automate the data backup with batch file ICF Manager Aide rapide de la ligne de commande c 2003 Leroy Automatique Industrielle Q Page 16 Alto ISaGRAF User s Manual Main CPU and Extension CPU 3 1 6 PID control Principle on Alto ISaGRAF A PID controller is used to control industrial processes It processes the difference between the value of the set point and the output value Output PID model implanted on Alto ISaGRAF Syst me to control SP Set Point PV Point Value Xout t Kp a0 Janaosza ce in continuous Xout k Kp at T3 qo Te amp I amp k 1 in discrete with II I k 1 amp I Ts C functional block characteristics PID AL
62. roject I O Connection and add UCR B510 extension boards slots 2 and 4 and AES I O boards slots 3 and 5 under B510 then connect the I O variables to the AES boards The example corresponding to the precedent material configuration is ow ISAGRAF EXTENS C blage des E S UCR main board AES under UCR main board UCR extension board n 1 AES under extension board n 1 UCR extension board n 2 AES under extension board n 2 O I JE al rm JE 4 Ez Ex Page 20 Alto ISaGRAF User s Manual Serial Communication Management 4 Serial Communication Management Alto ISaGRAF is equipped with 2 serial links and one Ethernet link J2 connector is the initial console link This console link can be connected to the Ethernet port as shown before The console link enables the communication with ISaGRAF workbench downloading debugging The different types of UCR are as follows Connector number Ji J2 J3 UCR Type UCR 53x UCR 52x and UCR 53x UCR 52x and UCR 53x Connector Type RJ45 SubD9 SubD9 Link Ethernet RS232 RS485 RS485 Modbus asynchronous Modbus asynchronous Protocols TCP IP Modbus TCP master or slave master or slave master slave SNMP availables SMTP Transmission Reception Transmission Reception bytes bytes Console Link Customizable initial Terminal Block 1 Terminal Block 1 Soft Identification ComO Comi Figure 5 Alto Communi
63. s a Master modbus TCP frame to Alto Ethernet port and reads the communication status SYNTAX analog tcpmbm_T analog LineNum message SlaveNum analog FunctionCode analog SlaveAddress analog Length analog DataAddress PARAMETERS LineNum 1 3 SlaveNum IP address or DNS Address of the modbus TCP slave FunctionCode e 1lor2 read n bits 3 or 4 read n words 5 write 1 bit 6 write 1 word 15 write n bits e 16 write n words SlaveAddress 0 FFFFh Length 1 128 DataAddress 0 FFFFh Com 1 RETURNED VALUE see appendix for the list of the code of returned values EXAMPLE Status TCPMBM T 2 192 168 2 4 3 5 1 4 read 1 word at address 5 on slave 192 168 2 4 store at address 4 in table associated to line 2 Alto ISaGRAF User s Manual Page 37 leroy gt Function TCPMbM S ACTION Sends a Master modbus TCP IO scanning frame to Alto Ethernet port and reads the communication status SYNTAX analog tcpmbm S analog LineNum message SlaveNum analog SlaveAddressRead analog LengthRead analog DataAddressRead analog SlaveAddressWrite analog LengthWrite analog DataAddressWrite PARAMETERS LineNum 1 3 SlaveNum IP address or DNS Address of the modbus TCP slave SlaveAddressRead 0 FFFFh LengthRead 1 128 DataAddressRead 0 4096 address of data in Alto table SlaveAddressWrite 0 FF
64. se Td until an oscillating response is obtained then set Td to 1 3 of this value Page 18 Alto ISaGRAF User s Manual Main CPU and Extension CPU 3 2 Extension CPU configuration Only UCR B530 board is able to manage extension UCR board Extension boards are named UCR B510 this board allows communication with UCR main board Communication between UCR main board and UCR extension board is done with an infrared net using CAN protocol 2 extension boards can be add they must be placed from each side of UCR main board analog AES boards can t be placed under one UCR extension board Example of material configuration Extension n 1 CPU principale Extension n 2 UCR B510 UCR B530 UCR B510 LIL II O leroy gt O leroy gt O leroy gt ls amnes B ss accuses AES Bx01 AES Bx08 AES Bx12 To do this two settings must be done 3 2 1 Mechanical setting On UCR B510 are placed 5 switches e Switches 1 and 2 binary coding of logic number extension e Switches 3 and 4 ON e Switch 5 OFF Example Switch1 Switch2 Switch3 Switch4 Switch5 extension OFF ON ON ON OFF number 1 extension ON OFF ON ON OFF number 2 Alto ISaGRAF User s Manual Page 19 CF leroyz 3 2 2 Soft settings In your project modify your 1 0 configuration select the menu p
65. t Flash is already formatted e CCF_SU and CCF_SF functions prepare a structure data to be stored then close it storage in a buffer and option writing in Compact Flash Writing on Compact Flash is automatically managed to optimize the number of writing operation max number writing 300000 for a commercial Compact Flash 1000000 for an industrial Compact Flash e CCFW_B CCFW_A CCFW_T CCFW_M functions store data in buffer those functions must be used after CCF_SU and before CCF_SF Compact Flash implementation Function CCF O ACTION Initialize Compact Flash embedded soft SYNTAX analog CCF O analog Percent analog Channel Jj PARAMETERS Percent 0 100 occupation percentage of Compact Flash memory over it a writing operation return status at 1000 Number of TCP channel for backup PC program ICF Manager Channel RETURNED VALUE See list CCF errors DESCRIPTION Only one open operation is necessary for one project EXAMPLE Open CCF CCF O 85 700 85 is occupation percentage over it one alarm is send 700 is the TCP channel number Page 12 Alto ISaGRAF User s Manual Main CPU and Extension CPU Function CCF C ACTION Close Compact Flash embedded soft SYNTAX analog CCF O PARAMETERS None RETURNED VALUE See list CCF errors
66. the characters of the message located at address 20h of the dictionary NulPro S 1 1 16220 0 Example of tested printer EPSON LX300 serial and parallel Function NulPro O ACTION Opens a simple communication sequence on an Alto port SYNTAX Boolean NulPro O analog TerminalBlock analog Com analog RecTabLength analog TransmitTabLength analog Mode PARAMETERS TerminalBlock 1 Com 02 J2 1 33 RecTabLength 1 1020 reception queue length 1020 4 messages Page 30 Alto ISaGRAF User s Manual Serial Communication Management TransmitTabLength 1 510 transmission queue length 510 2 messages Mode 0 1 HalfDuplex 1 or FullDuplex 0 mode RETURNED FALSE Not opened VALUE TRUE Correctly opened EXAMPLE Status NulPro O 1 1 1020 510 1 declares a simple communication sequence on J3 A reception queue of 1020 words is associated with this port A transmission queue of 510 words is associated with this port the current mode is Half Duplex Function NulPro S ACTION Writes in the transmission queue on an Alto port SYNTAX Boolean NulPro S analog TerminalBlock analog Com analog MsgNetworkAddr analog NrbChar PARAMETERS TerminalBlock 1 Com 02 J2 1 33 MsgNetworkAddr 0 FFFFh network address of the ISaGRAF dictionary Note the message network address must be declare
67. tier4 iso org dod internet private enterprises lai NumeroAgentSNMP entier4 its identification named OID is 1 3 6 1 4 1 4273 2 4 0 0 is the instance of variable MIB manager additions with Alto variables defined in language ASN1 LAI DEFINITIONS BEGIN IMPORTS enterprises FROM RFC1155 SMI OBJECT TYPE FROM RFC 1212 Page 40 Alto ISaGRAF User s Manual Serial Communication Management lai OBJECT IDENTIFIER enterprises 4273 agent OBJECT IDENTIFIER lai 2 entier4 OBJECT TYPE SYNTAX INTEGER ACCESS read only STATUS mandatory DESCRIPTION test variable enti re avec alto Isagraf agent 4 message4 OBJECT TYPE SYNTAX OCTET STRING SIZE 0 255 ACCESS read only STATUS mandatory DESCRIPTION test variable message avec alto Isagraf agent 14 gt END 4 3 3 3 Traps SNMP V1 Standard Trap A coldstart trap is transmitted automatically to the manager at each power on of device Sp cifics Traps It s possible to transmit to the Manager des sp cifics traps with two C functions e Trapint to transmit a code and a value e Trapstr to transmit a code and a message Function Trapint ACTION Transmit a trap with a value SYNTAX boolean Trapint analog Code analog Value analog OID PARAMETERS Code value of trap code Value analog value to transmit OID 1 32767 order of the SNMP variable used to identify it in the 1 3 6 1 4 1 4273 Num Agent branch
68. to and the ISaGRAF workbench In order to achieve this you just need to modify the params_com in the cabling window as indicated below params_com 10000000 designates the Ethernet port as the console link In this case of an Ethernet port the slave number is replaced by the IP address of Alto and the communication format is imposed by the IEEE 802 3 10Base T standard Alto ISaGRAF User s Manual aw ISaGRAF ALJBUS1 1 0 connection File Edit Tools Options Help 2 PBPO 125568 E b531 my params com 10000000 1 m bx01 mwl AdresselP T32 T58 1 160 maj MasqueSousReseau 255 255 255 0 uw AdressPasserelle 192 168 1 1 ous NomAlto Alto sous NomAdresseDNS 192 168 1 1 mw Num Agent SNMP 0 mw AdrlP Manager 255 255 255 255 mw Emplacement uw Community public 4 4 Ea rfresence gt inputs E outputs n ne a gt aZ Page 9 O leroy gt AUTOMATION After having modified the params_com which acts on Alto generated and loaded the application to the PLC you must select the corresponding port in the ISaGRAF workbench Click on Link setup in the Debug menu in the Programs window to do this ISaGRAF ALJBUS1 Programs olx File Make Project Tools Options Help A MSO Hct mi Begin E Tall Simulate icriture de variabl Sequential Jbu Workspace fune communicat Link setup The following wi
69. ue on an Alto port NulPro N reads the number of characters located in the reception queue on an Alto port e NulPro C closes a simple communication sequence on an Alto port Example declaration of a simple communication sequence on a communication port comO of terminal block 2 The communication parameters are TerminalBlock 2 Com 0 reception queue 1020 words transmission queue 510 words Mode Half Duplex speed 19200 bauds parity odd 1 stop bit 8 data bits Use in an ISaGRAF project e Open the communication port NulPro_O 1 1 1020 510 1 e Read 12 characters in the reception file and place them in the message located at network address 20h of the dictionary NulPro R 1 1 16220 12 e Write the characters of the message located at network address 20h of the dictionary to the transmission file NulPro S 1 1 16220 0 e Close the communication port NulPro_C 1 1 Example Printer Management The byte transmission reception functions on a serial link can be used for simple control of a serial printer Any Alto serial port can be used to manage a serial printer RS232C links can also be used to manage control signals such as DTR or XON XOFF Only messages with a network address in the dictionary can be printed Send a message to a printer connected to J3 e Open the communication port NulPro O 1 1 1020 510 1 e Configure the communication parameters if necessary NulPro_P e Write
70. ze of the appli x8m file This file is located in the isawin apl application name directory Application size is limited to 64 KB appli x8m file 64KB Alto ISaGRAF User s Manual 3 Main CPU and Extension 3 1 Main CPU and Extension CPU CPU main CPU configuration The main CPU must always be located on the first slot of the I O wiring editor Example of the B531 configuration aw ISaGRAF ALJBUS1 1 0 connection File Edit Tools Options Help amp PBPro tl FRI Se ta b531 ue E gt us params com 0 am bx01 w AdresselP 192 168 1 160 presence ne m MasqueSousReseau 255 255 255 E inputs ne ma AdressPasserelle 192 168 1 1 E outputs n me NomAlto Alto soos NomAdresseDNS 192 168 1 1 sas Num Agent SNMP 0 4 sous AdrlP Manager 255 255 255 255 Emplacement 5 ww Community public 1 2 fa 3 4 The output 1 indicate the version number of the embedded kernel The output 2 indicate the number of actives tasks The output 3 indicate the RAM memory available in byte 3 1 1 consol link parameter by default consol link is on RS232 serial port named J2 and params_com 0 the communication parameters are e slave speed parity stop bit data 1 19200 bauds none 1 8 bits Console Link on the Ethernet port The Ethernet port can support the console link that enables communication between Al

Download Pdf Manuals

image

Related Search

Related Contents

Manual técnico KNX Actuadores universales de atenuación  USER GUIDE PAGE 1 OF 5  UPort 1200/1400/1600 User`s Manual  2. Operation Guide  PhoCheck Tiger: User Manual  Fisher & Paykel GB IE User's Manual    COPANEF  Manual de instrucciones  GRAPPLE™ INSECTICIDE  

Copyright © All rights reserved.
Failed to retrieve file