Home
T100MD+ PLC User`s Manual - MD
Contents
1. EE Ee oe 16 bit Index to array 0001 to OFAO 400010 16 bit Integer Data 4 11 TIOOMD amp MX PLC Chapter 4 Command Response Format Response Format wljyfjoj jo E g To write the value 1234o 4D2 to DM 1000 send hostink command WVD03E804D2 1000 3E8 4 29 Write Variable System Variables System Variable inputi 01 System type Variable cik 08 oaen 0 o TA ae o timer 06 Pwm OD _ Nota system variable in TBASIC Command Format ed OT type Index 16 bit Integer Data type 01 to OD denote the type of system variable to access index 01 to 1F index into the array starting from 01 Response Format Example To set clk1 which represents the hour of the RIC to 14 send the command wvs0801000E to the PLC 4 30 Write Variable High Speed Counter HSCPV Command Format w Iy af eee he pepe pepe ST yon 1or2 8 Hexadecimal Digit for 32 bit integer Response Format Eg To clear the value of HSCPV 2 send hostink command WVH200000000 4 12 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 31 Update Real Time Clock Module Command Format Response Format If the battery backed MX RIC module is installed this command forces he PLC to wite the values of the TME and DATE variables into the RIC module This command will be ignored by a PLC without the RIC module 4 32 Halting the
2. 1 5 Using High Speed Counter Inputs with A Rotary Encoder Technical Specifications No of Channels Maximum acceptable pulse rate 10KHz for T100MD 4KHz for T100MX Quadrature signal decoding Relevant TBASIC Commands HSCDEF HSCOFF HSCPV Desc riptions Inout 3 4 and Inputs 5 6 form two channels of high speed counter inputs which can interface directly to a rotary encoder that produces quadrature outputs A quadrature encoder produces two pulse tains at 90 phase shift from each other as follows Direction of Rotation 900 H Phase A Phase B 900 Direction of Rotation When the encoder shaft rotates in one direction phase A leads phase B by 90 degrees When the shaft rotates in the opposite direction phase B will lead phase A by 90 degrees The quadrature signals therefore provide an indication of the direction of rotation TLOOMD handles the quadrature signals as follows if the pulse train aniving at input 3 leads the pulse tain at input 4 the High Speed Counter HSC 1 increments on every pulse If the pulse train amiving at input 3 lags the 1 7 T100MD PLCs Chapter Installation pulse trains at input 4 then the HSC 1 decrements Note that if input 4 is OFF then pulse trains aniving at input 3 is considered to lead the input 4 and HSC 1 will be incremented Likewise if input 3 is OFF then pulse trains aniving at input 4 will decrement HSC 1 Inout 5 and 6 fom the inputs for Hig
3. Note that when using READMODBUS or WRITEMODBUS command the 40001 address stated in Table 5 1 should be interpreted as address 0000 and 40002 as address 0001 41001 as address 1000 etc This is in accordance with the specifications stated in MODBUS protocols MODICON defined zero offset address for the MODBUS command yet in their O definition the I O channels are supposed to start from address 40001 Hence the unusual conespondence But to maintain compatibility with the MODBUS specifications we have to adhere to their definitions M PLC As MODBUS RTU Master The new Rev D TLOOM PLC can also act as a MODBUS RIU master The same READMODBUS and WRITEMOBUS commands can be used to send and receive MODBUS RIU commands What you need to do is to add 10 decimal to the COMM port number to signal to the processor that you wish to use MODBUS RIU instead of ASCII to talk to the slaves l e you should specify port 11 to use RIU commands on COMM1 and specify port 13 to use RIU commands on COMM3 E g the statement DM 10 READMODBUS 13 8 16 will access via COMM3 the slave with ID 08 and read the content of register 16 This register conesponds to MODICON address 40017 and is the OUIPUT 1 of the Slave PLC The ability to soeak MODBUS RIU greatly extend the type of peripherals which can be used with a TLOOM PLC You can now make use of many off the shelf thid party RIU devices to extend the PLC Capability making the M seres truly s
4. Once the protocol is recognized the CPU sets that COMM port to a specific COMM mode which enables it to process and respond only to commands that confom to that protocol Eror detection data such as the FCS LRC or CRC are computed accordingly which are used to verify the integrity of the received commands If enors are detected in the command the CPU responds in accordance with the action specified in the respective protocols When the COMM port enters a specific COMM mode it will regard commands of other protocol as emors and will not accept them Hence for example if COMM 1 has received a valid MODBUS RTU command which puts it in a RIU mode it will no longer respond to TRILOGI s attempts to communicate with it using the NATIVE mode You will receive a communication enor if you ty to use TRLOGI to access a PLC COMM port that has jut been communicating in other protocol modes 4 To improve the flexbility of switching fom one COMM mode to another The TLOOMD incorporates a COMM mode self reset timer such that a specific COMM mode will itme out automatically and enters into AUIO mode after 10 seconds if no more commands are received from that COMM port When a user wants to switch from one COMM mode to another he she often will be changing the serial connector fom one device to another During this time there is no data received by the COMM port which presents an opportunity for it to reset its COMM mode Howev
5. TLOOMD PLC provides a very staight forward means to measure the pulse width or frequency of a square wave pulse tain aniving at its Pulse Measurement PM inputs 3 or 4 To use the input to measure pulse width or frequency execute the PMON statement to configure the relevant input to become a pulse measurement input Thereafter the pulse width in us or the pulse frequency in Hz can be easily obtained from the PULSEWDTH n or PULSEFREQUENC Y n function 24V ganas TE En Bue eae E Ea ea pie eve 6 SE NPN type Optical Sensor Input 3 T100MD PLC Figure 1 6 Setting Up a Smple Tachometer or Encoder Applications 1 One useful application of the PM capability is to measure the speed of rotation of a motor A simple optical sensor coupled with a rotating disk with slots fitted to the shaft of a motor see Figure 1 6 can be fabricated economically When the motor tums the sensor will generate a series of pulses The frequency of this pulse tain relates directly to the rotational speed of the motor and can be used to provide precise speed contol Note that the above setup can also double as a low cost position feedback encoder when used with the high speed counter since the number of pulses counted can be used to determine the displacement 2 Some transducers incorporate Voltage Contolled Oscillator VCO type of outputs which represent the measured quantities in terms of varying frequency of the output waveform
6. 4 14 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 35 Inter Networking Using NETCMD Command All M series PLCs are able to send out host link commands to other M seriles or Hseries PLCs using the builtin TBASIC function NETCMD This function accepts host link commands in mult point format and automatically computes the Frame Check Sequence FCS characters append them to the command sting and send out the whole command sting together with the terminators The function then waits for a response sting and checks the integrity of the received response sting for enor This function retums a sting only if a proper response sting has been received Please refer to the TBASC Reference manual for detailed explanation of this command The NETCMDS function therefore greatly simplifies the programming tasks for handling networking between PLCs The programmer only needs to constuct the corect command sting according to the formats described in this chapter pass the formatted sting to the NETCMDS function and then check for the response string An M series PLC may use the NETCMD to map the O of another PLC into its intemal relays and use the other PLC as its remote O There are two programming examples in your TRILOGI TL4 directory which illustate the use of NETCMD to map I O of slave PLC to the master Please study the two examples REMOTE H PC4 and REMOTE M PC4 carefully to understand the mechanism
7. an opto isolator to isolate the PLC from the high curent load as illustrated in Figure 1 4 Flyback Diode Bridge Rectifier 4V 4N35 12 24V DC Optoisolator Power Supply AC Source for PLC 220K Da OUTPUTS JS Aa E eam a e E N channel Power MOSFET Voltage divider to obtain approx e g IRF530 can sink 12A DC 10V DC at gate G For DC48V at up to DC100V max load choose R1 3 9K R2 1K Figure 1 4 PWM Speed Contol of a large DC Motor 1 6 T100MD PLCs Chapter 1 Installation a The opto isolator must be able to operate ata frequency matching that of the PWM frequency otherwise the resulting output waveform will be distorted and effective speed contol cannot be attained b The simple PWM speed contol scheme described above is open loop type and does not regulate the speed with respect to changing load torque Closed loop speed control is attainable if a tachometer either digital or analog is used which feeds back to the CPU the actual speed Based on the enor between the set point speed and the actual speed the software can then adjust the PWM duty cycle accordingly to offset soeed variation caused by the varying load torque A PID function may also be invoked to provide sophisticated PID type of speed contol c The TLOOMD s PWM can be used to contol the speed of small to medium size motors For very large motors above 0 5KW industral stength variable speed drivers should be used instead
8. of the MODBUS command and response TIOOMD amp MX PLC Chapter 5 Modbus Omron Protocols Support Table 5 1 Memory Mapping of TLOOM to other PLCs MODBUS Word input n SSS 0001 1 to 40001 16 to16 0002 1 to 40002 16 7 to 32 0003 1 to 40003 16 0005 1 to 40005 16 0006 1 to 40006 16 Output n 0017 1 to 40017 16 Timer n 512 n 1to 16 IR32 0 to IR32 15 40033 1 to 40033 16 513 to 528 oT A a Ce I T T Tow i MODBUS Bit Addr Mapping WIWININININ O A ENS amp 1 to 16 IR48 0 to IR48 15 40049 1 to 40049 16 769 to 784 17 to 32 IR49 0 to IR49 15 40050 1 to 40050 16 785 to 800 33 to 48 IR50 0 to IR50 15 40051 1 to 40051 16 801 to 816 49 to 64 IR51 0 to IR51 15 40052 1 to 40052 16 817 to 832 Reay n foan 40066 1 to 40066 16 0067 1 to 40067 16 49 to 64 IR67 0 to IR67 1 40068 1 to 40068 16 1073 to 1088 65 to 80 IR68 0 to IR68 1 40069 1 to 40069 16 1089 to 1104 81 to 96 IR69 0 to IR69 1 40070 1 to 40070 16 1105 to 1120 97 to 112 IR70 0 to IR70 1 40071 1 to 40071 16 1121 to 1136 113 to 128 1R71 0 to IR71 1 40072 1 to 40072 16 1137 to 1152 129 to 144 1IR72 0 to IR72 1 40073 1 to 40073 16 1153 to 1168 145 to 160 1R73 0 to IR73 1 40074 1 to 40074 16 1169 to 1184 161 to 176 1IR74 0 to IR74 1 40075 1 to 40075 16 1185 to 1200 177 to 192 IR75 0 to IR75 1 40076 1 to 40076 16 1201 to 1216 193 to 208 IR76 0 to IR76 1 0077 1 to 40077 16 1217 to 1232 209 to 224 1R77 0 to IR77 1 0078 1 to 40
9. 3 OMRON Host Link Command Support 5 4 5 4 Appliaton Bample Interfacing to SCADA Software 5 4 5 5 Using The TLOOM PLC as MODBUS Master 5 5 Chapter 1 Special I Os and Analog Interfacing 1 1 Introduction A Sandard TLOOMD PLC features the following 1 4to 8channels of 10 bit Analog Inputs 4 on TLOOMD1616 2 1to 2 channels of 8 bit Analog outputs 3 2 channel programmable Motion Contollers for contolling stepper motors up to 20 000 pulses persecond 2 channel Pulse Width Modulated PWM outputs 4 2 channel 32 bit High Soeed Counters HSC counts up to 10 000 Hz Ul 4 channel Intenupt Inputs 2 channel pulse measurement inputs capable of measuring frequency and pulse width of incoming pulses up to 10 000 Hz 8 Real time Clock Calendar for programming multiple scheduled ON OFF events 9 6016 Words 16 bit of EEPROM Program Memory 10 1700 Words 16 bit of programmable EEPROM for user s data 11 Built in 16 channels of PID computation engines let TLOOMD PLCs directly provide Proportional Integral and Derivative PID type digital control for process automation N 12 One Independent RS232 port for connection to a host PC for programming or monitoring 13 One independent RS485 port for networking or for connecting to extemal peripherals such as LCD display and RS485 based analog I O cards etc 14 Industry Standard Protocols Both RS232 and R485 serial port simultaneously support multiple
10. Fommat 1 15 Use of SETBAUD Statement 1 9 4 Support of Multple Communication Protocols 1 16 1 9 5 Accessing the COMM Ports from within TBASIC 1 18 1 9 6 Using Modem to Remotely Program Monitor PLC 1 19 1 9 7 Constructing a 2 Multi drop Network 1 21 1 10 DIP Switches 1 21 1 11 CPU Status Indicators 1 22 1 12 Intemal Relays Timers amp Counters etc 1 23 Chapter 2 Operating Procedure 2 1 Programming 2 1 2 2 mulation 2 1 2 3 Transfering Program to PLC 2 1 2 4 Enorsand Problems 2 2 2 5 On Line Monitoring amp Control 2 3 2 5 1 Monitoring PLC s I O Logic States 2 3 2 5 2 Viewing and Modifying PLC s Intemal Varia bles 2 3 2 5 3 Force Setting Resetting I O Bits 2 3 2 5 4 Suspending PLC s Ladder Program 2 4 2 6 Ladder Monitoring 2 4 2 7 Uploading Ladder Program from PLC 2 5 2 8 Changing Timers and Countess Set Values 2 6 2 9 Setting PLC s Real Timer Clock 2 6 2 10 Trouble Shooting Communication Eror 2 7 Table of Contents Chapter 3 Host Communication 3 1 Pointto point Communication 3 2 3 2 Mult Point Communication System 3 3 3 2 1 RS485 Network Interface Hardware 3 3 3 2 2 Protection of R485 Interface 3 4 3 2 3 Single Master R485 Networking Fundamentals 3 6 3 2 4 Mult Masters R485 Networking Fundamentals 3 7 3 2 5 Command Response Block Format Multipoint 3 9 3 2 6 Communication Procedure 3 10 3 3 Using Network TRILOGI 3 11 3 4 Trouble Shooting R485 Network 3 12 Chapter 4 Command Response Format 4 1 Device ID Re
11. PLC Command Format Response Format When the PLC receives this command it temporarily halts the execution of the PLC s ladder program after the curent scan However the PLC continues to scan the I Os and processes host link commands sent to it and will report the curent I O data and intemal variables to the host computer 4 33 Resume PLC Operation Command Format Response Format When the PLC receives this command it wil resume execution of the ladder program if it has been halted previously by the C2 command Otherwise this command has no effect 4 13 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 34 Host Communication Program Examples You can ty out all the hostink commands described in this chapter using TRILOGI 4 1x built in Host Link Command feature under the Controller menu For Intemet TRILOGI Version 5 x this function is not supported on TRILOGI Client but is supported on the TLServer under the serial communication setup Try entering a point to point or a mult point command sting and observe the response sting If you have changed some data using the wite command then activate On Line Monitoring and examine the changes made using the View Variables window Two sample programs one written in Microsoft QBASC HOSI485 bas and the other witten in Borland Intemational s Turbo C HOSI485 C are provided in the TRILOGI distibution diskette to help programmers get started Both progra
12. Response Format Example To read the value of DATE 2 which represents the month of the RIC send command Rvso902 and if the PLC responds with Rvs0005 it means the month is May 4 16 Read Variable High Speed Counter HSCPV Command Format Pe SEW ore ewe a y Channel 1 or 2 Response Format R v la ee ee e ee e TS 8 Hexadecimal Digit for 32 bit integer Eg To read the value of HSCPV 2 send hostink command RVH2 If variable HSCPV 2 contains the value 123456 1E240 PLC will send the response string as RVHO001E240 4 17 Write Inputs Command Format we Ti ste Channel Data 00 to OF Response Format KASEJA 4 18 Write Outputs Command Format w o n n eea U O Nemmamngeieemiss Channel Data 00 to OF Response Format Em Em ee rea 4 8 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 19 Write Relays Command Format w e a ele oe sd Channel Data Response Format Ran Ea ree 4 20 Write Timer contacts Command Format y Channel Data 00 to 07 Response Format 4 21 Write Counter contacts Command Format oe ee Channel Data 00 to 07 Response Format 4 22 Write Timer Present Value P V Command Format a Timer1 00 New timer PV Timer64 3F Hex 4 9 TIOOMD amp MX PLC Chapter 4 Command Response Format Response Format Please note that the timer n
13. The cause of the first eror will be reported on screen although you should never encounter this problem if you had simulated the program successfully in TRILOGI This is because TRLOGI s ease of programming reduces the possibility of emors to a minimum and any enor would have been detected and rectified before any simulation can take place PLC Program length is measured in 16 bit words Up to 6016 words may be programmezd into a TLOOMD PLC If yourladderlogic program exceeds 6016 words after compilation the compiler will record this as an enor and the downloading process will be aborted If this happens you need to simplify your program to optimize the use of program memory On Line Monitoring amp Control TRLOGI allows direct control of the PLC operation from within the program You can enter this mode by selecting the On Line Mon Control command from the Contoller main menu or by pressing the Cti M hotkey An On Line Monitoring amp Control screen will appear The following are what may be done in this mode 2 5 1 Monitoring PLC s I O Logic States TRILOGI continuously monitors the I O logic states and present values of the timers and counters of the contoller and displays them on screen You may scroll up and down any I O window using the cursor keys and the lt PgUp gt and lt PgDn gt keys to examine I Os that are outside the present page A highlight bar wil appear when an I O window is selected its border i
14. a new program to the PLC and overwtte the bad program However you may stil encounter a situation whereby after transfering a new prmgrm to the PLC you keep encountering communication enor and could not erase the bad program This is especially common if you are playing with the communication commands such aS SETBAUD SETPROTOCOL PRINT Or OUTCOMM which may modify the communication baud rate communication format or protocol or sending data out of a COMM port that conflicts with TRILOGI In such cases you can tum ON DIP Switch SW1 4 and perform a poweron reset for the PLC The PLC will not execute the bad program that causes communication problem and you can then transfer a new program into the PLC to clear up the problem Note that when the PLC is powerreset with DIP Switch 4 set to ON it s default baud rate and communication format for COMM1 becomes 9600 8 n 1 COMMS is not affected TRILOGI Version 4 1xis able to automatically recognize this baud rate Server on the other hand will not change its baud rate setting automatically to match the PLC You will need to manually change the TLServer s serial port settings to 9600 n 8 1 in order to Communicate with the PLC aftera powerreset with DIP Switch 4 set to ON Remember to switch back to 38 400 after you have cleared the offending PLC program otherwise if the PLC is again powerreset with DIP Switch 4 tumed OFF you will face problem communicating with it again because this time it would
15. assume a baud rate of 38 400 1 11 CPU Status Indicators There are three LED indicators on TLOOMD with the following markings 0 RTC Pause Run Error Error T100MD PLCs Chapter 1 Installation All three indicators will be lighted up during power on when the CPU loads the PLC program from EEPROM Thereafter they should go off and if any one of them remains lighted it represents the various operating status of the PLC as follow a b c RTC Error Green LED This indicator will be tumed ON aftera power ON or WDT reset unless an optional battery backed MX RIC module has been installed This indicates that the real time clock RIC has been reset to some factory s pre set date and time The RIC Er flag in the Special Bit menu will also be tumed ON Tis indicator will be tumed OFF automatically after you have set the PLC s date and time using the Set PLC Clock Calendar command in the Contoller pull down menu Pause Red LED This indicator will be tumed ON if one of the following occured i PLC s EEPROM is conupted ii A PAUSE statement has been executed iii The user halts the PLC by pressing the lt P gt key during On Line Monitoring iv DIP Switch SW1 4 is tumed ON which halts the program If this light is ON please connect the host computer running TRILOGI Version 4 to the PLC and tun the On Line Monitoring program You will be informed of the reason that caused the PAUSE
16. communication protocols as follow i Native ASCII based Host Link Commands ii MODBUS RTU protocols iii MODBUS ASCII Protocols iv OMRON C20H Host Link Commands v EMIT3 0 protocol by emWare Inc 14 Watch Dog Timer WDT which resets the PLC if the CPU malfunctions due to hardware or software enor A system reset by WDT can be determined by the SIATUS 1 command 1 2 Special Digital I Os Four of the first 8 ON OFF inputs of the TLOOMD PLC can be configured as special inputs such as High Speed Counters Intemupts and Pulse Measurement Some of the first 8 outputs can also be configured as PWM and the stepper controller pulse outputs If these special I Os are not used then they can be used as ordinary ON OFF type I O in the ladder diagram Note that if two special functions share the same O then only one of them 1 1 T100MD PLCs Chapter 1 Installation can be active at any one time The location of these special I O are tabulated as follows Special Inputs High Speed Counter a Se ee ae ee ee ee ee ee ee Ch 1 Phase A Ch 1 Phase B Ch 2 Phase A CRS oo e 6 Ch 2 PhaseB Ch 4 7 i ee ieee eee cee Note A pin defined asa special input cannot simultaneously act as another special input E g Pin 3 cannot be used as high speed counterand at the same time serves as a pulse measuring pin Special Outputs Output Stepper pulse output PWM output 1 Direction for Ch 1 Direction for
17. condition Except for condition i and iv you can release the PLC from the PAUSE state by pressing the lt P gt key during On Line Monitoring If the PLC s EEPROM is conupted then you must re transfer your program to the PLC again Run Error Red LED When this indicator tums ON it shows that a run time enor had occurred during execution of a TRASIC command the system will halt at the CusFn where the enor took place If the programmer now executes the On Line Monitoring command in TRILOGI the cause of the run time enor and the CusFn where the enoroccured will be reported on TRILOGI screen TBASC simulator captures many possible run time enors including out of range values but in TLOOMD PLC only a few most important run time enors are reported The remaining are ignored The following are the few run time enoss that will be reported in TLOOMD I Divide By Zero ii FOR NEXTloop with STEP 0 iii Call tack Overflow Circular CALL suspected iv Illegal Opcode Please inform manufacturer T100MD PLCs Chapter Installation v System Variable Index out of range This is nomally caused by using an unavailable subscript E g DM 0O INPUT 1 DM 5000 etc Check the subscript value especially if it contains a variable e g DM X if X 0 this will lead to a runtime enon All run time enorss should be identified and corected before proceeding any further 1 12 Internal Relays Timers amp Counters etc TLOO
18. of mapping I Os between the PLC The TRILOGI program REMOTE H PC4 will work on both H and M series PLCs as Slaves whereas the program REMOTE M PC4 will only work with M series slave PLC This is because the M series host link command set is a superset of H series host link command set and this example uses the more efficient M series host link commands to read write 16 bit data for networking between M series PLC 4 36 Inter Networking Using MODBUS Protocols The TLOOM PLCs may also pass data to each other using special MODBUS commands which are even simpler to use than NEICMD but are resticted to accessing variables that are mapped into MODBUS address structure Please refer to the next chapter as well as the TBASC Reference manual for details on using the READMODUS and WRITEMODBUS commands 4 15 Chapter 5 MODBUS OMRON Protocols Support The TLOOM PLC supports a subset of the OMRON and MODBUS Both ASCII and RIU modes are now supported compatible communication protocols so that it can be easly linked to third party contol software hardware products such as SCADA software touch panels etc The PLC automatically recognizes the type of command fomat and will respond with the corect response These are accomplished without any user intervention and without any need to configure the PLC atall Both MODBUS and Omron protocols use the same device ID address 00 to FF as the native protocol described in Chapter 3 Since
19. one byte of ASCII character Cti E 05Hex via its serial port to the controller This informs the contoller that the host computer wishes to send a point to point hostlink command to it Thereafter the host computer must wait to receive an echo of the Cti E character fom the contoller Reception of the echoed Ctr E character indicates that the contoller is ready to respond to the command from the host computer At this moment the host computer must immediately send the command block to the contoller and then wait to receive the response block from the controller The entre communication session is depicted in Figure 2 1 After the contoller has received the command it will send a response block back to the host computer and this completes the communication session If the contolleraccepts the command the response block will start with the same header as the command followed by whatever information that has been requested by the command and the terminator 3 2 TIOOMD amp MX PLC Chapter 3 Host Communication Host Computer The M series PLC Send C tri E 05H and wait Osy for echo A Ready to process command return CttE 05H Send Command string to contolle Wait for response iy gg Execute command Return Response go string to host eet AcceptResponse C heck for errors Figure 3 1 If an unknown command is received or if the command is illegal such a
20. provide a common ground is a potential source of serious trouble as signal wires with a floating ground easily induce large voltage differences between nodes when subjected to electomagnetc interference Hence for reliable operation it is important to provide the common ground A Chapter 3 Host Communication 3 5 TIOOMD amp MX PLC Chapter 3 Host Communication grounded shield also has the additional advantage of Shielding the electrical signals from EMI 3 2 3 Single Master RS485 Networking Fundamentals R485 is a half duplex network i e the same two wis are used for both transmission of the command and reception of the response Of course at any one time only one transmitter may be active The TLOOM contolles implement master slave network protocols The network requires a master contoller which is typically a microcomputer equipped with an R485 interface In the case of an IBMPC or AT you can purchase an RS485 adapter card or an RS232C to R485 converter and connect it to the RS232C serial port A TLOOM PLC can also be programmed to act as the master it can communicate with other PLCs by executing the NETICMD function or the READMODBUS or the WRITEMODBUS commands the latter two are for communicating using MODBUS protocols only Only the master can issue commands to the slave controllers To tansmit a command the master contoller must first enable its RS 485 transmitter and then send a multi point c
21. the keyboard or open the Contoller pul down menu and select item Program Transfer TRILOGI will query the target contoller to obtain its maxmum 2 1 T100MD PLC Chapter 2 Operating Procedure number of inputs outputs etc TRILOGI will recompile the ladder program to ensure that these limits are not violated When compilation is successful the compiled code will be transferred to the TLOOMD PLC in within seconds After the program has been successfully transfered you will be prompted to indicate if you wish to clear all outputs relays timers counters and all the intemal system variables to OFF A program that is successfully transferred will be executed at once If you do not want the program to execute immediately you may tum ON DIP switch SW1 4 before transfering the program and then tum it OFF when you want the program to run If enors occur during program downloading and communication is aborted the CPU will not execute the partially tansmitted program to forestall undesirable consequences If everything goes well you may retum to the editor by pressing any key Password Security The users may define a Transfer protection password of between 1 to 6 characters by selecting the Set Password item from the Target Access menu Once a password has been defined you will be prompted to enterthe password whenever you want to transfera program to the PLC Program transfer will be aborted if incorect password is ente
22. to third party SCADA software or MMI hardware that speaks MODBUS It also allows Hseries PLCs to be contolled or monitored on the Intemet via a TLOOMD The master TLOOMD will use its R485 port to pull data from the Hser es PLC into its data memory The data memory in the TLOOMD PLCs ar in tum accessible by a SCADA program using the MODBUS protocol and are also accessible from the Intemet using the TRILOGI client server software suite 1 9 3 Changing Baud Rate and Communication Formats Use of the SETBAUD Statement The TLOOMD PLC s COMM ports are highly configurable Both COMM ports can be set to a wide range of baud rates You can also program them to communicate in either 7 or 8 data bits 1 or 2 stop bits odd even or no parity The baud rate and communication formats of the serial ports are set by the following command SETBAUD ch baud_no ch represents the COMM port number 1 or 3 only The baud_no parameters takes value from 0 255 amp HO to S amp HFF which gives additional configuration of communication format The upper 4 bits of baud_no specify the communication format number of data bits number of stop bits and panity and the lower 4 bits represent the baud rate Hence the baud_no for 8 data bit1 stop bit and no party is the same as the old models providing compatibility across the family Once the new baud rate has been set it will not be changed until execution of another SETBAUD statement or when the power
23. via the Intemet using only a Web browser Please refer to the Intemet TRILOGI Version 5 x on line helps for detail description of the installation and operation of this incredibly powerful software 2 2 Simulation A great feature unique to the TRILOGI development environment is the built in simulator With the simulator you can interact with your program by simulating the input conditions using only a keyboard and examine the status and present values of the outputs relays timers and counters on screen immediately Most Custom functions written in TBASIC can also be simulated and all the variables can be examined readily on the simulator screen The simulator does not require any physical connection to the target PLC and thus offers the most effective way of testing and debugging your ladder logic program prior to the installation of the hardware Programming and debugging time can be greatly reduced if you make good use of the simulator feature to eliminate as many logic emors as possible before testing the program on the actual hardware It also helps to reduce the chances of costly damage to the machine due to programming enos 2 3 Transferring Program to the PLC Once you are satisfied with the TRILOGI simulated scenarios retum to the ladder logic editor by pressing the lt ESC gt key To transfer the ladder program to TLOOMD first connect the PC to COMM1 of the PLC and then tum on its power supply You may press lt Ctr T gt on
24. 0 0 16W Use 0 5W resistor Figure 1 1 1 3 T100MD PLCs Chapter Installation However if the stepper motor driver input is only 5V CMOS level and non opto isolated then you need to convert the 12 24V outputs to 5V This can be achieved using low cost transistor such as a 2N4403 A better way is to use an opto isolator with logic level output as shown in Figure 1 2 This provides a galvanic isolation between the PLC and the stepper motor driver 5V OV Stepper s supply Logic output ee Optoisolator H11L2 or H11L3 Quality Technology 12 24V DC Power Supply ov for PLC _OUTPUTS G 7 To 5V CMOS stepper driver input 5mA max Y 2K2 resistor 2 2K Figure 1 2 Conversion of TLOOMD outputs to 5V logic level 1 4 PWM Outputs Pulse Width Modulation PWM is a highly efficient and convenient way of contolling output voltage to devices with large time constants such as controlling the speed of a DC motor the powerto a heating element orthe position of a proportional valve PWM works by first tuming the output to full voltage fora short while and then shutting it off for another short while and then tuming it on again and so on in accurate time intervals This can be illustrated in the following diagram Load Vdtage Vru Average e a b XV Ful The average voltage seen by the load is detemined by the duty cycle of the PWM wave form The duty cycle is defined a
25. 01s and 0 02s clock sources may lose some accuracy Inputs based on intenupts such as High Speed Counters however will not be affected Uploading Ladder Program from the PLC This is not supported on Version 5 0 TRILOGI Version 4 X pemits you to retieve the compiled code from the PLC s EEPROM and re construct them into ladder circuits However compiled TBASIC based custom functions cannot be retrieved Note that Intemet TRILOGI Version 5 0 does not support uploading of Ladder Program from the PLC at all The uploading function might be made available in future asa stand alone utility program To perform uploading open the Contoller pull down menu and select the new item Target Access A pop up menu with two items Set Password and Retrieve PLC s Ladder will appear Select Retrieve PLC s Ladder and you will be prompted to confirm your wish to obtain the ladder program from the PLC 2 5 T100MD PLC Chapter 2 Operating Procedure Note that since the I O label names and comments defined in the Original program were never saved in the PLC the re constucted ladder diagram can only make use of the I O labels defined in the curently opened file Since the uploaded program replaces all the existing ladder circuits make sure that you keep a backup copy if you do not wish to lose the contents of the currently opened file If an VO referred to by the PLC s program code is not defined in the cunent file the program will prompt
26. 078 16 1233 to 1248 497 to 512 IR96 0 to IR96 15 40097 1 to 40097 16 1521 to 1536 oj O1 ojala o o ojl ajaj On ool on MODBUS is a registered trademark of Groupe Schneider OMRON is a registered trademark of OMRON Corporation TIOOMD amp MX PLC Chapter 5 Modbus Omron Protocols Support T100M Variables OMRON MODBUS Timer 1 to 64 IR128 to IR191 40129 to 40192 Present Values Counter 1 to 64 IR256 to IR319 40257 to 40320 Present Values Clock Date DATE 1 DATE 2 DATE 3 DATE 4 Data Memory DM 1 DM 2 DM 4000 DM 4000 5 2 MODBUS RTU Protocol Support The new Rev D of the TLOOMD or TLOOMX PLCs also supports the MODBUS RIU protocol The difference between the ASCII and RIU protocols is that the latter transmits binary data directly instead of converting one byte of binary data into two ASCII characters A message frame is determined by the silent interval of 3 5 character times between characters received at the COMM port Other than that the function codes and memory mappings are identical to the MODBUS ASCII protocol Table 5 1 therefore applies to MODBUS RTU protocol as well MOBBUS RIU has following command and response format Stat Address Function Data CRC 16 END Silence of 3 5 1 byte 1 byte byte 2 bytes Slence of 3 5 chartimes chartimes The following Function Codes are supported Read Input Status Read Holding Registers Force Single
27. 19200 7 data bit 1 stop bit and even parity execute the statement SETBAUD 3 amp HC4 Important Snce the two COMM ports are independent they can be set to different format and baud rate from each other Please note that if you change the baud rate or communication format to 1 17 T100MD PLCs Chapter Installation 1 9 4 something that is different from that set in the TLServer then both the TLServer and TRILOGI will no longer be able to communicate with the PLC via this COMM port You will have to either configure the TLServers serial port setting using its Serial Communication Setup routine to match the PLC or you can cycle the power to the PLC to reset the COMM port to the default format 38 400 8 n 1 If you had used 1stScan contact to activate the SETBAUD command than you will need to cycle the power to the PLC with DIP switch 4 set to ON to halt the execution of the SETBAUD command Also remember that when the PLC is reset this way its COMM1 will power up at 9600 bps only so you will need to temporarily configure TServers serial port to 9600bps to communicate with it If you need to re access the port using TRILOGI then you will need to reset the PLC with DIP switch 4 set to ON so that the program will not execute a SEIBAUD command Support of Multiple Communication Protocols The TLOOMD PLC is a real communication wizard It has been designed to understand and speak many different typ
28. 7 CH18 CH1946 CH1 Aig CH1Bie CH1Ci 232 231 230 229 228 227 226 225 CH1D46 240 239 238 237 236 235 234 233 CH1 E46 248 247 246 245 244 243 242 241 CH1F46 256 255 254 253 252 251 250 249 4 6 Read Timer Contacts Command Format aada T 8 bit Channel Hex Response Format eR E ater e 8 bit data in Hex Definition of Timer C ontact Channel Numbers TIOOMD amp MX PLC Chapter 4 Command Response Format A timer contact is a single bit of memory and 8 timer contacts are grouped into one 8 bit channel similar to that of the inputs outputs etc The following table shows the timer numbers defined in TRLOGI s Timer enty table and their comesponding channel numbers cho Jesh a Ws aa e cHe Ce 15 14 13 e 1 o 9 CH2 CH3 CH4 CH5 CH6 cH 64 63 62 61 60 59 58 57 4 7 Read Counter Contacts Command Format eee oe ed lt 8 bit Channel Hex Response Format Rje Jie ae S a 8 bit data in Hex Definition of C ounter ContactChannel Numbers The 64 counter contacts are assigned channel in exactly the same way as the 64 timers Please refer to last section 6 Read Timer Contacts for details 4 8 Read Timer Present Value P V Command Format RM i aa 55 oe nn Timer1 00 Timer16 0F Timer64 3F Response Format PR m 10 10 10 hoe Timer present value in Decimal The present value PV of the specifie
29. Ch 2 pe a Ch 2 a ee eo Eee These special I O therefore share the same electical specifications as the ON OFF type I O which have already been described in the Installation Guide 1 3 Stepper Motors Controller Outputs Technical Specific ations No of Channels Max Pulse Rate pps 20000 single channel running 10000 two channels running Maximum Load Current 1A 24V DC Defined by STEPSPEED accelerate from 1 8 max pps to max pps decelerate from max pps to 1 8 max pps TBASIC commands STEPSPEED STEPMOVEABS STEPCOUNTABS STEPMOVE STEPSTOP STEPCOUNT It is essential to understand the difference between a stepper motor Contrller and a stepper motor Driver A stepper motor Driver comprises 1 2 T100MD PLCs Chapter Installation the power electronics circuity which provides the voltage curent and phase rotation to the stepper motor coils The TLOOMD s built in SepperMotor Contoller on the other hand only generates the required number of pulses and sets the direction signal according to the defined acceleration and maxmum pulsing rate specified by STEPSPEED and SIEPMOVE commands You cannot directly connect the pulses to the stepper motor You will need a stepper motor driver which you can buy from the motor vendor Depending on the power output the number of phases of the stepper motor and whether you need micro stepping the driver can vary in size and co
30. Coil Coil 1 40001 1 Coil 2 40001 2 Coil 17 40002 1 and so on Preset Single Register Preset Multiple Registers 5 3 TIOOMD amp MX PLC 5 3 5 4 OMRON Host Link Command Support Chapter 5 Modbus Omron Protocols Support Command Type Level of Support a TEST b STATUS READ c ERROR Read d IR Area READ RR Full support 0000 to 1000 e HR AR LR Area RH Dummy always returns O000 amp TC Status READ DM AREA READ RD Full support D PV READ Dummy always returns 0000 h Status Write Dummy always OK l IR Area WRITE Full Support j HR AR LR Area Dummy always OK amp TC Status WRITE KRCIO Dummy for other areas for Channel or Bit QQIR Dummy for other areas always 0000 For detailed description of the command and response formats for each OMRON Host Link Commands please refer to C20H C28H C40H PLC Operation manual published by OMRON Corporation Application Example Interfacing to SCADA Software SCADA software or MMI systems also known as LCD Touch Panels nomally use object oriented programming method Graphical objects such as switches indicator lights or meter etc are picked from the library and then assigned to a certain I O orintemal data address of the PLC When designing a SCADA system first you need to define the PLC type You can choose the MODBUS ASCII MODBUS RIU or OMRON C20H Once a graphical object has been created you will ne
31. Cs Chapter Installation thid party SCADA software you will need to configure the modem to meet those other conditions Please see the application notes MODEM 1 2P on your TRILOGI distribution diskette for details Most modems have the ability of storing the configured mode into their non volatile memory so that when the modem is next powered up it wil automatically be set in that mode If you configure the modem this way there is no need even forthe PLC to initialize the modem at all though it will still need to set its COMM1 s baud rate to 9600 The AT commands to achieve this for 100 Hayes compatible modems are AT amp WO amp Y0 You may check the modem reference manual for the actual commands for other makes of modems 1 9 7 Constructing a one Multi drop Network For complex distibuted applications the built in RS485 port may be required for intemal networking between PLCs for data exchange Yet some or all the PLCs may need to be connected to a SCADA system or MMI It is possible to constuct a second multi drop network around the PLC COMM port 1 However this will require a 4 wire R485 or RS422 constuction since the PLC COMM port 1 does not have built in signal to enable disable the transmitter and receiver of an R485 driver IC It is required that each PLC has an RS232 to 4 wire conversion interface so that they can be connected by a fourwire RS485 RS422 network to the SCADA host system Of course there must also b
32. HOO Se E E EE CHO1 16 15 14 13 12 11 10 CHO2 24 23 22 21 20 19 18 7 CHO3 CHO5 57 56 45 44 43 42 CHO6 CHO8 69 68 67 66 65 CHO9 a E a Ea CHoB 96 95 94 CHOC 6 100 CHOE 120 119 118 117 116 115 114 113 CHOF 6 The 8 bit inputs of each channel is represented by two bytes ASCII text expression of its hexadecimal value Forexample if inputs 1 to 3 are logic 0 s inputs 4 to 10 are logic 1 s and all other inputs are logic 0 s then if you send command R100 you will get response RIF8 F8 1111 1000 4 4 Read Output Channels Command Format Ro air ile ce aam 8 bit Channel Hex Response Format a Lo re tT ee 8 bit data Hex Please refer to the Input Output vs Channel Number table described in the last section 3 Read Input Channels for details 4 2 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 5 Read Relay Channels Command Format Si ins e fe a 8 bit Channel Hex Response Format eaen ae en e 8 bit data Hex Definition of Relay Channel Numbers All M series PLC supports 256 intemal relays the channel definition of the first 128 intemal relays is the same as the inputs and the outputs The remaining relays and their assigned channels are shown in the following table bit7 Relay numbers bitO CHL10 CH11 CH12 CH13 6 CH14 CH15 CH16 CH1
33. IDisconect ii The headeris identical to the command sting iii The length of response sting is corect Pros and Cons This method does not incur any hardware cost but it requires careful programming and strict checking of the response sting and hence requires more effort to program It is also the least desirable if the network traffic is moderately high as many collisions will occur and there is 3 7 TIOOMD amp MX PLC Chapter 3 Host Communication danger of some undetected enor being allowed to pass through w Token Awarding Scheme A token is a software means of telling a PLC that it has been given the right to temporarily act as the master A TLOOMD PLC ora host PC can serve as the token master An intemal relay bit ora variable of the PLC can be defined as the token The token master will begin by giving the token e by setting the token relay bit to T or the token variable to some fixed value to the first PLC on the list The PLC that has the token can then send hostlink commands to other PLCs When it has finished the job it can then send a command to the token master to relinquish its token If it is based on a fixed timing scheme the master can assume that the PLC will complete its job after a fixed time say 0 1 seconds and tum off its comesponding token relay bit The token master then passes the token to the next PLC on the list and so on until the last PLC has relinquished its token and the token i
34. INPUI command b INPUTS n When the INPUT n function is executed the CPU checks the COMM n buffer to see if there is a byte with the value 13 the ASCII CR character which acts as a terminator for the sting If a string is present all the characters that make up the sting will be removed fom the COMM buffer If a completed sting is not present then the COMM buffer will not be affected and INPUT n retums a null string This ensures that before a complete sting is 1 20 T100MD PLCs Chapter Installation 1 9 6 received the seral characters will not be lost because of the unsuccessful exec ution of the INPUT n function c PRINT n The PRINT statement transfers its entire argument to a 256 byte serial out buffer which is separate from the senal in buffer The PRINT statement therefore does not affect the content of the seral buffer for incoming characters The operating system handles the actual transfer of each byte of data out of the seral out bufferin a timely manner Again each COMM potrt has its own independent 256 byte serial out buffer and hence the two seral ports can operate totally independent of each other Note that the PLC automatically enables the RS485 transmit driver when it sends serial characters out of its COMM3 port When the stop bit of the last character in the serial out buffer has been sent out the operating system immediately disables the RS485 driver and enables the receiver This greatly eases
35. MD PLC supports up to 256 intemal relays 64 timers any one or all can be configured as High Speed timers 64 counters 8 clock sources of various periods 0 01s 0 02s 0 05s 0 15 0 2s 0 5s 1 sec and 1 minute T100MD also supports 8 sequencers of 32 steps each A sequencer isa highly convenient feature for programming machines or processes which operate in fixed sequences Any one or all of the first 8 counters can be used as step counters for the sequencers which conespond to sequencers Seql to Seq8 Each step of the sequencer up to 31 can be used asa contact to the ladder diagram as SeqN XX where N sequencers 1 to 8 XX Step 0 31 Please referto TRILOGI Programmer s Reference Part for detailed descriptions of the built in sequencers Chapter 2 Operating Procedure 2 1 Programming The TLOOMD controller is programmed using the software TRILOGI Version 4 X which runs on an IBM compatible PC or using or Intemet TRILOGI 5 0 which runs on multiple platforms This is a full screen ladder logic editor compiler and simulator software TRILOGI Version 4 x is a standalone DOS based software package which provides a powerful programming and debugging environment for programming in both ladder logic and TBASC Please refer to the TRILOGI Programmers Manual for details With the introduction of the Intemet TRLOGI 5 0 Client Server software suite the M seriles PLC has become the world s first PLC that is programmable
36. Such transducers may be used 1 10 T100MD PLCs Chapter Installation 3 conveniently by TLOOMD using the pulse measurement capability However the frequency of such signal must be below 10 000 Hz For an application that requires measurement of the frequency of a high speed counter you will need to feed the pulse inputs into both input 3 and Input 5 In this case HSC 2 is used together with PM 1 to count the input pulses as well as measure its frequency This is because an input pin that has been defined as High Soeed Counter Cannot simultaneously be defined as Pulse measurement pin If you execute both the HSCDEF 1 and PMON 1 in the same program the last executed command will take precedence T100MD PLCs Chapter 1 Installation 1 8 Analog I Os A D Electical Charactenstics No of A D channel 4 to 8 depending on the model Resolution 10 bit Built in Sample amp Hold Yes Conversion Time LOus per channel D A Electical Charactenstics No of A D channel Lor2 depending on the model Resolution 8 bit Conversion Time LOus per channel Notes 1 Although the A D converters actual resolutions are only 10 bit and the D A converters actual resolutions are only 8 bit TLOOMD PLCs nomailize all the analog data to 12 bit numbers Hence you will find that ADC n function retums the value as 0 4 8 12 16 4092 not 4095 since the least significant two bits are always zero Similarly the D A conve
37. TLOOMD Super Programmable Controllers User s Manual Piani eiia TR INTERNATIONAL INC Copynght Notice and Disclaimer TRILOGI Version 1 x 2 x 3 xand 4 x are tademarks and copyrights 1989 to 1999 of TRIANGLE RESEARCH INTERNATIONAL PTE LID SINGAPORE TRI All rights reserved No parts of this manual may be reproduced in any form without the express written permission of TRi TRi makes no representations or warranties with respect to the contents hereof In addition information contained herein are subject to change without notice Every precaution has been taken in the preparation of this manual Nevertheless Ri no responsibility for erors or omissions or any damages resulting from the use of the information contained in this publication IBM PC XT and AT are trademarks of Intemational Business Machines Corp MSDOSis a tademark of Microsoft Inc All other trademarks belong to their respective owners Conditions of Sale and Product Warranty Triangle Research Intemational Pte Ltd of Singapore Ri and the Buyer agree to the following terms and conditions of Sale and Purchase 1 The TLOOM Programmable Controller is guaranteed against defects in materials or workmanship fora period of One year from the date of registered purchase Any unit which is found to be defective will at the discretion of TRi be repaired orreplaced TR wil not be responsible for the repair or replacement of any un
38. ad 4 1 4 2 Device ID Wite 4 1 4 3 Read Input Channels 4 1 4 4 Read Output Channels 4 2 4 5 Read Relay Channels 4 3 4 6 Read Timer Contacts 4 3 4 7 Read Counter Contacts 4 4 4 8 Read Timer Present Value P V 4 4 4 9 Read TimerSet Value S V 4 5 4 10 Read Counter Present Values P V 4 5 4 11 Read Counter Set Value SV 4 6 4 12 Read Variable Integers A to 2 4 6 4 13 Read Vanable Stings A to Z 4 6 4 14 Read Variable Data Memory DM 1 to DM 4000 4 6 4 15 Read Vanable System Variables 4 7 4 16 Read Variable High Speed Counter HSCPV 4 8 4 17 Wite Inputs 4 8 4 18 Wite Outputs 4 8 4 20 White TimerContacts 4 9 4 21 White Countercontacts 4 9 4 22 White Timer Present Value P V 4 9 4 23 White Timer Set Value SV 4 10 4 24 White Counter Present Value P V 4 10 4 25 White Counter Set Value S V 4 10 4 26 Wite Variable Integers A to 5J 4 11 4 27 Wite Variable Stings A to Z 4 11 4 28 White Variable Data Memores DM 1 to DM 4000 4 11 4 29 Wite Vanable System Variables 4 12 Table of Contents 4 30 Wite Variable High Seed Counter HSCPY 4 12 4 31 Update Real Time Clock Module 4 12 4 32 Halting the PLC 4 13 4 33 Resume PLC Operation 4 13 4 34 Host Communication Pogram Examples 4 14 4 35 InterNetworking Using NEICMD command 4 15 4 36 Inte Networking Using MODBUS Protocols 4 15 Chapter 5 MODBUS OMRON Protocols Support 5 1 MODBUS ASCII Protocol Support 5 1 5 2 MODBUS RIU Protocol Support 5 3 5
39. ady listed on the fourth screen of the View Variable window Force Setting Resetting I O Bits If you hit the lt Enter gt key during On Line Monitoring mode the selected I O bit of the contoller will be forced to toggle change state by TRILOGI using host link commands If the selected bitisa physical input bit or has been assigned to an output coil contolled by the ladder diagram it will only be toggled for one scan time After that the contoller will refresh its input output according to the actual states of the physical inputs and outputs determined by the outcome of the ladder program This is sometimes useful during program testing or debugging for temporarily oveniding an I O that does not respond as predicted Note On Intemet TRILOGI Version 5 you force an I O by moving the mouse pointer to the I O and then click on the left or right mouse button See the Intemet TRILOGI on line helps for more details Suspending PLC s Ladder Program You can suspend the operation of the controller at any time by pressing the lt P gt key or by clicking the Pause button in Intemet TRLOGI Version 5 x A waming message wil appear and a flashing sign System Paused will be displayed on the upper right hand comer When the controller is suspended its program will not be executed until it is resumed by pressing the lt P gt key again At this time you can force set or reset any relay or output bits This is convenient during programmin
40. annel The TLOOMD PLC features two channels of PWM on its outputs 7 and 8 Since these two outputs are high voltage high current outputs 24V 1A they can be used to directly control the speed of a small DC motor of up to maxmum of 1A current They can also directly drive proportonal variable position valves whose opening is dependent on the applied voltage Increasing Output Drive C urent Non Opto Isolated If you need to contol power devices which demand more than the 1A 1 5 T100MD PLCs Chapter 1 Installation maximum limit that output 7 amp 8 can drive you can use the following Circuit to amplify the drive current 24V 2k2 S IRF9530 or IRF9520 7 YA P channel MOSFET PLC s 2k2 D output 7 or 8 Load max 12A 24VDC Figure 1 3 The MOSFET driver IRF9530 can drive up to 12A of cunents However note that the output has been converted into a Source PNP type The above Circuit is also not opto isolated and hence you have to take the usual precautions of preventing the large curent load demand from interfering with the powersupply voltage of the PLC Increasing Output Drive Curent Opto Isolated The advantage of using PWM is that you can easily amplify the drive current to a largerload such asa larger permanent magnet DC motor by using a power transistor or power MOSFETto boost the curent switching capability If the load is of different voltages and the load cunent is high you should use
41. connection The following descriptions is only applicable to the DOS version of TRILOGI Version 4 1x The network version of TRILOGI Version 4 1x is available by executing the batch file TL4NET BAT in the tilogit4 directory The network version of the program is almost identical to 1L4 EXE the exception being an additional command item Select Contoller Ctr I in the 3 11 TIOOMD amp MX PLC Chapter 3 Host Communication Contoller main menu For this program to function propery each PLC on the network must be assigned a unique ID You can use the command in TRLOGI Controller gt Target Access gt Wite ID Address to set the ID of each controller separately before connecting them to the network When running the IL4NET program you can easily select any specific PLC to work with by specifying its ID After entering the device ID Network TRILOGI will automatically query the PLC with that particular ID for its source file name It then searches the curent directory of the PC s disk drive fora matching file If found it will prompt the user to confirm whether he she wishes to open the source file The selected controller is then available for pogram downloading or On line Ladder monitoring as per the nomal TRILOGI operation To switch to another PLC simply press lt Ctr I gt and enter another ID This program offers a quick way to test a new R485 network If a Communication eror occurs check to see if the PLC
42. ctives 1 Multiple Access with Collision Detection There is nothing to stop any PLC from sending out hostlink commands to other PLCs However If more than one PLC simultaneously enables their transmitters and send out hos link commands then the signals will conflict and the messages will be garbled up If the network traffic is low then the solution may be a matter of having the master check for the comect response after sending out a command sting If there is enor in the response sting the master should back off the network for a short while use different timing for different PLCs and then re send the command until a corect response sting is obtained This scheme is similar to the CSMA CD Camer Sensing Multiple Access Collision Detec tion commonly used in Ethemet Fortunately the NEICMD function of TLOOM PLC automatically senses the R485 lines until they are free before sending out the command sting to reduce the chance of a collision It also checks the integrity of the response string for conect FCS Frame Check Sequence Characters before retuming the sting Please refer to the Programmers Reference for detail description of the NETIC MD3 function However the program must still check the following items in the response string to verify that the sting retumed from NETIC MD function indeed comes from the PLC that it had talked to and not fom another PLC which tres to send a command to someone else i The
43. d timer is retumed in decimal form as four byte ASCII text characters from 0000 to 9999 4 4 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 9 Read Timer Set Value S V Command Format Be Ue a ee al nn Timer1 00 Timer16 0F Timer64 3F Response Format Rko 00e 40 AON a Timer Set Value in Decimal The Set Value S V of the specified timer is retumed in decimal form as four byte ASCII text characters fom 0000 to 9999 Note that this command header contains small letter m instead of M in the RM command 4 10 Read Counter Present Value P V Command Format Oe a ee aaee nn Counter1 00 Counter16 0F Counter64 3F Response Format Ra fao es od Ee eae Counter present value in Decimal The Present Value of the specified counter is retumed in decimal form as four byte ASCII text characters from 0000 to 9999 4 11 Read Counter Set Value S V Command Format fees ie umn ant e oe nn Counter1 00 Counter16 0F Counter64 3F Response Format ea eS ee ee ed NT Counter Set Value in Decimal The Set Value of the specified counter is retumed in decimal form as four byte ASCII text characters fom 0000 to 9999 Note that this header contains small letter u instead of U in the RU command TIOOMD amp MX PLC Chapter 4 Command Response Format 4 12 Read Variable Integers A to Z Command Format PR Vv 1 a
44. e a 4 wire RS485 RS422 converter at the host computer The two COMM ports capability of the TLOOMD Rev D can be used to their fullest extent in such a situation Please consult your local supplier or email to info ti plc com for questions regarding such applications 1 10 DIP SWITCHES DIP Switch WI1 1 All outputs relays Without MX RIC module no effect timers and counter If MX RIC module has been installed then all the values are non I Os timers and counters as well as all intemal retentive variables retain their value after power off in the battery backed RAM DAC PWM data will not be retained however W1 2 OMM1 responds to COMM3 responds to EMIT 3 0 protocol EMIT3 0 protocol DS a an a a A T100MD PLCs Chapter Installation L 4 Nomal Run mode Suspends execution of ladder logic program But host communication remains active e g when used asa slave I O card only When power on with this switch closed default baud rate for COMM1 9600 bps instead of 38 400 bps Note Although the two independent COMM ports of TLOOMD Rev D PLC can process NATIVE MODBUS and OMRON protocols simultaneously only either one of the COMM ports may be used for EMIT3 0 protocol which is selectable by DIP Switch SW1 2 Usefulness of SW1 4 We have taken every effort to ensure that the host communication is always available even when the userprogram ends up in a dead loop This allows the user to re transfer
45. e is ready for operation so that the modem can work propeny A modem may also be connected to COMM3 for multi drop remote programming and monitoring using NETWORK TRILOGI However you will require a special auto tumaround RS232 to R485 converter Please check with your dealer or email info tr pic com forapproved models of such converter b Programming Since the PLC COMM port does not employ handshaking signals of the modem s RS232 port the maxmum baud rate for modem communication should be resticted to 9600bps or lower for reliable continuous communication In addition the PLC s modem should be configured to auto answer mode so that automatic connection is possible when TRILOGI dials up the modem at the remote site The following TBASIC statements set the COMM port 1 to 9600bps and put the modem into auto answer mode SETBAUD 1 3 Set to 9600bps 8 data bits I stop bit no parity PRINT 1 ATDTSO 1 It is assumed that TRLOGI would have set the calling modem to meet the other requirements for No compression Disable Flow Conto etc as described in the BASIC 4 1 Reference page II 1 4 As long as one side of the modem is set to those conditions the other modem will follow during their negotiation phase before connection Hence there is no need to send additional AT commands to set the modem into the above mentioned modes However if the modem is to be used with other programs Such as 1 22 T100MD PL
46. ed to edit its connection and at this point you will be presented with a selection table that conespond to the memory map of that PLC type Example 1 To connect an indicatorlamp to Input 9 of the PLC You will need to program the switch to connect to IROO 8 for OMRON protocol However If you have defined the PLC as MODBUS type then this indicator lamp should be connected to address 40001 9 See Table 5 1 In either case there is no need to leam about the actual command format of the protocol itself as the SCADA software will automatically generate the required commands to access the input address that has been chosen for the object Example 2 To display reading fom ADC 3 asa bargraph on SCADA 5 4 TIOOMD amp MX PLC 5 5 Since the data fom ADC 3 is not directly mapped to MODBUS or OMRON in Table 5 1 you need to add a statement in the custom function that reads the ADC 3 and copy itinto a data memory e g DM 100 ADC 3 Now you can program the bar graph on the SCADA screen to be connected to DM 100 if you use OMRON protocol For MODBUS protocol the object should be connected to the address 41100 ascan be seen from Table 5 1 Using The T100M PLC as MODBUS Master The TLO0OOM PLCs supports for MODBUS protocol goes beyond being a MODBUS slave only You can use the TBASC READMOBUS and WRITEMODBUS commands to send out MODBUS ASCII commands to access any other TLOOM PLC or any third party MODBUS slave devices
47. emale DB9 Connector This port is configured asa DCE Data Communication Equipment and is designed to connect directly to the PC s serial port without the need fora null modem COMM1 communicates with the host computer ata default baud rate of 38 400 bit persecond with 8 data bits 1 stop bit and no parity if DIP switch SW1 4 is set during poweron COMM1 default baud rate will be changed to 9600 baud This is the main communication port for program transfer and on line monitoring of the PLC The pin connections with the host PC are shown below T100MX COMM1 Female DB9 Host PC COM1 or COM2 Male DB9 Figure 1 9 Connecting COMM1 with PC However to connect COMM1 to another DCE device e g a modem you need to make a special cable which swaps the transmit and receive signals as follow Modem Female DB9 T100MD COMM1 Female DB9 Figure 1 10 Connecting COMM1 to a MODEM Pin 4 and 6 are handshaking signals whose presence may be required by some modems to work properly so these pins are connected as shown in the diagram 1 9 2 COMM3 Two wire RS485 Port T100MD PLCs Chapter Installation This half duplex port is meant for networking or for connecting to optional peripherals such as a serial LCD LED message display unit or for intercommunication between PLCs Up to 32 RS232 devices may be linked together in an R485 network The RS485 port is available on a 2 way screw terminal to the left side of the p
48. er the surest way to reset the specific COMM mode is to cycle the power to the PLC so that its COMM port will be reset to AUTO mode and ready to communicate with any supported protocols 5 You can also use the SETPROTOCOL command to set he COMM port to NO PROTOCOL if you wish to use the COMM port for seral data input only This can prevent the PLC from enoneously treating some serial data as the header of an incoming communication protocol and respond to it automatically SETPROTOCOL can also be used to set the PLC to a specific protocol This may be desirable if the COMM port has a specific role and you do not want it to enter other modes by mistake Please refer to the BAIC Programmers Reference manual for detailed description of the SEIPROTOCOLcommand Note if you fx a COMM port to a non native non auto mode TRILOGI will not be able to communicate with the PLC anymore You may have to powercycle the PLC to reset the COMM mode If 1 19 T100MD PLCs Chapter Installation you use IstScan contact to activate the SEIPROTOCOL command than you will need to cycle the power to the PLC with DIP switch 4 set to ON to halt the execution of the SETPROTOCOL command Also remember that when the PLC is reset this way its COMM1 will power up at 9600 bps only so you will need to temporarily configure Servers serial port to 9600bps to communicate with it 1 9 5 Accessing the COMM Ports from within TBASIC Rev D boards Besid
49. ers P V Counters P V CLK and DATE Although inputs outputs etc are also accessible via the RI RO RR commands the RVS command can access them as 16 bit words instead of as 8 bit bytes in those commands For the 32 bit system variable HSCPV use the RVH command described in the next section to access it It may be more conventional for some SCADA software driverto use a single header command RVS to access all the I O varying only the type numberto access different I O types The RVS command also can be used to access the intemal variables used to store ADC DAC and PWM values obtained during the latest execution of the ADC setDAC or setPWM statement These are however not system variables in TBASC sense Eg it is illegal to use ADC 2 to access the ADC channel 2 in TBASIC you have to use the ADC 2 function instead An 8 bit hexadecimal number is used to denote the type of system variable as shown in the following table Variable Variable output 02 date 09 ae A ADC OB tmePvi 06 Pum OD Nota system variable in TBASC Command Format PRP wes omc nif te tee fe ed type Index type 01 to OD denote the type of system variable to access index 01 to 1F indexinto the anay starting fom 01 Response Format PR v s 16 iej 16 16 o a 4 Hexadecimal Digit for 16 bit integer TIOOMD amp MX PLC Chapter 4 Command
50. es of communication protocols some of which are extemely widely used de facto industry standard as follows a NATIVE HOST UNK COMMAND b MODBUSASCII Trademark of Groupe Schneider c MODBUS RTU Trademark of Groupe Schneider d OMRON C20H protocols Irademark of Omron Corp of J apan e EMIT3 0 Protocol Trademark of emWare Inc The command and response formats of the NATIVE protocols are described in details in Chapter 3 amp 4 The other protocols and their address mapping to TLOOMD are described in Chapter 5 amp 6 The two independent COMM ports 1 amp 3 support all the above protocols Each COMM port can communicate using the same or different protocols independent of the other The most wonderful feature of TLOOMD is that the support of all the above mentioned protocols can be fully automatic and totally tansparent to the users There is no DIP switch to set and no special configuration software to run to configure the port for a specific communication protocols The following describes how the automatic protocol recognition scheme works 1 When the PLC is powered ON both COMM port are set to the AUTO mode which means that they are open minded and listen to all serial data coming through the COMM ports The CPU ties to 1 18 T100MD PLCs 2 3 Chapter Installation determine if the serial data conforms to a certain protocol and if so the COMM mode is determined automatically
51. es responding automatically to specific communication protocols described in section 1 9 4 both the serial ports COMM 1 and 3 are fully accessible by the user program using the TBASIC commands INPUT INCOMM PRINT and OUICOMM It is necessary to understand how these commands interact with the operating system as follows When seral data are received by a COMM port the operating system of TLOOMD automatically stores them into a 256 bytes circular buffer so that they can be retieved by user programs later The serial data are buffered even if they are incoming commands of one of the supported protocols except EMIT 3 0 described in section 1 9 4 In addition processing of a recognized protocol command does not remove the characters from the serial buffer queue so these data are still visible to the users program Each COMM port has its own separate 256 byte seral in buffer As long as the user program retieves the data before the 256 byte buffer is filled up no data will be lost If more than 256 bytes have been stored the buffer wraps around and the oldest data is overwritten first and so on The following describes how INCOMM and INPUTS PRINT and OUICOMM functions interact with the serial buffer a INCOMM n Every execution of the INCOMM n function removes one character from the circular buffer When no more data is available in the buffer this function retumsa_ 1 The data removed by INCOMM will no longer be available forthe
52. following C function will compute and retum the FCS for the string passed to it unsigned char compute_FCS unsigned char string unsigned char result result stringtt first byte of string while string result string XOR operation return result Communication Procedure Unlike the point to point communication protocol the host computer must NOTsend the CTRL E character before sending the command block After the host computer has sent out the mult point host link command block only the contoller with the conect device ID will respond Hence it is essential to ensure that every controller on the R485 network assumes a different ID Otherwise contention may occur i e two controllers simultaneously sending data on the receiver bus resulting in garbage data being received by the host On the other hand if none of the contoller IDs match that specified in the command block then the host computer will receive no response atall The PLC automatically recognizes the type of command protocols point to point or multi point sent by the host computer and it will respond accordingly If a mult point command is accepted by the contoller the response block will start with a character followed by its device ID and the same header as the command This will be followed by the data requested by the command a response block FCS and the terminator Framing Enors When the contoller receives a multi point ho
53. g or debugging as you Can contol the output driver to bring any physical component to any desired locations effortlessly 2 4 T100MD PLC Chapter 2 Operating Procedure 2 6 2 7 Ladder Monitoring You can also monitor the logic states of I Os directly on the ladder diagram by selecting the Ladder Monitoring commands in the Contoller or by pressing lt Cti L gt When you enter the Ladder Monitoring mode TRILOGI will continuously monitor the contollers I O logic states and display any ON I O bit with highlighted label names on the ladder diagram You can still scroll up down the ladder programs while performing ladder monitoring using the cursor keys lt PgUp gt lt PgDn gt and lt Ctr PgUp gt and lt Ctl PgDn gt etc However you may not use the left right cursor keys to observe logic states of I Os outside the Current screen Note In Intemet TRILOGI Version 5 x ladder monitoring is already part of the on line monitoring and hence this is not available as a stand alone command On Line Mon Contol and Ladder Monitoring actions are achieved by continuously sending host link commands to the PLC and analyzing the response stings immediately in order to update the I O tables Snce the controller must spare some time to process the host link commands the overall scan time will sow down during on line or ladder monitoring Take precaution that programs which require fast scan time such as counters fed by the 0
54. h Speed Counter channel 2 and they operate in the same way as Input 3 and 4 for HSC 1 described above The fact that the TLOOMD PLC automatically takes care of the direction of rotation of the quadrature encoder greatly simplifies the programmer s task of handling high soeed encoder feedback The HSCdef statement can be used to define a CusFn to be executed when the HSC reaches a certain pre defined value Within this CusFn you can define the action to be taken and define the next CusFn to be executed when the HSC reaches another value Enhanced Quadrature Decoding The default method in which the PLC handles quadrature signal as described above is somewhat simplistic It does not take into consideration the jiggling effect that occurs when the encoder is positioned at the transition edge of a phase Mechanical vibraton could cause multiple counts if the rotor shaft jiggle at the transition edge of the phase resulting in multiple triggering of the counter This simplistic implementation however does have the advantage that the HSC can also be used for single phase high speed counting For M series PLC with firmware revision of 39 and above an enhanced quadrature decoding routine is provided which will lock out multiple counting by examining the co relationship between the two phases You Can configure the M series PLC to use the enhanced quadrature counting by using the SETSYSIEM command as follows SETSYTEM 4 n n 0
55. have their own power supply Snce processes are often modified regulary and if one day somebody by mistake shorts one of the PLC s R485 to high voltage all the PLCs connected to the same RS485 wiring will be fried simultaneously This can result in very costly down time for the whole process since all the PLCs connected to the network will need to be repaired Hence for networking over long distances and involving more than a few PLCs it is important to protect the R485 interface We strongly recommend the following protection circuit to be added between every PLC s R485 and the twisted pair multi drop network cable forsuch applications RS485 Network 10W1 2 W 0 1A Fuses Power Ground the Shield Figure 3 3 Note e As can be seen from the circuit the two 9V Zener diodes Clamp the signal voltage to the PLC s R485 interface to between 9V and 0 7V If the high voltage persists the 0 1A fuse will blow effectively disconnecting the PLC from the offending network voltage e You should use shielded twisted pair cables as the mult drop network backbone and connect the shield to the OV DC ground power terminal of every PLC The grounded shield then provides a common ground reference for all the different PLCs power supplies Even though the R485 network may still work without a common ground reference because the signal wire pair will somehow pull all the RS485 to some reference point Failure to
56. ices connected to its COMM1 b CONNECT MANY PLCs TO A ONE TLSERVER A single PC running the TLServer program can provide service to all the PLCs connected to it via R485 for remote programming monitoring and servicing outgoing email requests via the Intemet using the Intemet TRILOGI client All M and H senes PLCs are installed with the standard SN75176 driver IC that allows up to 31 PLCs to be connected to a single PC However if you replace the SN75176 IC with a 1 8 power type such as the Linear Technology Inc s LIC 1487 then up to 255 PLCs can be connected to a single PC running the TLServer c DISTRIBUTED CONTROL Another important use of the RS485 port will be to connecta TLOOMD to other TLOOMD or Hseries PLCs One TLOOMD PLC will act as the master and all other PLCs will act 1 15 T100MD PLCs Chapter 1 Installation as Saves Each PLC must be given a unique ID The master will send commands to all the slaves using the NEICMD or READMODBUS or WRITEMODBUS functions and to coordinate information flow between the PLCs This allows a big system to be built by employing multiple units of M orH series PLCs connected in a network This results in more elegant implementation of complex control systems and simplifies maintenance problems d INTERFACING H SERIES PLCs TO MODBUS OR INTERNET Since the TLOOMD PLC supports MODBUS protocols a master PLC Can serve as the gateway to interface non MODBUS enabled PLCs such as the H series
57. ification stage is known as a Signal Conditioner A Sgnal Conditioner consists of a precision instumentation amplifier circuit to eliminate common mode noise that will swamp the weak signal if not handled propery You can buy standard ready made signal conditioners fora J or K type thermocouple or you Can Create you own using a highly integrated single chip IC available from vendors such as Analog Device Inc e g AD594 AD595 or from Linear Technology Inc The signal conditioners may have their own power supply When selecting a signal conditioner make sure that you select one with output signal in either 0 1V 0 5V 0 10V 0 20mA or 4 20mA ranges to match that available on the PLC so that the analog data can be read easily 1 9 Serial Communication Ports The latest revision Rev D or D 1 of the TLOOMD features two independent serial ports that can simultaneously communicate with other devices using a variety of protocols They can also be programmed to accept or send ASCII or binary data using the BASC builtin commands such as INPUT n INCOMM n PRINT n OUICOMM n d 1 13 T100MD PLCs Chapter Installation The first serial port COMM1 is an RS232C port which is compatible with most PC R amp 232C ports The second serial port COMM3 isa two wire R485 port that allows multiple PLCs to be connected to a single host computer or a master PLC for networking orto implementa distibuted contol system 1 9 1 COMM1 RS232C Port with F
58. is tumed OFF The baud rate is not affected by software RESET The available baud rates and their comesponding baud rate numbers for COMM1 are shown below Fomat baudno Format baudno 0000 gt o 0100 xox 0001 x0 0101 xox T100MD PLCs Chapter 1 Installation Where xx represents the baud rate of the comm port as follow xxxx 0000 xxxx Baud Rate 100K 250K 500K 110 150 300 600 1200 A table of all the available baud rates and COMM fomats is shown in the following page The communication format witten as 7 2 e means 7 data bits 2 stop bits and even party Likewise 8 1 n means 8 data bits 1 stop bit and no parity You can use the table to select the baud number for a certain baud rate and COMM format Note that the circuit design of COMM1 limits its physical maxmum baud rate to 100kbps although its UART can work at up to 500K bits per second COMM3 can workat the higher baud rate of up to 500K bps Baud No Table All numbers in Hexadecimal amp H00 to amp HFF 110 OB 4B 6B 8B CB EB 1B 5B 7B 9B DB FB 150 300 COL ED 7D 9D 1200 _ OF 4F 6F 8F cr F 1F 5F 7F 9F DF FF 4800 02 42 62 82 E T2 52 72 92 D2 F2 9600 19200 31250 38400 06 46 66 86 C6 6 16 56 76 96 DG F 62500 250K_ 09 49 69 89 C9 E9 19 59 79 99 D9 F9 500K CA EA E g To set baud rate of COMM3 to
59. it damaged by user modification negligence abuse and mishandling orimproperinstallation TR is not responsible to the Buyer for any loss or claim of special or consequential damages arising from the use of the product The product must NOT be used in applications where failure of the product could lead to physical harm or loss of human life Buyer is responsible to conduct their own test to meet the safety regulation of the respective industy Products distibuted but not manufactured by TRI cary the full orginal manufacturers waranty Such products include but are not limited to power supplies sensors I O modules and battery backed RAM TRireseres the right to alter any feature or specification at any time Notes to Buyer If you disagree with any of the above terms or conditions you should promptly retum the unit to the manufacturer or distibutor within 30 days from date of purchase fora full refund Table of Contents Chapter 1 Special I Os and Analog Interfacing Page 1 1 Introduction 1 1 1 2 Special Digital I Os 1 1 1 3 Stepper Motors Contoller Outputs 1 2 1 4 PWM Outputs 1 4 1 5 Using High Speed Counter Inputs with Rotary Encoder 1 7 1 6 Using Intenupt Inputs 1 8 1 7 Using Pulse Measurement Inputs 1 9 1 8 Analog I Os 1 10 1 9 Sernal Communication Ports 1 12 1 9 1 COMM1 R amp 232C with Female DB9 1 12 1 9 2 COMM3 Two wire R485 Port amp Applications 1 13 1 9 3 Changing Baud Rate and Communication
60. ken master or perform extensive enor check on the response sting However this method uses one input of each PLC and as many outputs on the mastersignal generator PLC as there are PLC masters It also requires wiring the PLCs to the mastersignal generator PLC and hence is the most costly method of all 3 2 5 Command Response Block Format Multi point Device ID Header Data FCS Teminator Each command block starts with the character and two byte hexadecimal representation of the controller s ID 00 to FF and ends with a two byte Frame Check Sequence FCS and the terminator FCS is provided for detecting communication eror in the seral bitsteam If desired the command block may omit calculating the FCS simply by putting the characters 00 in place of the FCS Calculation of FCS The FCS is 8 bit data represented by two ASCII characters 00 to FF It is a result of Exclusive OR sequentially performed on each Characterin the block starting from in the device number to the last character in the data An example is as follow Device ID Header Data FCS 0100 0000 XOR 0 0011 0000 XOR 4 0011 0100 XOR R 0101 0010 XOR V 0101 0110 XOR 0100 1001 3 9 TIOOMD amp MX PLC Chapter 3 Host Communication 3 2 6 XOR A 0100 0001 0100 1000 48 Value 48 is then converted to ASCII characters 4 0011 0100 and 8 0011 1000 and placed in the FCS field FCS calculation program example The
61. lphabet 2 A B C Z Response Format Pav eee peepee Tey TS e pebebehe be Le Le 8 Hexadecimal Digit for 32 bit integer Eg To read the value of the variable K send hostlink command RVIK If variable K contains the value 123456 1E240 PLC will send the response sting as RVI0001E240 4 13 Read Variable Strings A to Z Command Format Pav s arate o A B C Z Response Format Ley pel ca cae a Pei ona ev ASCII characters of the string variable length Eg To read the value of the string variable M send host link command rvsm If variable M contains the sting Hello World the PLC will send the response string as RVSHello World 4 14 Read Variable Data Memory DM 1 to DM 4000 Command Format ER v 16 16 16 16 gt o a ae app a 0001 to OFAO 400010 Response Format ER v o 16 16 16 16 Se 4 Hexadecimal Digit for 16 bit integer Eg To read the value of DM 3600 send hostlink command RVDOE1O If variable DM 3600 contains the value 12345 3039 PLC will send the response string as RVD3039 4 6 TIOOMD amp MX PLC Chapter 4 Command Response Format 4 15 Read Variable System Variables This command allows you to read all the M series PLC s 16 bit system variables such as the inputs J outputs relays J counters J timers tim
62. me values In order to maintain the clock settings non volatility you can purchase the TLOOMD PLC with the MX RIC option The MX RIC module isa special socket attached to the TLOOMD s data RAM and provides a Lithium battery backed real time clock that continues to run even when the PLC power is tumed off The Set PLC s Cloclk Calendar command will also set the date and time within the MX RIC module if installed The MX RIC module also maintains the contents of all the I Os and intemal variables stored in the PLC s data RAM in the event of power lost The DIP switch SW1 1 can be set to avoid clearing of the variables when power on please referto section 1 10 for details This may be useful for control systems that must maintain the contents of all data in the event of a powerfailure 2 10 Trouble Shooting Communication Errors If you keep encountering the Communication Enor message when you execute any command under the Contoller menu the following are some possible causes 1 The TLOOMD is not connected to the cable 2 7 T100MD PLC Chapter 2 Operating Procedure 2 The host computer COM port is not connected to the cable 3 Wong COM port numberis specified forthe PC Try another one 4 Power to PLC is not tumed on or an inadequate power supply has been used Make sure that the CPU power supply is within specifications Try another power supply 5 Faulty serial port of host computer Try another compu
63. mmunication If this is the case disconnect the RS485 converter from the network and check it using a single PLC Also check to ensure that the converter has been propery configured with the corect DIP switch settings Replace the converter if it is confirmed to be faulty Next check the wire from the converter to the beginning of the network A broken wire here can lead to the failure of the entire network Since an R485 network links many PLCs together electically and in a daisy chain fashion problems occuning along the R485 network sometimes affect the operation of the entire network For example a broken wir at the terminal of one node may mean that all the PLCs connected after this node become inaccessible by the master If the R485 interface of one of the PLCs has short circuited because of component failure then the entre network goes down with it too This is because no other node is able to assert proper signals on the two wires that are also common to the shorted device Hence when trouble shooting a faulty R485 network it may be necessary to isolate all the PLCs from the network Thereafter reconnect one PLC at a time to the network starting from the node nearest to the host computer Use network TRILOGI to check communication with each PLC until the faulty unit has been tracked down 3 13 Chapter 4 Command Response Format This section describes the detail formats of the command and response blocks for all M series PLC ho
64. mmunication Protocols When a TLOOM PLC receives a native hostlink command fom COMM1 or COMM3 it will automatically send a response string cormesponding to the command This operation is totally tansparent to the user and need not be handled by the user s program All TLOOM PLCs support both point to point one to one and multi point one to many Communication protocols Each protocol has a different command stucture as described below 3 1 TIOOMD amp MX PLC Chapter 3 Host Communication 3 1 POINT TO POINT COMMUNICATION IN a point to point communication system the host computers RS232C serial port is connected to the PLC s COMM1 At any one time only one contoller may be connected to the host computer The hostlink commands do not need to specify any contoller ID code and are therefore of simpler format as shown below Command Response Block Fomat Point to Poin Nene Sy go ce eee Header Data Terminator Each command block stars with a two byte ASCII character header followed by a number of ASII data and ends with a terminator which comprises an character and a camage retum ASCII value 13 The header denotes the purpose of the command For example RI for Read Input WO for Wite Output etc The data is usually the hexadecimal representation of numeric data Each byte of binary data is represented by two ASCII characters 00 to FF To begin a communication session the host computer must first send
65. ms essentially perform the same functions as follows a Prompt the user to enter the desired command block via the PC s keyboard b Initiate a communication session and send the command sting to the controller c Wait to receive the response block from PLC and display the response block on the PC s screen These two programs incorporate all the codes needed to communicate successfully with the M series PLC in either BASIC or C language using the pointto point or multi point protocols The programs will work on both the COMM1 R amp 232 port as well as COMM3 R485 port Programmers can therefore build their applications using either of the programs as building blocks These two programs assume that an R amp 232 to R485 adapter is used such that the direction of communication of the R485 bus is contolled by the state of RTS line of the RS232C The programs accept both point to point and multi point commands from the keyboard and automatically initiate the corect communication protocols with the controller If your R485 adapter works differently then you must modify the functions transmit485 and receive485 to contol the direction of the halfduplex R485 bus Please referto the technical manual of your R485 adapter for details The PLC must be assigned an ID using the W hostink command which you can send using TRILOGI s Host Link Command item underthe Contoller menu Or at TLServer for Intemet TRILOGI
66. nds are known as the hostlink commands and are to be serially transmitted via RS232C or R485 port to and from the controller The default serial port settings of TLOOM PLC for host link Communication are 38400 baud 8 data bit 1 stop bit no parity The baud rate and the communication format may be changed using the SetBAUD TRASC command described in the Programmers Reference Part Il TBASIC Multiple Communication Protocols The competent TlLOOM family of PLCs supports many different communication protocols to allow maxmum application flexibility In addition to its own native set of communication protocols the TLOOM PLC also understand and speaks the following protocols 1 MODBUS ASCII mode compatible communication protocol 2 MODBUS RIU mode compatible communication protocol For Rev D board with Firmware revision r32 and above only 3 OMRON Host Link Commands for the C20H PLC family 4 emWare EMIT 3 0 compatible protocol This protocol is licensed fom emWare which allows the TLOOM PLC to be linked to the Internet via emGateway Note all trade marks belong to their respective owners The native host link command protocol will be described in detail in this chapter as well as in Chapter 4 The MODBUS and OMRON compatible protocols will be described in Chapter5 and in Chapter 6 we will describe the interface of TLOOM family of PLCs to the emGateway for connection to the Intemet Native Mode Co
67. not on the voltage with respect to a common ground As there will be times when no tansmitters are active which leaves the wires in floating state it is a good practice to ensure that the RS 485 receivers will indicate to the CPUs that there is no data to receive In order to do this we should hold the twisted pair in the logic 1 state by applying a differential bias to the lines using a pair of 560 to 1KQ biasing resistors connected to a 9V at least 5V and OV supply as shown in Figure 3 2 Otherwise random noise on the pair could be falsely interpreted as data The two biasing resistors are necessary to ensure robust data communication in actual applications Some RS485 converters may already have biasing built in so the biasing resistors may not be needed However if the master is an M series PLC then you should use the biasing resistor to fix the logic states to a known state Although in lab environment the PLCs may be able to communicate without the biasing resistors their use is stongly recommended for industrial applications 3 2 2 Protection of RS485 Interface The simple direct mult drop wiring shown in Figure 3 2 will work well if all the networked PLCs are in close proximity and they all share a common power supply They will even work for long distance as long as no wiring enor ever occured However in an industial environment the PLCs are most likely far apart and 3 4 TIOOMD amp MX PLC they each may
68. ommand to the network of contollers After the last stop bit has been sent the master controller must relinquish the RS485 bus by disabling its RS485 transmitter and enabling its receiver At this point the master will wait fora response from the slave contoller that is being addressed Since the command contains the ID of the target contoller only the contoller with the corect ID would respond to the command by sending back a response sting For the network to function properly it is obvious that no two nodes can have the same ID You can use the Contoller gt Target Access gt Wite ID Address command in TRILOGI to set the ID for each M series PLC You can also use the IW command to set the device ID Also all nodes must be configured to the same baud rate and communication format Also care should be taken to ensure that the power supplies for all the controllers are propery isolated from the main so that no large ground potential differences exist between any contollers on the network 3 2 4 Multi Masters RS485 Networking Fundamentals 3 6 TIOOMD amp MX PLC Chapter 3 Host Communication Since any TLOOMD or TLOOMX is capable of sending out network commands the obvious queston is whether multiple masters are allowed on the R485 network It is possible to have multiple masters on a single RS485 network provided the issues of collision and arbitration are taken care of There are several means to achieve these obje
69. ower supply terminal please refer to Installation Guide For suc cessful Communication using the RS485 port you need to conectly connect the and terminals to the R485 equipment using a twisted paircable If you are using the PC as the network host you will need a RQ232C to R485 converter The following describes some possible uses of the R485 port a PROGRAMMING AND MONITORING A TLOOMD PLC can be programmed via its R485 port on a one to one or multi drop manner Since most PCs only have RS232 port s you need to purchase a RS232 to RS485 converter in order to program the PLC via its COMM3 port Most commonly available type of RS485 converters in the market today use the RTS signal to control the RS485 transmitter direction which is supported by TRILOGI Version 4 x and the TLServer software Auto tumaround type may be useable if the tumaround time is less than 0 1ms Please check with your dealer or email info ti plc com for approved models of converters that are tested to work with TRILOGI This is partic ularly useful if COMM1 is already assigned to other tasks such as interfacing to modem barcode readers SCADA system or MMI the programmer can continue to program and monitor the PLC using its R485 port while its COMM1 is actively communicating with other devices This makes it much easier to troubleshoot communication problems at COMMI1 since you can continuously monitor the data exchange between the PLC and the extemal dev
70. red This is to prevent alteration of the PLC program by unauthorized personnel If you have forgotten the password then the only way to re program the PLC is to first delete the password using the Delete Password and Clear Program command in the Target Access menu The program in the PLC will be deleted when this command is executed You have to download the new program into the PLC forit to operate The password security against unauthorized programming is not supported on Intemet TRILOGI Version 5 0 There are already two levels of password structure on Intemet TRILOGI one is defined on the TLServer and the other is defined by executing the SETPASSWORD TBASC command We feel that adding one more password layer to the whole PLC programming environment will only serve to confuse the users We have thus decided to omit this from the Intemet TRILOGI Version 5 x However if you attempt to use Version 5 0 to transfer program to a PLC previously protected by TL41 EXE TRILOGI Version 5 0 will sill prompt you for a Prog Transfer password You will need to enter the authenticated password in order to proceed any further In other words you can still use 1141 EXE to manage define or delete the Transfer Protection password forthe PLC 2 2 T100MD PLC Chapter 2 Operating Procedure 2 4 Errors and Problems 2 5 Any enor in the source file detected during compilation will abort the program transfer process immediately
71. rters shift the 12 bit normalized value applied to it by four bits to the right to convert it into an 8 bit quantity before applying the value to the DAC hardware Hence the full scale value of D A occur when the actual digital code 255 When nomailized to 12 bit quantities 255 x16 4080 The reason for nomalizing all analog data to 12 bit is that in future if new models of PLCs with higher resolution A D or D A converters are intoduced the users PLC program need not be modified since there will not be needs to change the computational expression when all data are already treated as 12 bit full scale ADC n value 4092 4088 4084 J e e 12 8 0 Input Voltage AVcc Figure 1 7 Transfer Function for 10 bit ADC T100MD PLCs Chapter 1 Installation DAC Output AVoc 255 256 254 256 2 256 1 256 SetDAC value 0 16 32 48 4064 4080 Figure 1 8 Transfer Function for 8 bit DAC Interfacing to Industrial Analog Sensors Real word sensors such as a J or K type thermo couple temperature probe produce only microvolts of signal voltage in response to temperature changes These signals are too weak to be read by the A D converters and hence they must be amplified to a higher voltage and curent level before they can be read by the 0 1V or 0 5V range of the Analog inputs The ampl
72. s highlighted The location of this highlight bar indicates the particular I O bit selected 2 5 2 Viewing and Modifying PLC s Intemal Variables If you press the lt V gt key while you are within the On Line Monitoring amp Control screen a View Special Variables window will be opened You can examine the values of all the 26 integer variables A to Z string variables A to Z Data Memory DM 1 to DM 4000 and other special intemal variables such as ADC DAC PWM and the RealTime Clock The values displayed in this window reflect the actual values of these variables in real time The numbers are displayed in decimal form but if you press the lt H gt key it will change into hexadecimal form Pressing the lt D gt key will change it backto decimal mode 2 3 T100MD PLC 2 5 3 2 5 4 Chapter 2 Operating Procedure You can also examine the values of other system variables such INPUT OUTPUT EMINT etc by pressing the lt S gt key as for Show and entering the variable names If you wish to modify the content of any variable simply press the lt E gt key as for Edit and you can enter the variable name followed by the sign and the value The entered value for the variable will be immediately updated into the PLC Note The Show command and the lt S gt keys are not supported in Intemet TRILOGI Version 5 x this is because in Version 5 x all the system variable data are alre
73. s ID has been propery defined Next check for loose or incorect wiring to the RS485 terminal Also check to ensure that the host link port selection DIP switch SW1 2 on the PLC has been tumed ON The 8 pin DIP IC SN75176 provides the RS485 interface and it may be necessary to replace it if it is damaged during installation as a result of over voltage current or prolonged short circuit of its two terminals etc Note that at any one time only one PC or contoller may act as the master in the network Hence when running TL4NET program the PC is the sole master and all the TLOOM PLCs must be slaves only If any TLOOM attempts to send commands when TLANET is performing on lne monitoring conflict wil occur and the TL4NET program may experience frequent No Communication enor 3 4 TROUBLE SHOOTING An RS485 NETWORK a Single faulty device If a single device on the R485 network becomes inaccessible problems can be isolated to this particular device Check for loose or broken wiring or wong DIP switch settings Also double check the device ID using the hostlink command IR sent via the R amp S232C port of the PLC If all attempts fail either replace the entire PLC orthe SN75176 chip that handles the RS485 interfacing and try again b Multiple faulty devices If all the PLCs are inaccessible by the host computer it may possibly be due to a faulty RS232C to R485 converter at the PC 3 12 TIOOMD amp MX PLC Chapter 3 Host Co
74. s access to an unavailable output or relay channel the following enor response will be received Error Response Format ESL The host computer program should always check the retumed response for possibilities of enors in the command and take necessary actions 3 2 MULTI POINT COMMUNICATION SYSTEM In this system one host computer may be connected to either a single TLOOMD via either RS232 or RS485 or multiple TLOOMDs TLOOMXs controllers or the H series PLCs on an R485 network 3 2 1 RS485 Network Interface Hardware The builtin RS 485 interface allows the TLOOM contollers to be networked together using very low cost twisted pair cables RS 485 allows up to 32 contollers including the host computer 3 3 TIOOMD amp MX PLC Chapter 3 Host Communication node to be networked together The twisted pair cable goes from node to node in a daisy chain fashion and should be terminated by a 120 ohm resistor as shown below O 5V Terminating resistor Host Computer with RS 485 or M series PLC T100MD T100MX T28H Relay RS485 RS485 RS485 Figure 3 2 Note that the two wires are not interchangeable so they must be wired the same way to each contoller he maxmum wire length should not be more than 1200 metres 4000 feet RS 485 uses balanced or differential drivers and receivers this means that the logic state of the transmitted signal depends on the differential voltage between the two wires and
75. s follow a Duty Cycle x 100 a b Period a b Frequency 1 period Hz 1 4 T100MD PLCs Chapter Installation Load Voltage y Average a aa voltage z p Ail The average voltage seen by the load is detemined by the duty cycle of the PWM wave fom The duty cycle is defined as follow a a b Period a b Frequency 1 period Hz Duty Cycle x 100 Average voltage duty cycle multiplied by the full load voltage Veu Since the voltage applied to the load is either Fully ON or Fully OFF it is highly efficient because the switching transistors are working in their saturated and cut off region and dissipate very litte power when itt is fully tumed ON or OFF Technical Specific ations No of Channels Duty Cycle range 0 00 to 100 00 Actual Resolution Available Frequencies Hz 16 32 63 250 500 2000 8000 and 32000 Hz Relevant TBASIC commands setPWM The frequency of the PWM waveform can also be varied TLOOMD supports the following frequencies 16 32 63 250 500 2000 8000 and 32000 Hz Usually it is better to select as high a frequency as possible because the resulting effect is smoother for higher frequencies However some systems may not respond propery if the PWM frequency is too high in such cases a lower frequency should be selected The BASC setPwm statement contols the frequency and duty cycle settings of the PWM ch
76. s passed back to the first PLC on the list again This way at any one time there will only be one active network master the one with the token and hence there is no danger of conflicting signals or garbled messages to handle Pros and Cons This method also does not incur any hardware cost but it requires the programmer to draw up a plan on what intemal relay or variable to use as the token and how the PLC can relinquish its token to the token master It could be by fixed timing or by retuming a message to relinquish the token It is a challenging job for programmers unfamiliar with networking scheme but with some experimentation it can be achieved readily Rotating Master Signal In this scheme we make use of the digital inputs of the TLOOM PLCs to grant the PLC the right to act as the network master Lets call this input the Be the Master input We can use a low cost H series PLC running a sequencer to activate the Be the Master input line of each PLC one ata time Each PLC is given a fixed amount of time to be the master e g 0 1s each Only when the Be the Master input is ON can the TLOOM PLC start sending out hostlink commands to other PLCs So at any one time there will only be one master on the network and no conflict will occurasa result 3 8 TIOOMD amp MX PLC Chapter 3 Host Communication Pros and Cons This method is the easiest to program since there is no need to handle the token with the to
77. simple decoding for both HSC1 amp HSC2 n 1 forenhanced quadrature decoding in HSC1 only n 2 forenhanced quadrature decoding in HSC2 only n 3 forenhanced quadrature decoding in both HSC1 amp HSC2 Interfacing to 5V type Quadrature Encoder If you have a choice you should select an encoder that can produce 12V or 24V output pulses so that they can drive the inputs 3 4 5 or 6 directly If you have 5V type of encoder only then you need to add a transistor driver to interface to the PLC s inputs The simplest way is to use an IC driver ULN2003 connected as shown in Figure 1 5 1 8 T100MD PLCs Chapter 1 Installation ULN2003A Input 3 T100MD1616 Figure 1 5 Interfacing 5V type Rotary Encoder 1 6 Using interrupt Inputs During nomal PLC ladder program execution the CPU scans the entire ladder program starting from the first element progressively solving the logic equation at each circuit until it reaches the last element After which it will update the physical Inputs and Outputs I O at the end of the scan Hence the location of a logic element within the ladder diagram is important because of this sequential nature of the program execution When scanning the ladder program the CPU uses some intemal memory variables to represent the logic states of the inputs obtained during the last VO refresh cycle Likewise any changes to the logic state of the outputs are temporarily stored in the output memory variable no
78. st Most stepper motor drivers have opto isolated inputs which accept a direction signal and stepping pulse signal from the Stepper Motor Contoller In this case the TLOOMD is the Stepper Motor Contoller which will supply the required pulse and direction select signals to the driver Note that the digital output 1 and 2 automatically become the direction select signals for Stepper contoller 1 and 2 respectively when the stepper contollers are being used The direction pin is tumed ON when the motor moves in the negative direction and tumed OFF when the stepper motor moves in the positive direction The SIEPMOVEABS command makes it extemely simple to positon the motor at an absolute location while the SIEPMOVE command let you implement incremental move in either directions foreach channel Interfacing to 5V Stepper Motor Driver Inputs Some stepper motor drivers accept only 5V signals from the stepper motor contoller In such case you need to determine whether the drivers inputs are opto isolated If they are then you can simply connect a 2 2K curent limiting resistor in seres to the path from the PLC s output to the driver s inputs as shown in the following diagram Stepper Motor Driver l Direction Select Input 12 24V DC Power Supply for PLC V T100MD1616 PLC Tii A OUTPUTS Calculation Ip 10mA R V 5 0 01 e g for V 24V R 24 5 0 01 1 9K Select R 2K2 Rating 197 220
79. st link commands Only the formats for the point to point Communication system are presented but all these commands are available to the mult point system as well To use a command for multi point system simply add the device ID nn before the command headerand the FCS at the end of the data e Chapter 3 fordetailed descriptions of multi point communication command format 4 1 Device ID Read Command Format ee es ae Response Format ee en EA y Device ID 00 to FF The device ID is to be used for multi point communication protocol where the host computer can selectively communicate with any contoller connected to a common R485 bus see Section 3 for details The ID has no effect for point to point communication The device ID is stored in the PLC s EEPROM and therefore will remain with the controller until it is next changed 4 2 Device ID Write Command Format Ee lw aie tee ie d Device ID 00 to FF Response Format ESE ESrs E g To set the PLC s ID to 0A send command string Iwoa to PLC 4 3 Read Input Channels Command Format ees aay si et EA IIS 8 bit Channel Hex Response Format 4 1 TIOOMD amp MX PLC Chapter 4 Command Response Format ee Ee ee od 8 bit Data Hex Definition of Input C hannels The following table shows the input numbers as defined in TRLOGI s Input ent table conesponding to the input channel number Bit Input Output Numbers BitO C
80. stlink command block it computes the FCS of the command and compares it 3 10 TIOOMD amp MX PLC Chapter 3 Host Communication with the FCS field received in the command block If the two do not match then a framing enor has occuned The contoller will send the following Framing Eror Response to the host Framing Enor Response Block Mult point only Device ID Header FCS Terminator Command Enors If an unknown command is received or if the command is illegal such as an attempt to access an unavailable channel the following enorresponse will be received Enor Response Format Device ID Header FCS Teminator The host computer program should always check the retumed response for possibiliies of enors in the command and take necessary action 3 3 USING NETWORK TRiLOGI If you have connected the R485 interface of a few TLOOM PLCs into a multi drop network you may download the program or monitor the operation of any PLC from a single host computer connected to the network Note that the host computer s R485 adapter must be of approved type to be compatible with the NETWORK TRLOGI The Intemet TRILOGI Version 5 0 is designed to support both single and multiple M series PLCs linked to a single PC running the TLServer hence there is no need to run a separate program However the DOS version of TRILOGI Version 4 1x uses two different setups of the 1L41 EXE program to handle connection to single or multiple PLCs
81. t Host command Updating of the Set Values is performed without the need to transfer the entire ladder program Since timer and counter SVs are often changed during field testing this makes it much quicker to alter such values for longer ladder programs It often takes much longer time to transfer the entire ladder program than just changing a few timer or counter set 2 6 T100MD PLC Chapter 2 Operating Procedure values Note this command is not available on Intemet TRILOGI Version 5 0 t may be made available in future as a stand alone utility program 2 9 Setting PLC s Real Time Clock This command lets you set the time and date of the PLC s builtin Real Timer Clock RIC When you execute this command It will let you choose whether you wish to update the PLC s real time clock using your PC s curent date and time orto enterthe data manually If you select Manual Entry the program will show you the cunent date and time of the PLC in different fields and you can use the nomal editing keys to modify the values When you press lt Enter gt key the new value will be witten into the PLC s RIC The special bit RIC Er will be tumed OFF after you have executed this command MX RTC Module When the PLC power is tumed off the built in RIC will stop operating and the date and time setting will be lost When the power is re applied to the PLC the RIC must be reset to some factory pre determined date and ti
82. t the actual output pin and will only be updated to the physical output during the next I O refresh You may see that any changes to the input logic state will only be noticed by the CPU when it has completed the current scan and starts to refresh its input variables The input logic state must also persist for at least one scan time to be recognized by the CPU In some situations this may not be desirable because any response to the event will take at least one scan time ormore An interupt input on the other hand may occur randomly and the CPU will have to immediately suspend whatever it is doing and start servicing the interupt Hence the CPU responds much faster to an interupt input In addition interupts are edge tiggered meaning that the intemupt condition occurs when the input either changes from ON to OFF or from OFF to ON Consequently the input logic state need not persist for longer than the logic scan time for it to be recognized by the CPU 1 9 T100MD PLCs Chapter Installation 1 7 Any one or all of inputs 3 to 7 can be used as intenupt inputs when defined by the INDEF statement The Intenupt inputs may also be defined as either rising edge tiggered input goes from OFF to ON or falling edge triggered input goes from ON to OFF When the defined edges occur the defined CusFn will be immediately executed inespective of the curent state of execution of the ladder program Using Pulse Measurement Inputs
83. ter with a good working COM port 6 Faulty serial cable Try anothercable 7 Faulty PLC Retum the unit to authorized dealer for servicing Communication Errors After Transfering A User Program If you have been able to communicate with the PLC but all a sudden after transfering a new TRLOGI program into the PLC you keep encountering the Communication Eror messages then the most likely Causes are 1 Your program has changed the seral port setting to other than 8 data bit 1 stop bit and no parity Or you have set the baud rate to less than 2400 or greaterthan 38400 bps 2 You are executing PRINT OUICOMM NEICMD READMODBUS or WRIEMODBUS on the same COMM port which TRILOGI connects to TRILOGI reports a comm enor when it receives data that is different from the expected response from the slave To fix the above situation tum ON DIP Switch SW1 4 and reset the PLC If you are able to communicate with the PLC then the problem must definitely be caused by some offending codes in your TRLOGI program Conect the enor and re transfer the program before tuming OFF DIP SW1 4 2 8 Chapter 3 Host Communication While a TLOOMD or TLOOMX PLC is running a host computer or another TLOOM PLC this abbreviation is used to refer to both the TLOOMD and TLOOMX in the rest of this manual may send ASCII sting commands to it to read or wite to its inputs outputs relays timers counters and all the intemal variables These ASII comma
84. the addresses of O and intemal variables in the TLOOM PLC are organized very differently from the OMRON or Modicon PLCs we need to map these addresses to the comesponding memory areas in the other PLCs so that they can be easily accessed by their comesponding protocols All I Os timers counters intemal relays and data memory DM 1 to DM 4000 are mapped as shown in table 5 1 However 32 bit variables and string variables are not mapped since they are fundamentally quite different in their implementaton among different PLCs Intemal variables which are not mapped can be still be accessed by copying the contents of these variables to unused data memory DM n these can be easily accomplished within a CusFn so that they can be accessed by these third party protocols For nomal application Table 5 1 may be all that you need to interface to third party contol products such asa touch screen LCD panel 5 1 MODBUS ASCII Protocol Support TLOOM supports MODBUS ASCII protocols with the following command and response format LRC Check 2chas 2chas chas 2chas 2chas The following Function Codes are supported 02 Read Input Status 03 Read Holding Registers Force Sngle Coil Coil 1 40001 1 Coil 2 40001 2 Coil 17 40002 1 and so on 06 __ Preset Sngle Register O Z o Z o o O Please referto the MODBUS protocol published by Groupe Schneider at http www modicon com to find out the exact address and data format
85. the use of the R485 port since there is no need for user to bother with the often critical timing of controlling the R485 driverrec eiver direction d OUICOMM This Command sends only a single byte out of the serial COMM port without going through the serial out buffer For COMM3 it enables the R485 transmitter before sending the character and disables it immediately afterthe stop bit has been sent out Using Modem to Remotely Program Monitor T100MD PLC TRILOG Version 4 1x supports remote dial up to TLOOMD PLC via standard off the shelf modems Two modems are involved for any communication between two devices The host end of the modem setup and configuration is handled by TRILOGI Version 4 1x software whereas on the PLC side the PLC has to configure the modem so that it can successfully communicate with the host computer running TRILOGI a Wiring The modem is often connected to the PLC s COMMI1 Since the serial port on most modems are DCE type you will need a make a special also known as null modem cable to connect them as shown in figure 1 10 If the modem only has a DB25 connector you can connect the wires as shown in the following diagram T100MD PLCs Chapter Installation T100MD COMM1 Female DB9 Modem Female DB25 Figure 1 11 Connecting COMM1 to a modem s DB25 port Note that pin 6 DSR and pin 20 DIR at the modem end are tied together This is often required to inform the modem that the devic
86. umber starts from 00 which represent timer 1 01 represents timer 2 and so on 4 23 Write Timer Set Value S V Command Format ee Timer1 00 New timer SV Timer64 3F Hex Response Format Note the 2nd character isa lowercase m instead of the upper case M of WM command 4 24 Write Counter Present Value P V Command Format ee Counter1 00 New PV Counter64 3F Hex Response Format 4 25 Write Counter Set Value S V Command Format ae Counter1 00 New Counter SV Counter64 3F Hex 4 10 TIOOMD amp MX PLC Chapter 4 Command Response Format Response Format Note the 2nd character is a lower case u instead of the upper case U of the WU command 4 26 Write Variable Integers A to Z Command Format y Nenana a A B C Z 8 Hexadecimal Digit for 32 bit integer Response Format Eg To assign variable K to number 56789 0DD5 send hostlink command wVIKO0000DD5 4 27 Write Variable Strings A to Z Command Format w v s Jalhabet a a e a lo A B C Z ASCII characters of the string variable length Response Format pwivis Jo E g To assign the sting TLOOMD Super PLC to the sting variable P send hostink command wVSPT1LOOMD Super PLC 4 28 Write Variable Data Memory DM 1 to DM 4000 Command Format jw v b 16 6 16 16 16 16 ie
87. uper PLCs Chapter 5 Modbus Omron Protocols Support 5 5
88. you to enter the label name You can use the default name by pressing the lt ESC gt key A default name defines an input as n1 n2 output as Outl Out2 etc Password Security The users may define a password of 1 to 6 characters by selecting the Set Password item from the Target Access menu Once defined the target PLC program may not be uploaded unless the same password is entered If you wish to change the password select the Set Password item and you will be prompted to enter the orginal password If the comect password is entered you will be prompted again to enter the new password If you simply press the lt Enter key at this time without entering any character the original password will be cleared and the user may freely upload the PLC code Once you have entered a password it will stay with the PLC until you change it or delete it using the Delete Password amp Clear Program command If you delete the password the program will be erased as well This effectively protects the code from being read by unauthorized parties 2 8 Changing Timer and Counter Set Values In TRILOGI Version 4 X timer and counter Set Values SV defined in their respective definition tables can be stored into the PLC using the command 1 Host Timer Ctr SV gt PLC underthe Contoller menu Similarly the PLC s intemal tmer and counter SVs can be read into TRILOGI by means of the 2 PLC s Timer Ctr SV g
Download Pdf Manuals
Related Search
Related Contents
Bibliothèque numérique - Mode d`emploi SECO-LARM USA Enforcer E-37EV User's Manual Toshiba Satellite L735-1042XT File 1 - A Escola Reinventada D Mini-Haarglätter Mini Hair Straightener Minirovnač vlasů Mała Whirlpool MT9160XBB User's Manual 取扱説明書(PDF)はこちら Mode d`emploi Epilateurs Soft Extreme User Guide Vodafone Mobile Wi-Fi R206-Z User Manual Copyright © All rights reserved.
Failed to retrieve file