4-channel isolated digital input and 4-channel relay output rs485 remote module (22 pages)
Summary of Contents for Trycom Technology TRP-C28
Page 1
4-channel isolated digital input and 4-channel power relay output RS485 module, Support ASCII and Modbus Protocol. User’s Manual Printed May. 2011 Rev 1.3 Trycom Technology Co.,Ltd 1F, No.2-11,Sihu street ,Yingge Township, Taipei, Taiwan ROC Tel: 886-2-86781191 , Fax: 886-2-86781172 www.trycom.com.tw...
Page 2
1.Introduction TRP-C28 provides with 4 optical isolated digital input channels and 4 power relays output. All channel features screw terminals for convenient connection of field signals as well as LED’s to indicate channel status. Input channels are equipped with 3750Vms DC isolation, and surge protection on RS485 data lines that protect the module and devices against high power voltage input and ground potential differences.
Page 3
Signal LED: Power on, all channels. Power supply: Screw terminal, or external DC adapter. Connection type: Screw terminal, accepts AWG #12~32 wires. Power consumption: 2.7W. Operating environment: 0 to 65C. Storage temperature: -20 to 65C. ...
Page 5
4. System Configuration Switch The TRP-C28 support the Modbus RTU and ASCII communication protocol, It has a two pins external dip-switch that allow user to select protocol between Modbus/RTU and ASCII. The dip- switch also provides “back to default” function when user forget the configuring information stored in EEPROM such as ID (RS-485 Module address), baud rate and data format.
Modbus Communication Protocol. Back to INIT for Modbus 1. Adjust the switch to “off off” position 2. Adjust the switch to “on off” position 3. Reboot. ASCII Protocol ACSII communication protocol. Back to INIT for ASCII 1. Adjust the switch to “on off” position 2.
Page 7
prevent the controlled target from unexpected situation. Safe mode: If the user install the watch-dog enable on the RS485 line, The host will send the reset module’s watchdog command one by one, when the host is not send the command (May be is RS485 off line or host halt), the module will watchdog timeout then into the safe mode, if the module into the safe mode, the digital out will not be changed until the watchdog disable.
Read synchronized data See 8-26 *We offer the utility to guide you to configure the module; the utility is with on-line RS485 modules scanning and searching function. You can find the utility in the CD which bundled in TRP-C28 standard package.
Page 9
8-1. Configure TRP-C28 Command %IDNNPPBBDD(CHK)(cr) First leading code Syntax Address of setting module 00-FF(HEX) Description New address of setting from 00-FF(HEX) The Digital I/O module type define to 40 Set new baud rate (See 8-2) Data format (See 8-3) Checksum...
Page 10
8-4. Digital output data *Multi-Channel mode (Output control for one BYTE) Example: Send command :”#010A0F”…..Data=”0F”:DO0-DO3=“1111”, (RL1/RL2/RL3/RL4= ON). Response:”>”……. Command valid. Example: Send command:”#010008”…..Data=”08”:DO0-DO3=“0001”,(RL1/RL2/RL3:OFF/RL4:ON). Response:”>”……. Command valid. Example: Send command:”#01000G”…Data=“0G”…….Data error!. Response:”!01”…….Parameter error!. *Single-Channel mode( Output control for one BIT) Example: Send command:”#011001”…..
Page 11
8-5. Read digital input N channel counter value Example: Send command:”#012”…..Read the TRP-C28M channel 2 counter value. Response:”!0100023”…..The digital input have been trigger 23 times. *Unless you save value to EEPROM by using the command “#IDCS”. The counter’s value will reset to 0 if power fail or send command “$IDRS”.
Page 12
8-7.Clear all digital input counters value Example: Send command: ”#01CW”, Clear DI0-DI3 counter value to 0. Response:”!01”. * After the command “#IDCW” you must save new value in EEPROM again, or the module will load old value if power fail or reset. 8-8.Save all digital input counters value to EEPROM Example: Send command ”#01CS”, Save DI0-DI3 counters value to EEPROM.
Page 13
8-9.Read digital input latched Example: Send command:”$01L0”…….Read digital input logic 0. Response:”!010200 ”……… DI1 have been latched. *Digital input latch: User key in a digital signal to the module and want to read the response of key stoke. However the user will lost the stoke information because the key input is pulse digital input.
Page 14
8-11. Read digital input/output status Example: Send command:$016…….Read digital I/O status . Response:”!01060C”…….”6”: Relay (RL1,RL4:OFF,RL2,RL3:ON). “ C”: Input DI0 ,DI1 for logic “0”. 8-12.Read the TRP-C28M configuration Data format table...
Page 15
Example: Send command:$012…Read configuration . Response:”!01400640”……. DIO type=40,Baud-Rate=9600 (See 7.2) ,Data format=40 Input counter :rising ,Checksum= Enable, Model=0….TRP-C28M (See Data format table), 8-13.Reset the module status Example: Send command:”$01RS”…….Reset TRP-C28M. Response:”!01 ”……… …………..Have been reset. *Reset will clear all digital output status. 8-14.Read the module’s name Example: Send command:$01M…Read the TRP-C28M’s name.
Page 16
8-15.Read the module’s firmware version $IDF(CHK)(cr) First Leading code Address of setting module 00-FF(HEX) Syntax Command for leading module’s version Checksum description (cr) Carriage return Response !IDMODYYMMDD Mod: The module type YY: Year MM: Month DD: Date ?ID(CHK)(cr) Example: Send command:”$01F”…Read the TRP-C28M’s version. Response:”!01C28M070412”…….
Page 17
8-17.Change the module’s name Example: Send command:”~01OABCDE”….. Change the TRP-C28M’s name become to “ABCDE”. Response:”!01”……. . Command valid. Then send the command “$01M”…read the TRP-C28M’s name. Response:”!01ABCDE”……. .The TRP-C28M’s name is “ABCDE”. 8-18.Set the module’s LED operating mode ~IDLEDA(CHK)(cr) First Leading code Address of setting module 00-FF(HEX) Syntax A=0 Turn on all LED when DIO enable off.
Page 18
Example: Send Command:”~01WEFF”….. Set the watchdog time for 25.5 Sec. Response:”!01”……. . Command valid, When module count to 25.5 Sec the watchdog will into safe mode ,then PWR LED will flash, before timeout if host send “~**”, the watchdog will re- counted!.
Page 19
Example: Send Command:”~01WR”…. Read watchdog timeout value. Response:” !01WD0F”……. . Command valid, set the watchdog timeout is “0F”..1.6 Sec. 8-22.System stand by (Host OK!) *If watchdog is in enable , send the Host Ok!”command before watchdog timeout (B) the watchdog will re-count, PWR LED will flashing after watchdog timeout. 8-23.Read power on/safe value...
Page 20
Command ~ID4V(CHK)(cr) First Leading code Address of setting module 00-FF(HEX) Syntax Read power on or safe mode I/O status description V=P: Power on mode I/O status V=S: Safe mode I/O status Checksum (cr) Carriage return Response !IDABCD A=0 B:DO0~DO3 B=0 D:DI0~DI3 ?ID(CHK)(cr) Command invalid Example:...
Page 21
Then send command:”$014”…. Read synchronized data Response:”!1010E00”….”1”:Have been send the “#**,the DIO status valid is “010E” *After Read *synchronized data ,A value is”1”, Read again become to ”0”. 9. Modbus/RTU Command Description The TRP-C28 support Modbus/RTU protocol, The serial communication data format is...
Page 22
Start bit: 1 Data bit: 8 Parity check: None Stop bit: 1 Baud-rate: 1200bps~115200bps. 9-1. Modbus Syntax: Command Format :ID(HEX)+FC(HEX)+SU(HEX)+DA(HEX) or RC(HEX)+CRC16(HEX). Response Format : ID(HEX)+FC(HEX)+SU(HEX)+DA(HEX) or RC(HEX)+CRC16(HEX). Error Format: ID(HEX)+ FC(HEX)+ CRC16(HEX). ID: RS485 Device Address (HEX)…..1~247 1Byte. FC: Function Code (HEX)…1 Byte. SU: Sub Function (HEX)…..1 Byte DA: Data Format….No Limit RC: Reserved code…No Limit...
Page 23
Command List Function Description Index ID 46 00 00 (CRC) Read the module’s name 10-1 ID 46 04 IP 00 00 00 (CRC) Set up the module’s address 10-2 ID 46 05 00 (CRC) Read the module’s configuration 10-3 ID 46 06 00 BD 00 00 00 00 00 00 (CRC) Set up the module’s configuration 10-4 ID 46 07 00 (CRC)
Page 24
Address of setting module 1~247 Syntax Function code Description Read module’s name Reserved code Response ID 46 00 00 0C 28 00 (CRC) ID 46 00 00 ….Module command Line 0C 28 :Module’s Name is C28 ID C6 00(CRC) ID C6 (CRC) C6:Function Code 00: Reserved code EX: Send Command:”01 46 00 00”…….Read the TRP-C24’s name Response:”01 46 00 00 0C 28 00 “……Module’s name is C24 Error Response: “01 C6 00”……Error code...
Page 28
WT: Watchdog Timer Value ID C6 00 (CRC) ID C6 (CRC) C6:Function Code 00: Reserved code Example: Send Command:”01 46 0C 00”…Read TRP-C28’s watchdog value. Response:”01 46 0C 01 0F. Error Response: “01 C6 00”…Error code. 10-10.Set up panel LED status...
Page 29
00 ID 46 27 00 ……Command valid ID C6 00 (CRC) ID C6 (CRC) C6:Function Code 00: Reserved code Example: Send Command:”01 46 27 01 00”…….Set up TRP-C28’s power on value. Response:”01 46 27 00“… Command valid. Error Response: “01 C6 00”……Error code.
Page 30
Command ID 46 29 DD 00 (CRC) Address of setting module 1~247 Syntax Function Code Description Set up safe mode value DD: Safe mode digital output value Reserved code Response ID 46 29 00(CRC) ID 46 29 00 ……Command valid. ID C6 00 (CRC) ID C6 (CRC) C6:Function Code 00: Reserved code Example:...
Page 31
Command ID 05 00 NN DD 00 (CRC) Address of setting module 1~247 Syntax Function Code Description 00 NN NN=00~03 Channel number Output value DD=00 Relay OFF, DD= FF Relay ON Reserved code Response ID 05 00 NN DD 00 (CRC) Command valid ID 85 FF (CRC) Watchdog mode status...
Page 32
Command ID 0F 00 00 00 04 01 DD (CRC) Address of setting module 1~247 Syntax Function Code Description 00 00 Start channel number =00 00 04 Output channel number Byte Counter Output value Response ID 0F 00 00 00 04 (CRC) Command valid ID 8F FF (CRC) Watchdog mode status...
Page 33
Command ID 01 00 SS 00 04 (CRC) Address of setting module 1~247 Syntax Function Code Description Start channel number SS=00 Read DO status SS=40 Read latch low SS=60 Read latch high SS=20 Read DI status 00 04 Output channel number Response ID 01 BC DD (CRC) ID 01 :Command Line...
Page 34
Command ID 02 00 SS 00 04 (CRC) Address of setting module 1~247 Syntax Function Code Description Start channel number SS=00 Read DO status SS=40 Read latch low SS=60 Read latch high SS=20 Read DI status 00 04 Output channel number Response ID 02 BC DD (CRC) ID 01 :Command Line...
Page 35
Command ID 03 00 SS 00 NN (CRC) Address of setting module 1~247 Syntax Function Code Description 00 SS Start channel number SS=00 00 NN Channel number NN=01~04 Response ID 03 BC DATA (CRC) ID 03 ……Module command Line BC: Byte Counter ,Each channel 2byte DATA :Channel counter value ID 83 ER (CRC) ID 83 :Error Code...
Page 36
Command ID 0F SS NN 00 CN BC 00 (CRC) Address of setting module 1~247 Syntax Function Code Description SS=00 Digital Output SS=02 Clear Counter value SS=03 Save Counter value to EEPROM Start channel number NN=00~03 00 CN Channel number 1~4 Byte Counter=01 Output value Response...
Page 37
from TRYCOM web www.trycom.com.tw. 1.The “Setting”function is for user to initiate the software to set the Com Port from 1 to 20 and setting the Baud-Rate from 1200 to 115200,Checksum Enable or Disable. …See Figure 1 *The Module Factory Setting is “9600” and “ID” is 01, Checksum is Disable. *Turn module’s switch to “OFF,ON”...
Page 38
Figure 2 If you don’t know the module’s ID may select “Scan” to find the module’s setting.
Page 39
Figure 3 Select the module which one you want setting then click “Configuration”. Example: TRP-C29 Configuration A: Get Counter Value please click Digital Input “D0~D7” button. B: Enable the digital output click Digital Output “D0~D7”button. C: Set up new RS485 ID, Baud-Rate and data format then click “Write to EEPROM” button.
Page 41
13. Using Modbus Poll utility The modbus poll utility copyright belong Witte Communications, User can download the utility to www.mosbustools.com Function 1: Read TRP-C28 4 channel DO status. Function 15: Write TRP-C28 DO single channel. Function 2: Read TRP-C28 4 channel DI status.
Page 42
Function 3, 4: Read TRP-C28 CH0~3 Counter value. Function 6: Write Channel 1 counter value. Function 3, 4: Read TRP-C28 CH0~CH3 Counter value. Function 16: Write Channel 0~3 counter value.
Need help?
Do you have a question about the TRP-C28 and is the answer not in the manual?
Questions and answers