[ Home ] [ Products ] [ Data Sheets ] [ Support ] [ FAQ ] [ Sales Offices ] [ Request Catalog ] [ Contact duTec ]
Instruction
Format
> NN
C [ ]
[ ] cr
cr |
|||||
All instructions |
Underlined Data may be saved in EEprom using the eF instruction
Response
Format : (2 Pass Communications Protocol)
A [ ] [
] cr
[ ] |
cr |
||
Data Field |
All responses |
Response message, N __, returned
if checksum error or other fault
Note : Some seldom used instructions are not shown in this document,
refer to User Manual.
SETUP
Instructions
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
A |
Power-up Clear |
|
Yes |
||
B |
Reset |
|
Yes |
||
C |
Turn-Around Delay |
|
Yes |
||
F |
Identify Type |
|
Yes |
||
G |
Configure Analog vs. Digital |
|
Yes |
||
G |
Configure All Modules |
|
Yes |
||
H |
Configure As Inputs |
|
Yes |
||
I |
Configure As Outputs |
|
Yes |
||
j |
Read Module Config |
|
Yes |
||
v |
Read Chassis ID |
|
No |
||
Y |
Read Firmware Version |
|
No |
||
c |
Set Network Baudrate 7 |
|
No |
||
E |
Protocol |
-2 Pass 7 -4 Pass 7 |
Yes Yes |
||
m |
Watchdog Pos/Delay |
-Digital |
Yes |
||
D |
Watchdog Pos/Delay |
-Analog |
Yes |
||
m |
Watchdog Pos/Levels |
-Analog |
Yes |
||
eD |
WDM, Del Multiplier * 256 |
-Enable |
No |
||
dD |
|
-Disable |
No |
||
eJ |
WDM, Del Multiplier * 256 |
-Enable |
No |
||
dJ |
|
-Disable |
No |
||
n |
TRM, Timer Res Multiplier |
|
Yes |
||
eA |
Address Tag |
-Enable |
No |
||
dA |
|
-Disable |
No |
||
eC |
Chk Sum Tag |
-Enable |
No |
||
dC |
|
-Disable |
No |
||
eE |
Error Msgs |
-Off |
No |
||
dE |
|
-On |
No |
||
eF |
Save Setup |
-Enable |
No |
||
dF |
|
-Disable |
No |
||
a |
Var Add |
-Set 7 |
No |
||
b |
|
-Read |
No |
SERIAL I/O
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
N |
Local Port Baud Rate |
|
No |
||
O |
|
No |
|||
P |
Msg For Host |
-No 1 |
No |
||
|
|
-Yes |
No |
||
PP |
|
-Partial |
No |
||
PA |
|
-Control Codes |
No |
ANALOG INPUTS
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
L |
Input Value |
-Read |
Yes |
||
g |
Offsets |
-Calculate |
Yes |
||
W |
|
-Set |
Yes |
||
h |
|
-Calc & Set |
Yes |
||
X |
Gain (Slope) |
-Calculate |
Yes |
||
Y |
|
-Set |
Yes |
||
Z |
|
-Calc & Set |
Yes |
||
N |
Range Limits |
-Set |
Yes |
||
O |
|
-Read Errors |
Yes |
||
Q |
|
-Clear Errors |
Yes |
||
P |
|
-Read & Clear |
Yes |
||
a |
Min Values |
-Read |
Yes |
||
b |
|
-Clear |
Yes |
||
c |
|
-Read & Clear |
Yes |
||
d |
Max Values |
-Read |
Yes |
||
e |
|
-Clear |
Yes |
||
f |
|
-Read & Clear |
Yes |
||
T |
Averages |
-Start |
Yes |
||
I |
|
-Complete? |
Yes |
||
U |
|
-Read |
Yes |
||
o |
|
-Read linear oC |
Yes |
||
k |
Set Temp Sensor Type |
|
Yes |
||
l |
Temp |
-Read linear oC |
Yes |
ANALOG OUTPUTS
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
J |
Level Value |
-Set All Same |
Yes |
||
K |
|
-Read |
Yes |
||
S |
|
-Set Selected |
Yes |
||
V |
Waveforms |
-Squarewave |
Yes |
||
|
|
(improved) -Triangle -Up |
Yes |
||
|
|
-Dn |
Yes |
||
|
|
-Sawtooth -Up |
Yes |
||
|
|
-Dn |
Yes |
||
|
|
-Ramp -Up |
Yes |
||
|
|
-Dn |
Yes |
||
|
|
-Terminate |
Yes |
DIGITAL INPUTS
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
M |
Read All Modules |
|
>DDM[ ] |
Yes |
|
eH |
De-bounce |
-Enable] |
>DDeHen[ |
No |
|
dH |
|
-Disable |
>DDdHe[ ] |
No |
|
|
Pulse Duration Measurements |
|
|
|
|
a |
Trig Edges |
Yes |
|||
b |
|
Yes |
|||
c |
|
Yes |
|||
d |
|
-Complete? |
Yes |
||
e |
Duration Ctr |
-Read 5 |
Yes |
||
g |
|
-Clear |
Yes |
||
f |
|
-Read & Clear 5 |
Yes |
||
eG |
Pulse Accum |
-Enable |
No |
||
y |
|
-Enable |
No |
||
dG |
|
-Disable |
No |
||
z |
|
-Disable |
No |
||
|
Pulse Counting |
|
|
|
|
W |
Counters |
-Read |
Yes |
||
Y |
|
-Clear |
Yes |
||
X |
|
-Read & Clear |
Yes |
||
U |
|
-Start |
Yes |
||
V |
|
-Stop |
Yes |
||
T |
|
-Start/Stop |
Yes |
||
eI |
Freq counter |
-Enable |
No |
||
dI |
|
-Disable |
No |
||
|
Edge Detection |
|
|
|
|
N |
Edge Latch |
-Set All |
Yes |
||
O |
|
-Set OFF-TO-ON |
Yes |
||
P |
|
-Set ON-TO-OFF |
Yes |
||
Q |
|
-Read |
Yes |
||
S |
|
-Clear |
Yes |
||
R |
|
-Read & Clear |
Yes |
||
|
Event Logging |
|
|
|
|
wA |
|
-Set/Reset |
|
||
wB |
|
-Read Buffer |
No |
||
wC |
|
-Clear |
No |
||
|
|
|
|
|
|
DIGITAL OUTPUTS
|
Function |
|
Instruction |
Response |
Opto-22 Equiv. |
J |
Outputs |
ON/OFF All Mod |
Yes |
||
K |
Outputs |
-ON |
Yes |
||
L |
|
-OFF |
Yes |
||
Z |
Waveforms |
|
|
|
|
|
One Shot |
Yes |
|||
|
|
-OFF 5 |
Yes |
||
|
Delayed |
Yes |
|||
|
|
-OFF 5 |
Yes |
||
|
Squarewave 5 |
|
Yes |
||
|
Fast Squarewave |
8-bit 5 |
Yes |
||
|
|
16-bit 5 |
No |
||
|
Terminate |
|
Yes |
||
h |
Re-trigger time delay |
|
Yes |
||
i |
Pulses |
50% duty cycle 5 |
Yes |
||
k |
Start Pulse |
-ON 5 |
Yes |
||
l |
|
-OFF 5 |
Yes |
1Maximum message length is 80 characters
2Use \ to generate a CRLF within a message.
3Non-printing ASCII characters can be transmitted using a / before the 2 Hex character ASCII value.
4Adjacent pulse durations can be accumulated by using
5 Affected by Setup n - TRM, Time Resolution Multiplier
6 Waveform action initiated by Digital J, K or L
7 Saved on EEprom.
Digital y after setting up Trigger edges Digital a,b,or c.
ADDRESSING
(See below for hardware setup)
Each I/O PLEXER contains up to 6 units, each with its
own address; a two letter address code is shown
for each instruction; these indicate which of the 6 addresses are used; they
are listed below:
MC - Master Unit Control Functions Factory setting 00H *
MD - Master Unit Digital I/ O Functions Factory setting 40H *
MA - Master Unit Analog I/O Functions Factory setting 80H *
E1 - 1st Digital Expander I/O Functions Factory setting C0H *
E2 - 2nd Digital Expander I/O Functions Factory setting D0H *
E3 - 3rd Digital Expander
I/O Functions Factory setting E0H *
Some instructions have counterparts in more than one unit:
DD - This instruction exists for MD, E1, E2, E3
IO - This instruction exists for MD, MA, E1, E2, E3
AU - This instruction exists for MC, MD, MA, E1, E2, E3
LU - Applies to all units addressed in this I/O PLEXER, use MC
* See below for setup
INSTRUCTION/RESPONSE Data Fields
c,d,e Multiple Position Fields
Each module position maps to a digit in a 16 digit bit number.
Each digit or bit is a 1 or 0 only. This number is then converted to 4 digit numbers. Each four numbers is converted to a hex digit.
For e leading hex zeroes can be omitted.
Module #: |
15 14 13 12 |
11 10 9 8 |
7 6 5 4 |
3 2 1 0 |
Hex Digit: |
- 1st Char - |
- 2nd Char - |
- 3rd Char - |
- 4th Char - |
Bit Pattern: |
0000 |
0001 |
0010 |
0011 |
0100 |
0101 |
0110 |
0111 |
Hex Digit: |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Bit Pattern: |
1000 |
1001 |
1010 |
1011 |
1100 |
1101 |
1110 |
1111 |
Hex Digit: |
8 |
9 |
A |
B |
C |
D |
E |
F |
In all position fields, 1's specify which positions are affected
and 0's are disregarded unless they are listed below.
c,d,e In instructions, 1's specify which positions are affected -
for Setup m, analog, which outputs are set to specified values
for Setup m, digital, which outputs are to be set ON
for Setup G to IO, which modules are configured as outputs
for Setup G to MC, which modules are Analog
for Digital a, which input durations trigger on positive edges
for Digital J, which modules are to be ON
for Digital N, which inputs latch ON-TO-OFF
for Digital T, which inputs start counting
In instructions, 0's specify which positions are affected or -
for Setup G, which modules are configured as inputs
for Setup H,I which modules are not to be configured
for Setup m, digital, which outputs are to be set OFF
for Digital a, which input durations trigger on negative edges
for Digital J, which modules are to be OFF
for Digital N, which inputs latch OFF-TO-ON
for Digital eG,dG which inputs have pulse-accum. enabled/disabled
for Digital eH,dH which inputs are to be de-bounce enabled/disabled
for Digital T, which inputs stop counting
In responses, 1's indicate:
for Setup j, which positions are outputs
for Digital d, Analog i, which positions are complete
for Digital M, which modules are ON
for Digital Q, R, which positions have been triggered
for c of Analog O,P which positions are over limits
for d of Analog O,P which positions are under limits
For Delay in mSec: 0 10 100 500
Set f to: 0 1 2 3
g Watchdog Delay (Setup D) 0.2 Sec to 46.6 Hrs
Convert desired delay to sec; if <655.36, divide by 0.01 Sec; convert
to hex (14H to FFFFH); if >655.35,
watchdog multiplier (Setup eD) instruction must be used; then divide
desired period by 2.56 Sec;
convert to hex (14H to FFFFH)
h Baud Rate Local RS-232 Port (Setup N) and Network Baud Rate (Setup c)
For Baud Rate: 300 600 1200 2400 4800 9600 19200 38400
Set h to: e f h j l m n o
or Set h to: 003 006 012 024 048 096 192 384
j Number of Analog Averaging Samples
Analog T -convert 1-65535 samples to 4 hex digits for j
k Analog Input Level/Offset/Slope/Average - 4 Hex digits
Analog
a,c,d,f,U,L - Convert each k
to decimal; subtract 4096;divide by 4095; out of range if <0 or >1;
multiply
by module range for value; no input if ????
Analog g,h -Convert each k to decimal; divide by 4095; if >8 subtract 16; multiply by module range for offset
Analog o, -Convert k to decimal;divide by 16 for oC;
if >2048oC subtract 4096oC. If ???? returned,
Analog k was incorrect
Analog W -Divide desired offset by module range; if negative add 16; multiply by 4095; convert to hex.
Analog X,Z -Convert each k to decimal; divide by 4096
Analog Y -Multiply desired slope by 4096;convert to hex
l,m Range Limit/Output Amplitude 3 Hex Digits
Analog J,N,S; Setup m -Divide desired level by module range; multiply by 4095; convert to hex digits for l;
Analog N high limit is l; low limit is m
Analog K -Convert each l to decimal; divide by 4095; multiply by module
range
n Counts/Delays/Durations/Periods
Digital e,f -Convert each n to decimal; multiply by (0.01 *TRM) for time in seconds.
Digital eH -Divide desired filter period (in seconds) by (0.01*TRM); convert to 4 hex digits
Digital eI -Divide desired timebase period (in seconds) by (.1*TRM) Convert to 2 Hex digits (0Ah = Hz)
* Digital i -Convert number of pulses, n (1-65535) to hex
* Digital k,l -Divide desired period (in seconds) by (.01*TRM); convert to 1-4 hex digits
* Setup m, -Divide desired watchdog delay (in seconds) by (.01*WDM); convert to 0-4 hex digits
* Digital X,W -Convert each n to decimal for counts
* Digital Z -Divide desired period in seconds by (.01*TRM); convert to 1-4 hex digits
* n=0 or 1 has special case, see User Manual
Waveforms (Analog V) Amplitude Determination-Peak & Valley
p Waveform peak or maximum amplitude
q Waveform valley or minimum amplitude
Divide desired max (for p) or min (for q) by module range; multiply by 4095; convert to 3 hex digits.
Waveforms (Analog V) Period Determination
r Sawtooth Period/Ramp Duration
Multiply period (in seconds) by 10; convert to 4 hex digits
s Squarewave & Triangle Wave Period
Multiply period (in seconds) by 5; convert to 4 hex digits
t Squarewave On Period (Digital i,
ZeL, ZeM, ZeN)
u Squarewave Off Period (Digital ZeL, ZeM, ZeN)
For Digital ZeL divide period in seconds by 2.56; convert to 2 hex digits
For Digital i, ZeM divide period in seconds by (0.01*TRM); convert 2 Hex digits.
For Digital ZeN divide period in seconds by (0.01*TRM); convert
4 Hex digits
v Number of samples contained in response.
w Individual sample 4 hex digits representing 16-bits
x Temperature Sensor Type (Analog k)
|
----- Thermocouples ------ |
-- RTD -- |
- Sensor - |
||||||||||||
Sensor: |
E |
J |
J-1 |
K |
K-1 |
R |
S |
S-1 |
T |
T-1 |
T-2 |
100 |
100-1 |
590 |
590-1 |
Set x to: |
09H |
04H |
14H |
05H |
15H |
06H |
07H |
17H |
08H |
18H |
28H |
03H |
13H |
01H |
11H |
y Timer Resolution
Multiplier, TRM (Setup n)
The basic 0.01 second resolution of ALL instructions noted
with 5 are multiplied by y of Setup n; default value is 1H;
range is from 1H to FFH (1-255)
z 00 01 02 03
Setup F DD MA MC --
ß Firmware version number x.yy.z
W Chassis ID
(Type, No. of Expanders, and firmware version)
COMMUNICATION PROTOCOL:
There are two communications protocols, 2 Pass and 4 Pass, both
of which use only ASCII characters;
units are shipped in 2 Pass; the most commonly used. The instructions
transmitted by the host
are identical for both protocols, they differ in their responses;
2 Pass: A correctly received instruction
returns an A (and data if any) and instruction is executed;
an incorrectly received message returns an response message, and the instruction
is not executed
4 Pass: A received instruction is
echoed and not executed until host returns an E (non E's cancel
instruction)
Automatic Calculation Method
The Setup eC command puts correct checksum at the end of the
N02 error message; assemble instruction for which checksum is
needed in usual manner, but enter XX for [ ]; the N02 response
message has the correct checksum tagged on.
Manual Calculation Method
See Appendix B of the I/O
PLEXER Protocol Manual.
Defeat Checksum
Enter ?? in the [ ] position of instructions; a checksum error
message will never be returned; a RISKY PRACTICE
A special response negates transmitted instruction
N00 Power has been off N06 Comm. watchdog time out
N01 Invalid command N07 Invalid data
N02 Checksum error N08 Invalid module
N02*[Correct Chksum]* N09 Battery backed restart "Ok"
N03 Content > 80 char N10 & N11 Lcl Cntrl Func error
N04 Non-printable char N12 Local Port buffer full
N05 Invalid instruction length
8 With 1 start, 1 stop, 8 data bits, no parity, operates, as shipped at 300 baud; IOP
local port transmits on 2, receives on 3, 5 is common
PRECAUTIONS:
NEVER USE:
An upper case letter O for the number zero (0)
A lower case letter l for the number one (1)
An upper case character for lower case one
[ Home ] [ Products ] [ Data Sheets ] [ Support ] [ FAQ ] [ Sales Offices ] [ Request Catalog ] [ Contact duTec ]
© Copyright 1996-2001 duTec. All rights reserved.
For feedback on this site, please send email to:
webmaster@dutec.net