Trycom Technology TRP-C28 User manual

1
TRP-C28
4-Channel Isolated Digital Input and 4-Channel Relay Output
RS485 Remote Module
User’s manual
Printed Aug. 2005 Rev 1.0
Trycom Technology Co.,Ltd
1F, No.2-11,Sihu street ,Yingge Township, Taipei, Taiwan ROC
Tel: 886-2-86781191 , Fax: 886-2-86781172
Web: www.trycom.com.tw
Copyright
Copyright Notice: The information in this manual is subject to change without prior notice in order to improve reliability,
design and function and dosed not represent a commitment on the part of the manufacturer. No part of this manual may
be reproduced, copied, or transmitted in any form without the prior written permission of manufacturer.
Acknowledgment Products mentioned in this manual are mentioned for identification purpose only. Products manes
appearing in this manual may or may not be registered trademarks or copyright of their respective companies

2
Introductions
Features
TRP-C28 provides 4 optical isolated digital input channels that allow you to input the logic signal from 0
to 30V DC and 4 power relays output . All channel features screw terminals for the convenience
connection of field signals as well as LED to indicate channel status. Each output power relay equips with
high surge current suppressors varistor to entirely protect your module and devices without damage when
irregularly high power voltage input. TRP-C28 can be configured and conduct self-test by outside dip-
switch without complicated setting and connection. Build-in a full set of command, watch-dog, auto reset
function the module can be bi-directionally remote controlled by RS485 protocol.
¾Wide range power input from +18V to +30V DC.
¾All communication's command are perform in ASCII.
¾Programmable in virtually any high-level language.
¾4-CH isolated digital input (with common power) and 4- CH power relay output.
¾Baud Rate can be set from 1200 to 115.2K bps.
¾High surge current suppressors varistor for relay.
¾LED display to indicate input and relay output channels and PWR/watchdog/RS485 status.
¾Dual Watchdog for hardware reset circuit and host operating status .
¾External switch for hardware self-test and module’s configuration.
¾Digital Input Isolation with power source (2500 Vrms).
¾Support screw terminal and standard external DC power adaptor.
Specification
¾Output Channel: 4 Channel Power Relay.
¾Relay type : 2 Form A (RL1,RL2) , 2 Form C (RL3,RL4).
¾Contact rating : 5A/30V DC , 5A/120V AC , 4A/250V AC.
¾Relay surge strength : 4000V.
¾Relay Operate time : 3mS.
¾Relay Min Life : 2*10(7) ops.
¾Input channel : 4 isolated input channels and counter.
¾Input isolation voltage : 2500Vrms.
¾Digital input level 0 : +1V Max.
¾Digital input level 1 : +4V ~ +30V.
¾Input impedance : 3KΩ.
¾Distance : RS485 up to 4000ft. (1250meters) .
¾Baud-Rate: 1200, 2400, 4800, 9600, 19.2K, 38.4K, 57.6K, 115.2K (bps).
¾Communication protocol : RS485 differential 2 half-duplex wires.
¾Format : Asynchronous data with any combination of bits, parity, stop.
¾RS-485 and input/output connector : Industrial plug-in screw terminal.
¾Power input : DC +18~30V.
¾Power consumption :2.7W (max).
¾Operating Temperature:-20 ℃to 65℃.
¾Storage temperature : -20 ℃to 65℃
¾Weight: 375g
¾Humidity : 5-95% non-condensing.

3
Warning
Warning: Don
: Don’
’t connect external DC
t connect external DC-
-Jack and screw terminal DC input simultaneously.
Jack and screw terminal DC input simultaneously.
Communication Wiring
Pin Definitions
Relay 4 –CommonRL4-COMDigital Input CH 3DI3
Relay 4-Normal CloseRL4-NCDigital Input CH 2DI2
Relay 4-Normal OpenRL4-NODigital Input CH 1DI1
Relay 3 -CommonRL3-COMDigital Input CH 0DI0
Relay 3-Normal CloseRL3-NCExternal Voltage Input For Digital InputIN-COM
Relay 2 -CommonRL2-COMRS485 +DATA+
Relay 2-Normal OpenRL2-NORS485 -DATA-
Relay 1 –CommonRL1-COMInput Voltage DC +18-30VDC 18-30V
Relay 1-Normal OpenRL1-NOInput Voltage GroundGND
Relay 3-Normal OpenRL3-NONoneNC

4
TRP-C28 Panel Layout
Relay Output Connector
Digital Input LED Indicator
Relay Output LED Indicator
Power or Watchdog/ RS485 flow LED Indicator
Digital Input Connector
External Voltage Input
RS485 Communication
DC Voltage Input From +18V~30V
System Switch Configuration
and hardware test.
External DC-Jack Input
DC-jack connector (0.5*2.1 mm plug).
Use in RS485 interface along with bellowing TRP converter family
TRP-C06 :RS232 to RS422/485 optical isolated converter.
TRP-C07 :RS422/485 optical isolated repeater.
TRP-C06E :RS232 to RS422/485 converter.
TRP-C08 :USB to RS232/422/485 optical isolated converter.
TRP-C36 :TCP/IP to RS232/422/485 optical isolated converter.
TRP-C39 :Multi-mode fiber to RS232/422/485 optical isolated converter.

5
Block Diagram
Wire Connection For Digital Input
Wire Connection For Relay Output

6
1.Calculate all characters of the command string to get the ASCII sum, except the character return.
2.Mask the sum of string with 0FFH.
Example :
Send the command is “$06M”.
Sum of string is “$”+”0”+”6”+”M”=“24H”+”30H”+” 4D“=“A1H”……The checksum and [CHK]=“A1”.
Response string with checksum is :” A1 “.
How To Calculate The Checksum
Default setting:ID Address :01 Baud Rate:9600 DIO Mode Type :40 Checksum:Disable
Command Format :”Leading Code”+”ID Address”+”Command”+”CHK”+(cr) .
Response Format :”Leading Code”+”ID Address”+”Data”+”CHK”+(cr) .
Command Description
Self- test Switch.2
1.Power off the module , then adjust switch.2 to ON.
2.Power on the module , The module start self-testing, PWR
and digital input LED start lighting one by one, power relay
activating.
3.Power off the module to stop self-testing.
1.Power off the module, then adjust Switch.1 to ON.
2.Power on the module ,The module will be reset to
ID=00, baud rate:9600, checksum: Disable!.
3. Send command to configure TRP-C28.
4.Power off the module, then adjust the Switch to OFF.
System Configuration Switch.1

7
See 11.2Clear digital input latched data$IDC(CHK)(cr)
See 11.1Read digital input latched value$IDLS(CHK)(cr)
See 9.2Clear digital input N channel counter’s value#IDCN (CHK)(cr)
See 9.1Read digital input N channel counter value#IDN (CHK)(cr)
See 10.1Clear all digital input counter’s value#IDCW(CHK)(cr)
See 10.2Save all digital input counter’s value to EEPROM#IDCS(CHK(cr)
See 19.1Save existing digital input status#**
See 19.2Read synchronized data$ID4
See 17.1Read watchdog timeout value~IDWR (CHK)(cr)
See 17.2System stand by (Host ok!)~**(CHK)(cr)
See 18.1Read power on/safe value~ID4V (CHK)(cr)
See 18.2Save existing digital output status to power on
mode or safe mode
~ID5V (CHK)(cr)
See 16.2Disable watchdog~IDWD (CHK)(cr)
See 16.1Enable watchdog and set the timeout value~IDWENN (CHK)(cr)
See 15.2Set the module’s LED operating mode~IDLEDA(CHK)(cr)
See 15.1Change the module’s name~IDONN (CHK)(cr)
See 14.2Read reset status$ID5 (CHK)(cr)
See 14.1Read the module’s firmware version$IDF (CHK)(cr)
See 13.2Read the module’s name$IDM (CHK)(cr)
See 13.1Reset the module$IDRS (CHK)(cr)
See 12.2Read the module’s configuration$ID2 (CHK)(cr)
See 12.1Read digital input/output status$ID6 (CHK)(cr)
See 8.1Digital Output Data#IDPPDD (CHK)(cr)
See 7.1~7.3
Page Index
Set the module’s configuration%IDNNPPBBDD(CHK)(cr)
Function DescriptionCommand List
Command List
Safe mode: Digital output when Watchdog enable.
Power on mode: Digital output when power on.
Watchdog: The watchdog is designed to monitor the module's output status to prevent the module
from communication problem or system halt due to unexpected situation
*User can save the module output value by using the command "ID5V" if the power is fails.

8
7.1 Set the module’s configuration *Must adjust the system configuration Switch.1 to ON ( See Page 6)
?ID (CHK)(cr)
!ID(CHK) (cr)
(cr)
CHK
DD
BB
PP
NN
ID
%
%IDNNPPBBDD(CHK)(cr)
Command Invalid
Command validResponse
Carriage return
Checksum
Data format (See 7.3)
Set new baud rate (See 7.2)
The Digital I/O module type define to 40
New address of setting from 00-FF(HEX)
Address of setting module 00-FF(HEX)
First leading code
Syntax
Description
Command
1152005760038400192009600480024001200Baud rate
0A09080706050403Code number
7.2 Baud rate (BB) setting
7.3 Data (DD) format setting
EX: Send command:”%0001400600”…..If you turn on the system setting switch , the ID will be reset to “00”,
New ID is “01”,D I/O type is “40” ,Bard-Rate:9600 ,Checksum setting disable is “00”, Response:”!01”.
EX: Send command:%0003400540….New ID=“03”,Bard-Rate=“4800”,Checksum=“Enable”,Response:”!03”.
*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-C24 standard package. (See the
page 21).
000000Checksum
0:Disable
1:Enable
Input counter
0:Rising
1:Falling
Function
01234567Bit

9
Command valid>(CHK)(cr)
?ID (CHK)(cr)
!ID(CHK) (cr)
(cr)
CHK
FD
PP
ID
#
#IDPPFD(CHK)(cr)
Command Invalid
Parameter invalid (*Command data error !)
Response
Carriage return
Checksum
F=0, D:Sent the data from 0-F output for relay channel
Output(relay) command parameter :00,0A Multi-Channel
:1L:Single-Channel (L=0-3)
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
8.1 Digital output data
*Multi-Channel mode (Output control for one BYTE)
EX: Send command :”#010A0F”…..Data=”0F”:DO0-DO3=“1111”, (RL1/RL2/RL3/RL4= ON).
Response:”>”……. Command valid.
EX: Send command:”#010008”…..Data=”08”:DO0-DO3=“0001”,(RL1/RL2/RL3:OFF/RL4:ON).
Response:”>”……. Command valid.
EX: Send command:”#01000G”…Data=“0G”…….Data error!.
Response:”!01”…….Parameter error!.
*Single-Channel mode( Output control for one BIT)
EX: Send command:”#011001”….. Data=”01”:DO0=“1”.
Response:”>”……. Command valid.
Send command:”#011201”….. Data=“01”:DO2=“1”.
Response:”>”……. Command valid.
Send command:#011300……Data=“00”:DO3=“0”.
Response:”>”……..Command valid.

10
9.2 Clear digital input N channel counter value
Command valid!ID(CHK)(cr)
?ID (CHK)(cr)
(cr)
CHK
N
C
ID
#
#IDCN(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
N=0-3 *Channel DI0-DI3 digital input
Clear N channel counter value to 0
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:”#01C2”…..Clear DI2 counter value to 0.
Response:”!01”.
*If counter’s value already been reset to 0 you must use command “#IDCS” to save the new
value in EEPROM again , or the module will load old value if power fail or reset.
EX: Send command:”#012”…..Read the TRP-C28 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”.
Command valid CCCCC from 0 – 65535 (DEC)!IDCCCCC(CHK)(cr)
?ID(CHK) (cr)
(cr)
CHK
N
ID
#
#IDN(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
Digital input channel from channel 0-3
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
9.1 Read digital input N channel counter value

11
10.2 Save all digital input counters value to EEPROM
Command valid!ID(CHK)(cr)
?ID (CHK)(cr)
(cr)
CHK
CS
ID
#
#IDCS(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
Save all channels counter to E2PROM
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
10.1 Clear all digital input counters value
Command valid!ID(CHK)(cr)
?ID (CHK)(cr)
(cr)
CHK
CW
ID
#
#IDCW(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
Clear all digital input counters value
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: 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.
EX: Send command:”#01CS”…..Save DI0-DI3 counters value to EEPROM.
Response:”!01”.
Then after power fail or reset
Send command:”#010”……..Read DI0 counter value.
Response:”!0100187”………..Last time save value is “187”.

12
11.1 Read digital input latched
Read digital input latchL
ACD:NO USE B:DI0-DI3 latch status!IDABCD(CHK)(cr)
?ID (CHK)(cr)
(cr)
CHK
S
ID
$
$IDLS(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
S=0 Latch logic 0
S=1 No use
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: 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. If
user read by the command “$ID6” in time A and time B , the response is that no key stoke. Use
command $IDLS can solve this problem , user may read the key stoke in time position A and B.
11.2 Clear digital input latched
Clear digital input latchC
Command valid!ID(CHK)(cr)
?ID (CHK)(cr)
(cr)
CHK
ID
$
$IDC(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:”$01C”…….Clear digital input latch .
Response:”!01 ”……………. …Latch have been clear.

13
12.1 Read digital input/output status
Read digital input/output status6
A=0, B=RL1-RL4 status, C=0,D=DI0-DI3 status!IDABCD(CHK)(cr)
?ID(CHK) (cr)
(cr)
CHK
ID
$
$ID6(CHK)(cr)
Command Invalid
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
12.2 Read the TRP-C28 configuration
Command valid PP: Digital I/O type=40
BB: Baud rate
DD=Data format (See data format table)
Module model BIT0-2=“000” TRP-C28
“001” TRP-C24
“010” TRP-C26
!IDPPBBDD(CHK)(cr)
Read configuration2
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
$
$ID2(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: 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”.
EX: 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-C28 (See Data format table),
000000Checksum 0:Disable
1:Enable
Input counter 0:rising
1:falling
Function
01234567Bit
Data format table

14
13.1 Reset the module status
Command valid!ID(CHK)(cr)
Command Invalid?ID(CHK) (cr)
Reset the TRP-C28 moduleRS
(cr)
CHK
ID
$
$IDRS(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
13.2 Read the module’s name
EX: Send command:$01M…Read the TRP-C28’s name.
Response:”!01TRPC28”……. The module’s name is “TRPC28”.
NNNNNN :The chars from 1 –6 chars!IDNNNNNN(CHK)(cr)
Reading TRP-C28’s nameM
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
$
$IDM(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:”$01RS”…….Reset TRP-C28.
Response:”!01 ”……… …………..Have been reset.
*Reset will clear all digital output status.

15
14.1 Read the module’s firmware version
MOD :The module type
MM:Release Month
YY : Release Year
!IDMODMMYY(CHK)(cr)
Command for reading module’s versionF
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
$
$IDF(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:$01F…Read the TRP-C28’s version.
Response:”!01C280605”……. The TRP-C28’s version date is “06/2005”.
14.2 Read the module reset status
S =1 has been reset
S=0 not been reset
!IDS(CHK)(cr)
Command for reading reset status5
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
$
$ID5(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:$015…Read the TRP-C28’s reset state .
Response:”!011”……. The TRP-C28 has been reset.
*If the module is system halt or detect abnormal voltage , the module will restart and reset the flag to “1” .

16
15.1 Change the module’s name
Command for rename TRP-C28’s nameO
Command valid!ID(CHK)(cr)
NN:TRP-C28’s name, Max.6 charactersNN
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
~
~IDONN(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:”~01OTRYCOM”….. Change the TRP-C28’s name become to “TRYCOM”.
Response:”!01”……. . Command valid.
Then send the command “$01M”…read the TRP-C28’s name.
Response:”!01TRYCOM”……. .The TRP-C28’s name is “TRYCOM”.
15.2 Set the module’s LED operating mode
Set the module’s LED operating modeLED
Command valid!ID(CHK)(cr)
A=0 Turn off all LEDS, when logic “1” ON
A=1 Turn on all LEDS, when logic “1” OFF
A
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
~
~IDLEDA(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send command:”~01LED0”….. Turn off all LED, when logic “1” ON.
Response:”!01”……. . Command valid.

17
16.1 Enable watchdog and set the timeout value
16.2 Disable watchdog
Watchdog EnableWE
Command valid!ID(CHK)(cr)
Command Invalid?ID(CHK)(cr)
(cr)
NN
ID
~
~IDWENN(CHK)(cr)
Response
Carriage return
Set the watchdog time(NN:00-FF) One Unit=0.1 Sec
FF: MAX. 25.5 Sec
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: 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!.
*When the module is in safe mode , any digital output command are invalid , you will get the
response “!IDWE” , which means the system is in safe mode, you can't change output status.
*Reset and power fail will not affect watchdog mode.
Disable watchdogWD
Command valid!ID(CHK)(cr)
Command Invalid?ID(CHK)(cr)
(cr)
ID
~
~IDWD(CHK)(cr)
Response
Carriage return
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send Command:”~01WD”….. Watchdog disable!.
Response:”!01”……. . Command valid, System LED will stop flashing!.

18
17.1 Read watchdog timeout value
17.2 System stand by (Host OK!)
Read watchdog timeout valueWR
W: watchdog
A=E: watchdog enable
D: watchdog disable or safe mode
NN: watchdog timeout value
!IDWANN (CHK)(cr)
!ID (CHK)(cr)
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
~
~IDWR(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
No Response
(cr)
CHK
**
~
~**(CHK)(cr)
Response
Carriage return
Checksum
Host ok!
First leading code
Syntax
description
Command
EX: Send Command:”~01WR”…. Read watchdog timeout value.
Response:” !01WD0F”……. . Command valid, set the watchdog timeout is “0F”..1.6 Sec.
*If watchdog is in enable , send the “Host Ok!” before watchdog timeout (B) the watchdog will re-
count, PWR LED will flashing after watchdog timeout.

19
18.1 Read power on/safe value
18.2 Save current digital output status to power on or safe mode
V=P: Power On
V=S: Safe value
V
Read power on/safe digital IO value4
A=0 B:DO0~DO3
C=0 D:DI0~ DI3
!IDABCD (CHK)(cr)
Command Invalid?ID(CHK)(cr)
(cr)
CHK
ID
~
~ID4V(CHK)(cr)
Response
Carriage return
Checksum
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
Save the current digital output is safe or power on
mode
5
Command valid!ID (CHK)(cr)
Command Invalid?ID(CHK)(cr)
(cr)
V
ID
~
~ID5V(CHK)(cr)
Response
Carriage return
V=P Power On
V=S Safe value
Address of setting module 00-FF(HEX)
First leading code
Syntax
description
Command
EX: Send Command:”#010A0F”…Relay output RL1~RL4= ON/ON/ON/ON
Response:” !01”……. . Command valid!
Then Send Command :” ~015P”….Set the relay output for power on ,.After power fail or reset ,
The module will load current DO status.
EX: Send Command:~014S……….Read safe mode digital output status.
Response:” !01080F”……. . Command valid, safe mode digital IO status is ”080F”.

20
19.1 Save current digital input status
19.2 Read synchronized data
No Response
(cr)
CHK
**
#
#**(CHK)(cr)
Response
Carriage return
Checksum
Save current digital IO status( All modules on line).
First leading code
Syntax
description
Command
Command valid A=1:Have been send”#**”
A=0:Have been read
BC: Digital output status
DE: Digital input status
!ABCDE00(CHK)(cr)
Address of setting module 00-FF(HEX)ID
Before send this command do not send the command
“#**”
?ID
(cr)
CHK
4
$
$ID4(CHK)(cr)
Response
Carriage return
Checksum
Read synchronized data
First leading code
Syntax
descrption
Command
EX: Send Command:”#**”………. Save current digital IO status of all modules on line.
EX: Send Command:”#**”……….Save current digital IO status( All modules on line).
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”.
Other manuals for TRP-C28
1
Other Trycom Technology Control Unit manuals