Trycom Technology TRP-C28 User Manual

TRP-C28
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
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.
1
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. For easy user access, TRP-C28 can enter configuration mode and self-test mode with outer dip-switch. TRP-C28 support both ASCII and Modbus protocol, with a full set of command, dual watch-dog, and auto reset function the module can be bi-directionally remote controlled by PC in ASCII or Modbus RTU protocol.
1-1.Features
Wide input range DC power supply.
Support ASCII and Modbus RTU protocol.
Supports baud rates from 1.2Kbps to 115.2 Kbps.
All 4 channels digital input ca be used as counter.
Digital input signal with 3750Vrms isolation protection.
Dual watchdog: Module’s firmware, host computer traffic.
LED for each channels working status.
DIN rail and panel mount support.
Configured and self-test by outer dip-switch.
Support screw terminal and external DC power adaptor.
1-2.Specifications
Input channel: 4 digital input channels.Input optical isolation: 3750 Vrms.Input logical level 0: ±1V (max).  Input logical level 1: ±4.0V ~ ±30V.  Communication interface: RS485.Communication speed: Baud rate from 1.2kbps to 115.2Kbps.Input impedance: 3Kohm.Distance: 500M (max).Digital Input can be used as counter channel: 4.Counter frequency: 100Hz.Output channel: 4 channel power reply outputs.Relay type: 2 Form A (RL1,RL2) , 2 Form C (RL3,RL4).Contact ratting: 6A/24V DC , 6A/120V AC , 5A/250V AC.Relay surge strength: 4000V.Relay operating time: 6ms.Relay operating life: 1 X 10(7).Dual watchdog: Hardware reset circuit, module and host operating status.
2
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.Humidity: 10-90% Non-condensing.Dimension: 151mm X 75mm X 26mm.Weight: 400g.
1-3. Panel Layout
1-4.Block Diagram
3
1-5. Pin Definitions
2. Communication Wiring
3. Wire Connection
4
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.
Default setting:
ID Address: 01,
Baud Rate: 9600,
DIO Mode Type: 40,
Checksum: Disable,
RS485 Communication data format: N, 8, 1.
Modbus Protocol (Factory)
5
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. Adjust the switch to “on on” position User may adjust the switch in power on status, no system reboot require.
Enter self- test mode
Adjust the switch to on on then reboot.
*INIT: ID=00, Baud-Rate: 9600, Data format: 00, Checksum=disable.
5. Function description
Power on mode: When power fail, system reset or host watchdog timeout will cause the
module reboot then into power on mode, the module’s digital output value will return to the before setting. And module can accept the host’s command to change the digital output value.
Dual Watchdog: Module self watchdog: The module’s watchdog is a hardware reset circuit while working in harsh or noisy environment, the module may be down by the external, The circuit may let the module to work continues and never halt. Host watchdog: The host watchdog is software function to monitor the module's output states to prevent the module from communication problem or system halt due to unexpected situation, It’s purpose is to prevent the RS485 network from communication problem or host halt. When the timeout interval expired, the module will turn all output to predefined safe value. This can
6
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.
6. TRPCOM Command Protocol Description
Command Format :”Leading Code”+”ID Address”+”Command”+”CHK”+(cr). Response Format :”Leading Code”+”ID Address”+”Data”+”CHK”+(cr).
7. How to Calculate the Checksum
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 “.
7
8. Command List
Command List Function Description Page Index
%IDNNPPBBDD(CHK)(cr) Set the module’s configuration See 8-1 ~ 8-3
#IDPPFD(CHK)(cr) Digital output data See 8-4
#IDN(CHK)(cr) Read digital input N channel counter value See 8-5
#IDCN(CHK)(cr) Clear digital input N channel counter value See 8-6
#IDCW(CHK)(cr) Clear all digital input counters value See 8-7
#IDCS(CHK)(cr) Save all digital input counters value to EEPROM See 8-8
$IDLS(CHK)(cr) Read digital input latched See 8-9
$IDC(CHK)(cr) Clear digital input latched See 8-10
$ID6(CHK)(cr) Read digital input/output status See 8-11 $ID2(CHK)(cr) Read the TRP-C28M configuration See 8-12 $IDRS(CHK)(cr) Reset the module status See 8-13 $IDM(CHK)(cr) Read the module’s name See 8-14
$IDF(CHK)(cr) Read the module’s firmware version See 8-15
$ID5(CHK)(cr) Read the module reset status See 8-16
~IDONN(CHK)(cr) Change the module’s name See 8-17
~IDLEDA(CHK)(cr) Set the module’s LED operating mode See 8-18
~IDWENN(CHK)(cr) Enable watchdog and set the timeout value See 8-19
~IDWD(CHK)(cr) Disable watchdog See 8-20
~IDWR(CHK)(cr) Read watchdog timeout value See 8-21
~**(CHK)(cr) System stand by (Host OK!) See 8-22
~ID4V(CHK)(cr) Read power on/safe value See 8-23
~ID5V(CHK)(cr) Save current digital output status to power on or safe mode See 8-24
#**(CHK)(cr) Save current digital input status See 8-25
$ID4(CHK)(cr) 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.
8
8-1. Configure TRP-C28
Command %IDNNPPBBDD(CHK)(cr)
Syntax
Description
% First leading code
ID Address of setting module 00-FF(HEX)
NN New address of setting from 00-FF(HEX)
PP The Digital I/O module type define to 40
BB Set new baud rate (See 8-2)
DD Data format (See 8-3)
CHK Checksum
(cr) Carriage return
Response !ID(CHK)(cr) Command valid
?ID(CHK)(cr) Command Invalid
8-2 Baud rate setting (BB)
8-3 Data format setting (DD)
Example:
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”.
Example:
Send command:%000340054 New ID=“03”,Bard-Rate=“4800”,Checksum=“Enable”,Response:”!03”.
9
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”….. 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
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”.
8-6. Clear digital input N channel counter value
Example:
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.
11
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. Response:”!01”.
Then after power fail or reset Send command:”#010”……..Read DI0 counter value. Response:”!0100187”………..Last time save value is “187”.
12
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. 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.
8-10.Clear digital input latched
Example:
Send command:”$01C”…….Clear digital input latch . Response:”!01 ”……………. …Latch have been clear.
13
Loading...
+ 29 hidden pages