General > Frequently Asked Questions

Tech Tip & Sample Codes

(1/2) > >>

support:
As per a user's suggestion, we will attempt to post links for sample programs in this forum thread.

The first place to find sample programs is to look in your TRiLOGI installation folder path as follow:

i-TRiLOGI

   C:\TRiLOGI\TL6\usr\samples

WinTRiLOGI

   C:\TRiLOGI\WTL3\

You can find many well-commented ladder logic and ladder+TBASIC sample programs there.

Also if you are new to ladder logic, you may like to download the free PLC programming eBook from our website at:

http://www.tri-plc.com/reqplcbook.htm

All the examples in the book are created using i-TRiLOGI program so you can enter and simulate them immediately using your i-TRiLOGI simulator.

Note: The book main focus is to explain ladder logic programming and it does not cover TBASIC.

support:
Nano-10 PLC

   http://www.tri-plc.com/trilogi/Nano10Samples.zip

F-series PLC

   http://www.tri-plc.com/trilogi/FPLCsamples.zip

support:
The PLC can easily act as a Modbus master to read or write to any 3rd party devices that support the Modbus RTU, Modbus ASCII or Modbus/TCP protocols.

1)Built-in Modbus functions

Built-in READMODBUS, WRITEMODBUS, READMB2 and WRITEMB2 commands can be configured to use the MODBUS function 03, 04, 06 and 16 to communicate with Modbus slave. The following are sample programs for communicating with the Modbus RTU slave:

http://www.tri-plc.com/trilogi/Built-inModbusMasterFunctions.zip

Program fragment for communicating with a Modbus/TCP server (over Ethernet) is already contained in the TestEthernet.PC6 file that is stored in your i-TRiLOGI samples folder as follow:

   C:\TRiLOGI\TL6\usr\samples\  


2) Modbus functions implemented using TBASIC

Although there is no built-in function to communicate with Modbus RTU slaves using Modbus function code 01, 02, 05, it is possible to create these functions using TBASIC low level INCOMM and OUTCOMM commands.  Sample programs can be downloaded from:

http://www.tri-plc.com/trilogi/TBASICModbus.zip

The zip file also includes two sample programs constructed in TBASIC to use function 04 and 06 in order to run on older T100MD+ PLCs that do not support the Modbus function code 04 or 06.

support:
1) Measuring temperature using 10K Thermistors

Thermistors can be used to measure temperature in many different environments. They are both rugged as well as low cost but are non-linear device.   The application note below explains how to physically connect a 10K Precon thermistor to the PLC using the PLCs on board ADC as well as how to use a look up table and interpolation method to calculate accurate temperature readings from the non-linear thermistor inputs.

http://www.tri-plc.com/appnotes/ThermistorSensor.zip

2) Measuring temperature using LM34 Semiconductor sensor

This is explained in Section 5.3.2 of the Nano-10, FMD or F-series PLC User's Manual. Please download the relevant manual from:

 http://www.tri-plc.com/documentlist.htm


support:
1) MMI6050 As the Master and PLC as Slave
   
    http://www.tri-plc.com/KEPHMI.zip

2) MMI6050 As Slave and PLC as the Master

    http://www.tri-plc.com/MMI6050_as_slave.zip

Navigation

[0] Message Index

[#] Next page

Go to full version