a) Inter PLC Communication Using NETCMD$ Command
All TRi Super PLCs are able to send out host link commands to other Super PLCs using the built-in TBASIC function NETCMD$(). This function accepts host link commands in multi-point format and automatically computes the Frame Check Sequence (FCS) characters, appends them to the command string and sends out the whole command string together with the terminators. The functionthen waits for a response string and checks the integrity of the received response string for errors. This function returns a string only if a proper response string has been received. Please refer to the TBASIC Reference for a detailed explanation of this command.
The NETCMD$() function therefore greatly simplifies the programming tasks for handling networking between PLCs. The programmer only needs to construct the correct command string according to the formats described in this chapter, pass the formatted string to the NETCMD$() function, and then check for the response string. A Super PLC may use the NETCMD$ to map the I/O of another PLC into its internal relays and use the other PLC as its remote I/O.
Note: NETCMD$() function can also be used for sending Hostlink commands over the TCP/IP network after you have successfully made a connection with another remote PLC with a known IP address.
There are some programming examples in your “TRILOGI\TL6\usr\samples” folder that illustrate the use of NETCMD$() to map I/Os of a slave PLC to the master. Please study the example “RemoteIO-Mseries.PC6” carefully to understand the mechanism of mapping I/Os between the PLCs.
An application note and example programs demonstrating how to use our other PLC models as slave remote I/O for the Super PLC can be found at the following web page:
https://triplc.com/appnotes_remoteio.htm
b) Inter PLC Networking Using MODBUS Protocol
The PLCs may also pass data to each other using special MODBUS commands, which are even simpler
to use than NETCMD$ but are restricted to accessing variables that are mapped into MODBUS address
structure. Please refer to the PLC User’s Manual Chapter 14 as well as the TBASIC Reference manual for details
on using the READMODUS, WRITEMODBUS, READMB2 and WRITEMB2 commands.