Home
Communication server PLCComS
Contents
1. COMM LOOP DELAY 100 The delay in the main loop 1 1000 ms NET CONNECT MAX 128 Maximum number of client connections Maximum is 1024 MEM BLKSIZE 4096 Block size in bytes for transfer PLC memory Maximum is 65536 FFILE BLKSIZE 16384 The block size in KB for file transfer Maximum is 65536 FFILE TIMEOUT 300 The time limit of the file Maximum is 3600 FFILE MAXRECS 256 Number of files stored in the memory Maximum is 1024 END LINE CRLF Yes End character of the line Yes DOS r nl No UNIX n PF VAR DISABLED Yes The default state of variables DIFF VAR ENABLED Yes Disables or enables listings DIFF messages SYNC VAR ENABLED Yes Enable or disable synchronization variables with PLC while downloading files LIM OF DECIMALS No Restricts precision floating point numbers to generate DIFF messages Yes restrict NUM OF DECIMALS 10 The number of decimal digits that will be displayed or restricted 1 6 REAL 1 15 LREAL SCIENT NOTATION No Scientific notation for REAL a LREAL Yes scientific d ddd e ddd No normal ddd ddd Symbolic name of PLC IPADDR IP address PLC SERVER_PORT The port number on which the client will communicate with the PLC SERIAL_DEVICE Name of serial line SERIAL_SPEED Communication speed for serial li
2. 127001 gt 5010 Foxtrot 4 PLC 1 gt 192 168 134 176 PC1 PLC 2 5011 TC700 s 4 192 168 134 55 PC2 192 168 134 62 a gi Server can be run with the following parameters PLCComs dh c configuration file gt log file d daemon Server runs in the background c config Configuration file l log Log file h help Displays help In case of run with parameter d the server runs in the background and all reports are forwarded to a log file Unless its name is specified it is set to PLCComS log This option is only available in a version for the Linux operating system In case the parameter was not specified c its name is set for PLCComsS ini Unless the parameter is not specified all the reports are sent to the terminal server from which it was run TXV 138 63 01 Strana 4 22 Copyright O Teco a s 2014 All rights reserved 2 Configuration ini file It consists of sections where the section marked as is mandatory and contains global set tings Behind this section the others follow describing the setting for the particular PLC There must be at least one such section The name of such section can be any except The name is used in the log file entries for convenience 2 1 Example of the configuration file
3. E Global Variables VAR GLOBAL Basic types C User types C Variable name C System types Eunction Blocks m VAR EXTERNAL dat ARRAY 0 1 JOF DATE El E VAR GLOBAL maet j E c LREAL PUBLIC variable is pointer Iv PUBLIC PLCNET J ALIGNED E cosinus LREAL PUBLIC Absolute position AT Loo 0 0 0 0 mm E dat DATE PUBLIC mm E positive BOOL PUBLIC CERT E sinus LREAL PUBLIC E text STRING PUBLIC E tim TIME PUBLIC Bl VAR GLOBAL CONSTANT ld VAR GLOBAL RETAIN Comment E Network variables E VAR GLOBAL E VAR GLOBAL CONSTANT Fig 6 1 1 The dialog box Define variables If you already have defined all public variables that you want to monitor you must generate a public file pub a file containing information about the declared public variables This file may not be automatically generated by the Mosaic package In such case it is necessary to set the genera tion of that file in Project manager in the setting menu branch Sw Export files where it 1s necessary to check the option 7EC 1131 file exp and option Assembler file pub Fig 6 1 2 The public file generated after the user program compilation is stored in the project directory un der the name project name pub The name of this file is used then as the configuration parameter of ini file for application of the server PLCCOmS In case that the file name does not include the relative pa
4. Windows x86 1586 mingw32msvc g Linux x86 1586 linux gnu g Linux x86 64 x86 64 linux gnu g Linux Armel arm linux gnu g arm none linux gnueabi g Linux Armhf arm linux gnueabihf g TXV 138 63 01 Strana 22 22 Copyright Teco a s 2014 All rights reserved
5. 74 0 Ill Program USP mS Local Pott uu Cpm Compiler Timeout 1000 ms Export files C TecoRoute PLC access passwords Environment F Seralline converter PLC control Preferences One message per packet Text editor options Message repeating v 2x Text editor colors TEXT i Code completion Hw files configuration Documentation Info about HW used IP address Info about Hw setup Info about network P Domain name Controllers information Part Internet T For Timeout Serial line converter One message per packet Message repeating Jv a 24 Fig 6 2 1 Connecting the remote PLC The configuration file of the PLCCOmS application undergo only minor changes comparing to the first example The only item that is necessary to amend is JPADDR IP address of the PLC which we change from the local address 27 0 0 1 for simulated mode on IP address of PLC local network e g 192 168 33 144 TXV 138 63 01 Strana 20 22 Copyright O Teco a s 2014 All rights reserved Now you can start the PLCCOmS server with the specified parameters of configuration file and log file using the command from the prompt Example 6 1 For the communication with the server is again recommended to use the program Putty which supports TELNET with the appropriate settings from the previous example Fig 6 1 4 Warning do not confuse the IP address of the host station that is running the server
6. PLC for them Thus the volume of data to be transferred is decreased After the start of the server all variables are enabled Disabling does not af fect the variables in the fixed public file 4 2 0 Command GETMEM Query GETMEM test string 6 n Answer GETMEM test string 6 Hello na GETMEM test string 0 Ni The contents of the memory is transferred in blocks of size given by variable MEM BLKSIZE which is set in configuration ini file The actual length of the block is indicated in brackets at the end of the variable name 4 2 7 Command GETFILE Query GETFILE www TEST TXTNi Answer GETFILE www TEST TXT 20 This is test string n GETFILE www TEST TXT 0 Ni The contents of the file is transferred in blocks of size given by variable FFILE BLKSIZE which is set in configuration ini file The actual length of the block is indicated in brackets at the end of the file name 4 2 8 Command GETFILEINFO Query GETFILEINFO www TEST TXTNi Answer GETFILEINFO www TEST TXT 35 21 32 59391128503405 5939112850 3405 n TXV 138 63 01 Strana 12 22 Copyright Teco a s 2014 All rights reserved The actual length of the block is indicated in brackets at the end of the file name Structure of the message size attributes time creation time change size size of file in bytes attributes 32 bit number interpreted per bits time creation 64 bit number which can be interpreted by the structure ftida time change 64 b
7. rights reserved Content 1 System description ioi eiit OI Seo siga a te ir eodera eite 4 2 Configuration mi css assis cote eoe eee cone en Fe ete eoe ose cete ev ies e ce sas 5 2 1 Example of the configuration file eee esee eee ee eren e eerte eerta non 5 3 Configuration public file iiio eoa oc epe ety So qo eres ioo o sers cetera 7 del Fixed UPC TMG ect 7 SUD List OF varmabl sa iiie eee caeteros Proben PY ado eee ea riv i sise sosise bisses dere eiua 7 3 2 User public file uia RR oL rr a enne Fere deed a Os 7 4 Cli nt protocol ER 8 4 1 List of conimands eostes teee ta e IRR ee tRER I NISS KR eS EO NOISE VR RES EL UTR US MEER TERM ES 8 4 2 Client protocol examples e eese ee eee eene eee enean eee secos en sete seen a 9 4 21 Command LIST i detto t eR epe e eise balneo US Sentada oae tA bi idiss TE 9 4 2 2 Command SET ssar riviera iron bee ero af nda aa 10 4 2 3 Command GET east essei re vor oda 10 4 24 Command ENG iie stet o eei ee tn Pha HAIR NORTE ERN eV Ing EPI eae pega 12 4 2 5 Command DL eee beoe ete tto Rea RPRTe EQUIS RN Eee EUN ETE CENT ERE sn andas adiga 12 4 2 6 Command GETMIUIBWM sere en so eoo aeo penne poene Y Ree Vua eb soo PU see eE enda ah 12 4 2 7 Command GE PRUE sass cscs eecoseeeeee ons tse op o eh aoo Me Spr Ee eS SEE Cog EN aso sora 12 4 2 8 Command GETFILEINFO 4 eese esee eene en eene natn a sena sets
8. server is listening in our case it is port 50 0 Pressing the button Open will open the connection It is now possible to monitor all public variables that we have in our virtual PLC defined For these purposes it is necessary to use commands defined by application PLCCOmS e g command LIST returns a list of all the variables in the PLC Server activity can be terminated by the escape sequence ctrl c All the important events of server activity are recorded in the log file 6 2 Example with the real PLC We will use the same program as in the previous case Only instead of a simulated run now we use a real machine e g FOXTROT CP 1004 The set up steps in the Mosaic generating export files PUBFILE and in the program itself PUBLIC variables are identical to the first example The only steps the procedures differ is the type of connection in Project manager where the option Simulated PLC is not used but the real PLC on the local ETHERNET network is used defined by its IP address Fig 6 2 1 Connect the PLC by the button Connect compile the program and turn the PLC into RUN mode Project manager PLC Address O Connection type Ethernet Network selection Common settings 5 C t P PLC Address 02d Select type of PLC series IP address 192 168 33 144 Hw Configuration Connection type PLC Network logical conne C COM port ig Domain name Sw e
9. variable of the PLC Enable the variable s from public file Enable the variable s from public file Get memory block from PLC Gets the file from PLC Gets the information about the file stored in PLC Lists information about the communication server Version of the communication server Version of Epsnet library Version of ini parsing library PLC version IP address of PLC Settings of serial line The names of actual public files List of connected clients Change the value of the variable specified in the configuration ini file IP address of PLC Name of serial line Communication speed for serial line Public file TXV 138 63 01 Strana 8 22 Copyright O Teco a s 2014 All rights reserved crlf diff HELP End of line character yes DOS no UNIX Suppress message list DIFF yes no List the help When entering the name of variables you can use wild cards The character in the name re places any number of characters Number of characters is not limited The server response always begins with the name of the command that caused it With exception of SET command where the answer starts with DIFF Thus in case that this response was not disabled Chap 2 4 In case of command where the answers can give multiple results the list of server responses is terminated by the command name itself Example of list of variables whose name starts
10. 2d n tida m day tida m mon tida m year 1900 tida m hour tida m min tida m sec 4 2 9 Command GETINFO Query GETINFO n Answer GETINFO VERSION Ver 3 2 Apr 30 2014 08 15 16 n GETINFO VERSION EPSNET Ver 2 0 Apr 11 2014 10 54 08 n GETINFO VERSION INL Ver 3 2 Dec 18 2012 07 41 30 n GETINFO VERSION PLC CPI005K B 2 7 5 1 n GETINFO IPADDR_PLC 192 168 134 176 n GETINFO PUBFILE 5 5 FIXED_Foxtrot pub www webmaker pub n GETINFO NETWORK 1 10 127 0 0 1 n GETINFO n Query GETINFO version pln Answer GETINFO VERSION PLC CPIO05K B2 75 1W TXV 138 63 01 Strana 14 22 Copyright O Teco a s 2014 All rights reserved 5 Error messages Server sends two types of messages The error ones that begin with ERROR and warning ones that begin with WARNING Messages are subdivided into groups each of ten messages 5 1 List of messages Error code Text of message Group Type 10 Unable to connect to PLC Network communication Error 11 Maximum connections reached Network communication Error 20 Unable to connect to PLC Communication with PLC Error 30 Bad client request Client queries Error 31 Incomplete client request Client queries Error 32 Unknown command name Client queries Error 33 Unknown register name Client queries Error 34 Disabled register name Client queries Error 40 Unable to get information about file File operations Error 41 Unable to get file File operations Error 50 Unknown
11. Communication server PLCComs User manual 11 edition may 2014 TXV 138 63 01 Strana 1 22 Copyright O Teco a s 2014 All rights reserved History of changes March 2010 First version April 2010 2 Processing variables of types date dt time a tod Extending the example of processing of file attributes August 2010 3 Links to shared module were added Extension and modification of the configuration file Color highlighting examples in C language Chapter with examples of application server and licenses was added June 2011 4 Extending the configuration file August 2011 Extended description of chapter 3 2 User public file Table 5 1 List of messages corrected September 6 Chapter 7 Licence corrected and table 8 Supported Operating Systems 2011 extended October 2011 7 Chapters 2 1 Example of the configuration file 4 Client protocol and table 4 1 List of commands edited March 2013 8 Chapter 4 2 2 Command SET edited August 2013 9 Chapter 2 1 Example of the configuration file edited and table 8 Supported Operating Systems extended May 2014 10 Chapter 2 1 Example of the configuration file edited Table 4 1 List of commands and 5 1 List of messages extended Chapter 4 2 6 Command GETMEM added and chapter 4 2 9 Command GETINFO updated May 2014 11 Chapter 2 1 Example of the configuration file edited TXV 138 63 01 Strana 2 22 Copyright O Teco a s 2014 All
12. EN END VAR VAR GLOBAL CONSTANT Pip SERRA S MAIS 2655 5897 9329646 END_VAR PROGRAM prgMain VAR END_VAR VAR_TEMP END_VAR dat GetDate Returns the actual date tim s GetTime l s M Returns actual eine 8e OA The time course for the calculation of sine and Mi Cosine sinus SIN c Returns sine value of argument cosinus COS c Returns cosine value of argument IL Salis gt 01 100 Walain positive TRUE ELSE positive FALSE END_IF text Have a nice day END_PROGRAM TXV 138 63 01 Strana 16 22 Copyright O Teco a s 2014 All rights reserved Server allows you to monitor only those system variables that are defined as PUBLIC So as variables that can be accessed from outside the program Public variables can be defined by direc tive PUBLIC directly or by dialogue window Variable definition where it is necessary to tick the option of the same name Fig 6 1 1 Mosaic 2013 3 0 32 new C TecoApp Test PlcComS mpr Example1 amp File Edit Search view Project Program PLC Debug Tools Help O Halt 110 ms Simulator amp Sud scr fC BA BOSOls ti X gp RB BEER CH 6B x EL Sd RB aaa E 1 praMain ST z Examplet met ra o E iti VAR GLOBAL Global public variables E Bl System Variables dat PUBLIC DATE peces x H O VAR GLOBAL Variable Context Variable type Bl VAR GLOBAL CONSTANT L VAR GLOBAL RETAIN
13. PLCCOmS with address of PLC Through the Putty program we connect the server e g the IP 727 0 0 1 if the server is running on the local station 7 Licence Communication server PLCComsS is the software product the software Teco a s Kolin the manufacturer It is distributed free of charge and its use is possible under the following conditions I Action that is especially forbidden a to analyse the software in any way change it translate it to other programming or na tional languages or into the source code or into assembler include it into other soft ware and to distribute the resulting products derived from the original software and interfere in the internal structure with the exception of the cases referred in this agreement or explicitly permitted by copyright law b any charged distribution of this software II Responsibility of the manufacturer Using the software is based on an as is without warranty of any kind The manufac turer does not assume any responsibility for loss of income profits data or indirect spe cial consequential or incidental damages The manufacturer makes no warranty on the software performance nor to its capability for any specific use application or purpose In particular the manufacturer shall not be liable for any damages caused by improper operation of the software contrary with the terms specified in the user documentation Neither the manufacturer nor its contractors shall not be l
14. cause of possible rounding during transmission The fractional part contains the amount of milliseconds Examples in C language CASE 5p Sew EM ICME unsigned int ms unsigned long long int ldate double date TXV 138 63 01 Strana 10 22 Copyright O Teco a s 2014 All rights reserved sscanf msg Sllu amp ldate date double amp ldate ms unsigned int date unsigned long long int date 1000 i ene 1 lues tm gmtime amp t if tm NULL eita jowesum ace C026 20 Rem en neey uu c NS sp i en n yeeus d ESO ON print Vises SO 0202 Os lU ems Inoue tm Emma Em S ETUR S C TP ms If the variable is of type time or tod the server sends the value as 32 bit unsigned integer as is de fined in the standard Example in C language Sieve eme unsigned long time sscanf msg Slu amp time memset rests OPE SEISZ C OS STEHT UE Em tm tm hour time 3600000 Esme em ein Inoue OO tm tm_min time 60000 time gt em cmamim 60000 CM cm Se time 1000 Ml cm wsclsic ical ici cml eee on in me 202s a0 268 202 1s INOUIE CM Ci Win CSDL Se F TXV 138 63 01 Strana 11 22 Copyright O Teco a s 2014 All rights reserved 4 2 4 Command EN Query EN 4 2 5 Command DI Query DIN Commands EN and DP enable or disable variables in communication table of the server If the variables are disabled server does not ask the
15. e name pub Fixed PUBFILE PUBFILE If we have the configuration file prepared we can run the server from the command prompt gt PLCCOmS exe c config name 1 log name The success of server startup can be watched in the log file or in case of missing parameter in the terminal window With the running server PLCCOmS can someone communicate by the program Telnet For this purpose can be used widespread application Putty through which one can be conveniently con nected to the server Fig 6 1 4 TXV 138 63 01 x Category El Session Basic options for your PuTTY session Logging r Specify the destination you want to connect to Terminal Keyboard Host Name or IP address Port Bell 127 0 0 1 561 0 Features Connection type Window C Raw Telnet C Rlogn C SSH C Serial m r Load save or delete a stored session Behaviour j Translation Saved Sessions Selection Colours Default Settings Load Connection Data Save Proxy Lee Telnet Delete Rlogin SSH Serial Close window on exit C Always Never Only on clean exit About co Fig 6 1 4 Connecting to the PLCCOmS server using Putty Strana 19 22 Copyright O Teco a s 2014 All rights reserved In the program Putty only IP address of the connecting server if the server PLCCOmS runs on the local station the address is 127 0 0 1 and the port number on which the
16. enn 12 4 2 8 1 List OF attributes oce eeetoret tnter toI neon ae He Rar re nen rna eie esa nee an 13 4 2 9 Command GETINEOQO eicit eost stone p etna e Peta bU Pea PAVESE Apa E NEUEN en dR 14 S usui t 15 5 1 List of MESSIES coni soc rem a vues uev ad aaa 15 6 Examples of application eee eeee ee eee eere eene eene eee naaaeto 16 6 1 Example of the simulated PLC in an environment Mosaic 16 6 2 Example with the real PLC etes epenie need nop pene thon axe EN eue PEE H ETE uid sn YHR UG 20 DT TMC CC e A ENE 21 8 Supported Operating System ccssssscscccscsssssssccssssssssccscees 22 TXV 138 63 01 Strana 3 22 Copyright O Teco a s 2014 All rights reserved 1 System description Communication server provides TCP IP connection between client device and PLC Server communication with clients is solved using a simple text oriented protocol REQUEST ANSWER Therefore the client queries the server by commands Chap 4 1 for the values of variables whose names are symbolic and are described in public file Chap 3 Server sends to client only error messages and variables whose values have changed Server communicates with the PLC using the optimized protocol EPSNET or with shared mod ule in case of SoftPLC The values of variables are polled by absolute addressing and periodically in time increments of 100ms Configuration is set in ini file PC PLCComS PC
17. ge in the PLC project i e user program Thus the server monitors this change and if it occurs will load a new file and report this to the client by message WARNING 250 Changed public file Test pub TXV 138 63 01 Strana 7 22 Copyright O Teco a s 2014 All rights reserved 4 Client protocol 66 99 A text based protocol where each statement is terminated by character and each end of line either by r n DOS or An UNIX Type a line terminator is selectable in configuration file or by the command Settings using the command affects only the client that set it out The command names are not case sensitive and therefore perhaps any combination is allowed To test the connec tion or diagnostics Telnet program can be used where it is possible to close the connection using the escape sequence ctrl d 4 1 List of commands Command Description LIST SET variable name value gt n GET variable name gt n EN lt variable name gt n DI lt variable_name gt n GETMEM lt variable name mem size gt GETFILE file name GETFILEINFO file name gt m GETINFO nameNi Name version epsnet version version ini version plc ipaddr plc serial device pubfile network SETCONF variable name value gt n variable name ipaddr serial device serial speed pubfile List all variables from public files Sets a variable in the PLC to the specified value Gets the value of a
18. iable in any case for loss of profit or any other commercial loss including and without limitation the special inci dental punitive and other damages even if the manufacturer or its contractors are pre warned of the possibility of such damage Any risk arising from the quality and perfor mance of the Software is transferred to the user s software If the software proves to be defective the user software and not the manufacturer shall assume all costs associated with any repairs and maintenance III Duration of the agreement This agreement shall remain in force unless the user software does not violate the terms of this agreement If the user software violates the terms of the agreement the agreement automatically loses the force TXV 138 63 01 Strana 21 22 Copyright O Teco a s 2014 All rights reserved IV Final provisions This agreement in connection with the use of software is complete and entire agreement between the user and the software manufacturer This arrangement is a replacement for all previous current spoken and written communication between the user and the soft ware manufacturer and is crucial in resolving disputes or additionally agreed terms of fers orders the parties involved in this agreement for its validity Any modifications to this Agreement shall be permitted only in the case of writing a new contract or adden dum which will be signed by both parties represented 8 Supported Operating Systems
19. it number which can be interpreted by the structure ttida 4 2 8 1 List of attributes 0x00000001 Only for reading 0x00000002 Hidden file 0x00000004 The system file 0x00000010 The file is a directory 0x00000020 The archive file structure ttida Size 8 bytes year month day hour minute second nothing nothing Example in C language define FILE ATTRIBUTE READONLY 0x00000001 define FILE ATTRIBUTE HIDDEN 0x00000002 define FILE ATTRIBUTE SYSTEM 0x00000004 define FILE ATTRIBUTE DIRECTORY 0x00000010 define FILE ATTRIBUTE ARCHIVE 0x00000020 struct Etiida char year char mon ham eddy mee delude ehar sec Chat enonels char NoNe eaeleb gl eita iong size aici Sscanf msg sld ld llu llu amp size sattr unsigned long long int amp tida c unsigned long long int amp tida m TXV 138 63 01 Strana 13 22 Copyright O Teco a s 2014 All rights reserved cnc ele size ld bytes Nnt SZE attr amp FILE ATTRIBUTE READONLY attr amp FILE ATTRIBUTE HIDDEN printet WAceri butes h ecseseseseAnU fi Jr 1 1 attr amp FILE ATTRIBUTE SYSTEM BAN 1 1 1 1 abbr Ch ih ATIRTBUTE DIRECTORY attr amp FILE ATTRIBUTE ARCHIVE printf Create time 02d 02d 04d 02d 02d 02d n tida c day iEalelet e ouo cic layers a 0 idane Nour abes _Comim wick 65 9e 5 printf Modify time 02d 02d 04d 02d 02d 0
20. name Command SETCONF Error 60 Unknown name Command GETINFO Error 70 Unable to connect to SHARED module Shared module Error 80 Unable to get data from address Command GETMEM Error 250 Changed public file Command SETCONF Warning 1024 Unknown error Not specified Error Examples of error messages Query GET test n Answer ERROR 33 Unknown register name test n Query SETCONF pubfile Test pub n Answer WARNING 250 Changed public file Test pub n TXV 138 63 01 Strana 15 22 Copyright O Teco a s 2014 All rights reserved 6 Examples of application Application of the communication server PLCCOmS can be demonstrated on a few simple exam ple programs 6 1 Example of the simulated PLC in an environment Mosaic Consider a simple program written in the language of structured text ST which will read infor mation about the system time and date for example and will calculate the value of a continuous function sine and cosine depending on run time In addition we have a variable positive signaling the positive half waves of the function sinus and one variable of type STRING containing the text string As testing PLC we choose FOXTROT CP 1016 Example in ST language VAR GLOBAL Global public variables dat UNS nc e JOYAS tim UPWIEML IG S MES sinus PUBLIC GRE AM cosinus PUBLIC LREAL c PUBLIC LREAL positive PUBLIC BOOL text EE e S
21. ne SERIAL_RTS Number of GPIO pin for flow control If not set hardware flow control will be used SHM_NAME Name of the shared module library dll or so SHM_SOCKET Socket number for communicating with a shared module SHM_PORT Port number for communicating with a shared module PUBFILE_CRC Turn On Off the CRC check of public file Yes No PUBFILE Name of public file PUBFILE_FIXED Name of fixed public file Foxtrot IPADDR 192 168 134 176 SERVER_PORT 5010 PUBFILE CRC Yes PUBFILE FIXED FIXED Foxtrot pub PUBFILE www webmaker pub TXV 138 63 01 Strana 5 22 Copyright O Teco a s 2014 All rights reserved TC700 IPADDR SERVER PORT PUBFILE CRC PUBFILE FIXED PUBFILE TC700 RS232 mv o 0 n QU UU 0000 ERIAL DEVICE ERIAL SPEED ERVER PORT UBFILE CRC UBFILE FIXED UBF ILE SoftPLC ERVER PORT HM NAME HM SOCKET HM PORT UBFILE CRC UBFILE FIXED UBF ILE TXV 138 63 01 192 168 134 177 5011 Yes FIXED TC700 pub www webmaker PUB dev ttyso 115200 5012 Yes FIXED_TC700 pub www webmaker PUB 5013 ShmSrv dll 0 5 Yes FIXED SoftPLC pub www webmaker pub Strana 6 22 Copyright O Teco a s 2014 All rights reserved 3 Configuration public file Describes the correlation between the variable name and physical addre
22. nnection of the simulated PLC Run server with parameters c and It will therefore be necessary to specify the name of the configuration ini and log log file In the case of existence of log file the messages of the server are attached to the end of file The configuration file must be defined For our example when observed PLC is simulated by Mosaic on the local station localhost 127 0 0 1 the contents of the configuration file looks like this TXV 138 63 01 Strana 18 22 Copyright O Teco a s 2014 All rights reserved The contents of the configuration file NET_CO FFILI E NNECT MAX BLKSIZ LT FFIL E TIMEOUT FFI E MAXRECS END LI NE CRLF UNIX PF VAR FOXTR IPADDR n DISABLED OT SERVER_PORT s PUBFI E CRC PUBFI E FIXED PUBFIL ID E No Configuration file for communication server 10 Maximal amount of clients Max 32 1024 Maximal size of block for files Max 65536 300 Time in seconds for the keeping file in memory Max 3600 256 number of files stored in the memory Max 1024 Yes End of line character Yes DOS r n No Yes Default status for variables Alias of used PLC 127 0 0 1 IP address PLC 5010 Port of server not to verify the checksum for PUBFILE lt fixedpubfile name pub pubfil
23. ss register in the PLC Two types of file are used fixed and user Files can be stored either in the directory from which the server is running or in PLC When you open a file the file that is stored locally has the priority If not found it tries to open a file in the PLC If the file name starts with the root directory is men tioned In case of local storage of the file the root directory is that one from which the server is run ning By specifying a relative path it is possible to access local files stored outside this root direc tory 3 1 Fixed public file Is the file needed for the actual operation of the server It contains a variables with which it is possible to work in the same way as with variables from the user public file With the exception of command DI which ignores that variables 3 1 1 List of variables Name Data type Meaning PLC RUN BOOL Status of PLC 1 RUN 0 HALT PF CRC DWORD CRC value of user public file when it is changed the server automatically retrieves if by new public file 3 2 User public file Is the file generated by the Mosaic user program development package The variables in this file are connected by the server to variables from fixed file In case of a collision of names the variables in this file are ignored The file is provided with a CRC value that is equal to the value of the variable PF CRC Changing the value of this variable represents the chan
24. th in the project directory it is neces sary to copy the public file in the same directory from where the server is started The finished testing program has to be stored In Project manager it is necessary to choose Type of connection if the PLC is connected it has to be disconnected by the Disconnect but ton Simulated PLC with the checked option Mosaic PLC and to connect PLC by button Con nect Fig 6 1 3 We compile the program and run it in simulation mode TXV 138 63 01 Strana 17 22 Copyright O Teco a s 2014 All rights reserved Project manager 4 Connection type Not connected tl Common settings Hw Select type of PLC series Hw Configuration Da E 3 informations PLC Network logical conne port files PLC access passwords Fl Environment Send MIL file pu Preferences lv Text editor options lv Text editor colors Code completion HW files configuration F Documentation nfo about Hw used nfo about HW setup nfo about network Controllers information shorted file name Common settings Hw Select type of PLC series HW Configuration PLC Network logical conne PLC access passwords F Environment i Preferences Test editor options Text editor colors Code completion HW files configuration Documentation Info about HW used Info about HW setup Info about network Controllers information Fig 6 1 3 Co
25. with test string Query GET test wn Answer GET test_1 123 n GET test_2 1 234500 n GET n Example query to specific variable Query GET test_I n Answer GET test_1 123 n 4 2 Client protocol examples 4 2 1 Command LIST Query LIST Answer LIST test In LIST test_2 n LIST test_string n LIST test_btn n LIST n The character at the end of the variable name means the prohibited variable Handling with such variable by commands e g GET or SET results the error Chap 5 TXV 138 63 01 Strana 9 22 Copyright Teco a s 2014 All rights reserved 4 2 2 Command SET Query SET test_1 123 n Answer DIFF test_1 123 n Query SET test_string Hello Nn Answer DIFF test_string Hello n Answer beginning with string DIFF is server response for the change of some variable in PLC In combination with the command SET it can be used to check if the variable was really changed Values of variables of type string are placed in quotation marks Values of variables of type bool is possible to set by the expression true 1 or false 0 The answer is always value 1 or 0 4 2 3 Command GET Query GET test In Answer GET test_1 123 n Query GET test_string n Answer GET test_string Hello n In case of query for value of type date or dt the value is sent as 64 bit unsigned integer even if the standard define the variable as type real It is be
Download Pdf Manuals
Related Search
Related Contents
Manual de Instalação Sissy Bar - Drag Star 650 User`s Manual Craftsman 247.88851 Snow Blower User Manual Einbauanleitung Schlüter®-BEKOTEC MANUAL DE PROJECÇÃO AQUECER E ARREFECER TVOC User Manual Supplement System Plus User Détartrant sanitaire puissant. Elimine le tartre, le TH-VC 1318 42010941-001 R2 - Product Catalogue - Europe Copyright © All rights reserved.
Failed to retrieve file