PicoSearch

[ Home ] [ Products ] [ Data Sheets ] [ Support ] [ FAQ ] [ Sales Offices ] [ Request Catalog ] [ Contact duTec ]

dutec logo and link to home page

Protocol - Instruction Set


Instruction Format
> NN C [ ] [ ] cr

> 

NN

C

 [ ]

 [ ]

cr

Start of
instruction character

Address
(analog, digital, etc);
in upper case ITALICS

Instruction;
1 or 2 characters,
in BOLD

Variable
Data Fields;
in lower case italics

Checksum;
2 characters

All instructions
terminate with a
carriage return

Underlined Data may be saved in EEprom using the eF instruction

Response Format : (2 Pass Communications Protocol)
A [ ] [ ] cr

A

[ ]

[ ]

cr

Acknowledgement
of correctly
received instruction

Data Field
depends on Function
and Instruction type

Checksum if
data field present

All responses
terminate with
a carriage return

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

>AUA[ ]

A

Yes

B

Reset

>AUB[ ]

A

Yes

C

Turn-Around Delay

>LUCf[ ]

A

Yes

F

Identify Type

>AUF[ ]

Az[ ]

Yes

G

Configure Analog vs. Digital

>MCGc[ ]

A

Yes

G

Configure All Modules

>IOGe[ ]

A

Yes

H

Configure As Inputs

>IOHe[ ]

A

Yes

I

Configure As Outputs

>IOIe[ ]

A

Yes

j

Read Module Config

>IOj[ ]

Ac[ ]

Yes

v

Read Chassis ID

>MCv[ ]

AW[ ]

No

Y

Read Firmware Version

>MCY[ ]

Aß[ ]

No

c

Set Network Baudrate 7

>MCch[ ]

Ah[ ]

No

E

Protocol

-2 Pass 7

-4 Pass 7

>LUEO[ ]

>LUE1[ ]

A

A

Yes

Yes

m

Watchdog Pos/Delay

-Digital

>DDmcn[ ]

A

Yes

D

Watchdog Pos/Delay

-Analog

>MADcg[ ]

A

Yes

m

Watchdog Pos/Levels

-Analog

>MAmc....l[ ]

A

Yes

eD

WDM, Del Multiplier * 256

-Enable

>MCeD[ ]

A

No

dD

-Disable

>MCdD[ ]

A

No

eJ

WDM, Del Multiplier * 256

-Enable

>IOeD[ ]

A

No

dJ

-Disable

>IOdD[ ]

A

No

n

TRM, Timer Res Multiplier

>DDny[ ]

A

Yes

eA

Address Tag

-Enable

>MCeA[ ]

A

No

dA

-Disable

>MCdA[ ]

A

No

eC

Chk Sum Tag

-Enable

>MCeC[ ]

A

No

dC

-Disable

>MCdC[ ]

A

No

eE

Error Msgs

-Off

>MCeE[ ]

A

No

dE

-On

>MCdE[ ]

A

No

eF

Save Setup

-Enable

>MCeF[ ]

A

No

dF

-Disable

>MCdF[ ]

A

No

a

Var Add

-Set 7

>MCaMCMDMAE1E2E3[ ]

AMCMDMAE1E2E3[ ]

No

b

-Read

>MCb[ ]

AMCMDMAE1E2E3[ ]

No

top of page

SERIAL I/O

Function

Instruction

Response

Opto-22 Equiv.

N

Local Port Baud Rate

>MCNh[ ]

A

No

O

Host-To-Slave Msg 1 2 3

>MCO[Msg][ ]

A

No

P

Msg For Host

-No 1

>MCP[ ]

A

No

-Yes

>MCP[ ]

A[Msg][ ]

No

PP

-Partial

>MCPP[ ]

A[Msg][ ]

No

PA

-Control Codes

>MCPA[ ]

A[Msg][ ]

No

top of page

ANALOG INPUTS

Function

Instruction

Response

Opto-22 Equiv.

L

Input Value

-Read

>MALe[ ]

A....k[ ]

Yes

g

Offsets

-Calculate

>MAg[ ]

A....k[ ]

Yes

W

-Set

>MAWc....k[ ]

A

Yes

h

-Calc & Set

>MAhe[ ]

A....k[ ]

Yes

X

Gain (Slope)

-Calculate

>MAXe[ ]

A....k[ ]

Yes

Y

-Set

>MAYc....k[ ]

A

Yes

Z

-Calc & Set

>MAZe[ ]

A....k[ ]

Yes

N

Range Limits

-Set

>MANclm[ ]

A

Yes

O

-Read Errors

>MAO[ ]

Acd[ ]

Yes

Q

-Clear Errors

>MAQe[ ]

A

Yes

P

-Read & Clear

>MAPe[ ]

Acd[ ]

Yes

a

Min Values

-Read

>MAae[ ]

A....k[ ]

Yes

b

-Clear

>MAbe[ ]

A

Yes

c

-Read & Clear

>MAce[ ]

A....k[ ]

Yes

d

Max Values

-Read

>MAde[ ]

A....k[ ]

Yes

e

-Clear

>MAee[ ]

A

Yes

f

-Read & Clear

>MAfe[ ]

A....k[ ]

Yes

T

Averages

-Start

>MATcj[ ]

A

Yes

I

-Complete?

>MAi[ ]

Ac[ ]

Yes

U

-Read

>MAUe[ ]

A....k[ ]

Yes

o

-Read linear oC

>MAoe[ ]

A....k[ ]

Yes

k

Set Temp Sensor Type

>MAkcx[ ]

A

Yes

l

Temp

-Read linear oC

>MAle[ ]

A....k[ ]

Yes

top of page

ANALOG OUTPUTS

Function

Instruction

Response

Opto-22 Equiv.

J

Level Value

-Set All Same

>MAJcl[ ]

A

Yes

K

-Read

>MAKe[ ]

A....l[ ]

Yes

S

-Set Selected

>MASc....l[ ]

A

Yes

V

Waveforms

-Squarewave

>MAVc4pqs[ ]

A

Yes

(improved) -Triangle -Up

>MAVc1pqs[ ]

A

Yes

-Dn

>MAVc5pqs[ ]

A

Yes

-Sawtooth -Up

>MAVc3pqr[ ]

A

Yes

-Dn

>MAVc7pqr[ ]

A

Yes

-Ramp -Up

>MAVc2pqr[ ]

A

Yes

-Dn

>MAVc6pqr[ ]

A

Yes

-Terminate

>MAVc0[ ]

A

Yes

top of page

DIGITAL INPUTS

Function

Instruction

Response

Opto-22 Equiv.

M

Read All Modules

>DDM[ ]

Ac[ ]

Yes

eH

De-bounce

-Enable]

>DDeHen[

A

No

dH

-Disable

>DDdHe[ ]

A

No

Pulse Duration Measurements

a

Trig Edges

-Set All 4 5

>DDae[ ]

A

Yes

b

-Set Pos 4 5

>DDbe[ ]

A

Yes

c

-Set Neg 4 5

>DDce[ ]

A

Yes

d

-Complete?

>DDd[ ]

Ac[ ]

Yes

e

Duration Ctr

-Read 5

>DDee[ ]

A....n[ ]

Yes

g

-Clear

>DDge[ ]

A

Yes

f

-Read & Clear 5

>DDfe[ ]

A....n[ ]

Yes

eG

Pulse Accum

-Enable

>DDeGe[ ]

A

No

y

-Enable

>DDye[ ]

A

No

dG

-Disable

>DDdGe[ ]

A

No

z

-Disable

>DDze[ ]

A

No

Pulse Counting

W

Counters

-Read

>DDWe[ ]

A....n[ ]

Yes

Y

-Clear

>DDYe[ ]

A

Yes

X

-Read & Clear

>DDXe[ ]

A....n[ ]

Yes

U

-Start

>DDUe[ ]

A

Yes

V

-Stop

>DDVe[ ]

A

Yes

T

-Start/Stop

>DDTe[ ]

A

Yes

eI

Freq counter

-Enable

>DDeIen[ ]

A

No

dI

-Disable

>DDdIe[ ]

A

No

Edge Detection

N

Edge Latch

-Set All

>DDNe[ ]

A

Yes

O

-Set OFF-TO-ON

>DDOe[ ]

A

Yes

P

-Set ON-TO-OFF

>DDPe[ ]

A

Yes

Q

-Read

>DDQ[ ]

Ac[ ]

Yes

S

-Clear

>DDSe[ ]

A

Yes

R

-Read & Clear

>DDRe[ ]

Ac[ ]

Yes

Event Logging

wA

-Set/Reset

>DDwAe[ ]

A[ ]

wB

-Read Buffer

>DDwBe[ ]

Av....w[ ]

No

wC

-Clear

>DDwCe[ ]

A

No

top of page

DIGITAL OUTPUTS

Function

Instruction

Response

Opto-22 Equiv.

J

Outputs

ON/OFF All Mod

>DDJe[ ]

A

Yes

K

Outputs

-ON

>DDKe[ ]

A

Yes

L

-OFF

>DDLe[ ]

A

Yes

Z

Waveforms

One Shot

-ON 5 6

>DDZeHn[ ]

A

Yes

-OFF 5

>DDZeJn[ ]

A

Yes

Delayed

-ON 5 6

>DDZeIn[ ]

A

Yes

-OFF 5

>DDZeKn[ ]

A

Yes

Squarewave 5

>DDZeLtu[ ]

A

Yes

Fast Squarewave

8-bit 5

>DDZeMtu[ ]

A

Yes

16-bit 5

>DDZeNtu[ ]

A

No

Terminate

>DDZeG[ ]

A

Yes

h

Re-trigger time delay

>DDhe[ ]

A

Yes

i

Pulses

50% duty cycle 5

>DDictn[ ]

A

Yes

k

Start Pulse

-ON 5

>DDkcn[ ]

A

Yes

l

-OFF 5

>DDlcn[ ]

A

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.

top of page

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

top of page

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

f Turn Around Delay (Setup C)

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)

top of page

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)

CHECKSUMS:

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

SPECIAL RESPONSES:

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


top of page

[ 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