wiki:Docs/Prog/Protocol

Mainboard Protocol

2008-02-14 Don Wilson Messages needed, expressed as communications from OPI board to main board Message format information:

Messages are encoded as variable length binary data with CRC-16 validation

Mainboard will provide acknowledgement response. If nak reponse or no response after timeout OPI board may request again.

Record format (records to and from mainboard):

Byte

1 Multidrop address (record length)

<message>

...

(record length – 2) CRC-16


Message formats:

(If mainboard detects CRC fail for any request response message will be 15h <eeee> (eeee = error code))

(Second byte of request identifies scale/analog, serial port number, option card slot number for many requests)

Summary:

HexCharDescription
41AGet wt with audit
322Get number of chars in COM queue and handshake status
333Set COM port baud rate
344Set COM port RTS
355Set COM port data bits, parity, and stop bits
366Get COM port baud rate, data bits, parity, and stop bits
377Set default scale for serial port formats
42BCalibrate specified step
43CRepeat wt specified interval or upon weight change
44DSet date/time
45ESet tare for specified scale to specified weight
46FSet tare for specified scale to current scale weight
47GSet specified serial port record format
48HOne time output to serial port
49IGet I/O status
4AJRepeat I/O status at specified interval
4BKRepeat I/O status at specified interval or upon status change
4CLSet I/O output
4DMRepeat specified output format at specified interval to specified serial port
4ENSet output condition for specified serial port
4FOGet calculated calibration values
50PGet standard calibration parameters
51QSet standard calibration parameters
52RRepeat wt specified interval
53SGet mainboard time/date
54TGet audit trailing beginning and ending IDs
55UGet weight, time/date for specified audit ID
56VGet version
57WGet one time scale wt
58XGet multiple-interval calibration parameters
59YSet multiple-interval calibration parameters
5AZZero specified scale
5B[Set condition for I/O output
5C\One time output specified format to serial port
5D]Repeat time/date at specified interval
5E^Switch mainboard to update mode
60`Erase flash except boot loader (only available when in update mode)
61aNext block binary data (only available when in update mode)
62bSwitch from boot program to main program
63cSet scale current units
64dGet number of events in event logIncrement calibration counter
65eIncrement configuration counterGet current event counter value
66fRead calibration and configuration countersRead entry from event log
67gAdd entry to event log
68hGet serial port input buffer
69iSet DeviceNet params
6AJGet DeviceNet params
6BkAdjust span – Up
6ClAdjust span – Down
6DmEnable/disable opi debug mode
6EnDo single point calibration (must be preceded by Calibration step 1)
6FoSet DeviceNet serial number
70pRead DeviceNet serial number
71qSet multipoint calibration parameters
721rGet multipoint calibration parameters
73sChange mainboard/OPI board baud rate
74tChange main board/OPI board multi-drop mode

<vvvv> = version four byte unsigned integer assumed decimal 2 places

<zzzzzzzzzz> = mainboard status

Byte 01h = 2-byte unsigned integer status (0000h no error, …)

bit 15 = 1 = executing from boot area, = 0 = executing from main program area

bit 14 = 1 = the checksum of the boot area failed

bit 13 = 1 = the checksum of the main program area failed

The program will not switch from the boot area unless both the boot area and the main program

area checksums have passed.

03h = 1-byte unsigned integer total number of options cards installed

04h = 2-byte bit-mask identifying which card slots are occupied (card1 = bit0 …)

(Following bytes are unsigned integer number of each type of option card)

06h Scale Interface Board (SIB)
07h Dual Serial (SIO)
08h Dual Parallel (PIO)
09h Smart Scale Interface (SSI)
0Ah Allen/Bradley interface (ABI)
0Bh Network Interface Card (NIC)
0Ch Digital Input/Output (DIO)
0Dh Smart Cell (SCD)
0Eh Digital to Analog Converter (DAC)
0Fh Counter/Input (CIC)
10h (CAN778)
11h High-Speed Scale Interface Board (HSSIB)
12h Modem (MODEM)

<xxxxxxxxxx> = option card type and status

Byte 01h = type of card (00h = no card installed, 01h = SIB, 02h = SIO, 03h = PIO, …)

Byte 02h = 2-byte unsigned integer status (0000h no error, …)

Byte 04h – card specific status …

<pppppppppp> = calibration parameters

Version of calibration parameters 0001h – 2 byte integer

Capacity - 4 byte IEEE float

Interval digit - 1 byte integer

Motion range grads - 1 byte integer

Sample rate - 1 byte integer

Filter number - 1 byte integer

Filter break range - 1 byte integer

Filter value - 1 byte integer

Zero tracking range - 1 byte integer (10=.5 grad, 1-9 = 1-9 grads)

Interval decimal precision - 1 byte integer

Units - 1 byte integer (1=lb only, 2=kg only, 3=lb and kg, 4=custom)

Flags - 1 byte integer (bit 0 = 1 = zero limit, bit 1 = 1 = usa flag, bit 2 = 1 = 2nd order linearization)

Conversion factor from primary units to secondary units - 4 byte IEEE float (usually set to .453592 for lb to kg)

Secondary weight units interval digit - 1 byte integer

Secondary weight units interval decimal precision - 1 byte integer

Number of calibration points - 1 byte integer

Totalizer – 1 byte integer
Flags2 – 1 byte integer OIML=1 (0 = OIML no, 1 = OIML yes) (global – not per scale)

Primary units label – 6 bytes null terminated

Secondary units label – 6 bytes null terminated

<hhhhhhhhhh> = multiple interval calibration parameters

Version of multiple interval calibration parameters 0001h – 2 byte integer

low interval range capacity - 4 byte IEEE float

middle interval range capacity - 4 byte IEEE float

middle interval range decimal precision - 1 byte integer

high interval range decimal precision - 1 byte integer

middle interval range interval digit - 1 byte integer

high interval range interval digit - 1 byte integer

middle interval range converted units decimal precision - 1 byte integer

high interval range converted units decimal precision - 1 byte integer

middle interval range converted units interval digit - 1 byte integer

high interval range converted units interval digit - 1 byte integer

<MMMMMMMMMM> = multipoint calibration parameters or 2nd order linearization parameters or Guardian linearization parameters (variation of 2nd order linearization)

Version of parameters 0064h - 2 byte integer (0064h=1.00)

conversion factor 1 or 2nd order conversion factor or 0 for Guardian linearization - 4 byte IEEE float

conversion factor 2 or Guardian linear coefficient - 4 byte IEEE float

conversion factor 3 or Guardian 2nd order coefficient - 4 byte IEEE float

frequency 0 - 4 byte IEEE float

frequency 1 - 4 byte IEEE float

frequency 2 - 4 byte IEEE float

intercept 0 or Guardian tweak low weight (in grads) - 4 byte IEEE float

intercept 1 or Guardian tweak high weight (in grads) - 4 byte IEEE float

intercept 2 or Guardian tweak weight (in grads) - 4 byte IEEE float

<jjjjjjjjjj> = calculated calibration values

Version of calculated calibration parameters 0001h – 2 byte integer

Conversion factor ('C' numbers) - 4 byte IEEE float

Calibrated dead load - 4 byte IEEE float

2nd conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)

3rd conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)

4th conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)

1st calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

2nd calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

3rd calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

1st calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

2nd calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

3rd calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)

dead load raw counts - 4 byte IEEE float (calculated during calibration)

<ddddddd> = time / date

2 bytes unsigned integer year

1 byte unsigned integer month

1 byte unsigned integer day of month

1 byte unsigned integer hour

1 byte unsigned integer minutes

1 byte unsigned integer seconds

<eeee> = error code – four byte unsigned integer

<ii> = interval – 2 byte – first byte value, second byte decimal places

<gggg> = gross weight – four byte IEEE float

<tttt> = tare weight – four byte IEEE float

<nnnn> = net weight – four byte IEEE float

<wwww> = specific weight – four byte IEEE float

<u> = units - one byte (00h= primary, 01h=secondary)

<s> = status – one byte – bitmapped

01h = motion

02h = overcap

04h = below zero

08h = center zero

10h = error

20h = keypad tare

<aaaa> = audit trail ID – four byte unsigned long integer

<bbbb> = beginning audit trail ID – four byte unsigned long integer

<llll> = ending audit trail ID – four byte unsigned long integer

<mmmm> = millisecond interval – 4 byte unsigned integer – zero stop repeat

<oooo> = digital input/output – 4 byte bit-field

<kkkk> = digital output mask – 4 byte bit-field mask to designate which outputs are to be affected by the <oooo> value

<cccccccccc> = condition expression – variable length binary data – see explanation below

<ffffffffff> = serial output format string – variable length ASCII character codes similar to “X” option 788 open command

<rrrrrrrrrr> = raw bytes to send to serial port / or mainboard update – variable length ASCII character codes

<q> = single byte unsigned integer percent

<y> = single byte record format number

<#> = single byte scale ID

<@@@@@@> = mainboard update parameters

2 bytes unsigned integer version

4 bytes unsigned integer total bytes of binary data file to be sent

<!!!> = device net parameters

1 byte unsigned integer enable ( 0 = disabled, 1 enabled)

1 byte unsigned integer node address (0 – 63)

1 byte unsigned integer baud rate (0 = 125K, 1 = 250K, 2 = 500K)

<QQ> = 2-byte number of bytes in serial port receive queue

<H> = 1-byte mainboard serial port status (bit 0 = 1 = rts active, bit 1 = 1 = cts active, bit 2 = 0 = rs-485 rx enabled, bit 3 = 1 = rs-485 tx enabled)

<BB> = baud rate (1152=115200, 576=57600, 384=38400, 288=28800, 192=19200, 144=14400, 96=9600, 48=4800, 24=2400, 12=1200)

<R>=0=rts inactive,=1=rts active

<D> = number of serial port data bits (5, 6, 7 or 8) or 0 to leave data bits unchanged

<P> = serial port parity (‘n’=none, ‘e’=even, ‘o’=odd, ‘m’=mark, ‘s’=space) or 0 to leave parity unchanged

<S> = serial port stop bits (1/16ths of a bit) or 0 to leave parity unchanged

for 5 data bits, <SS> can range from 17 through 32 (1.0625 stop bits through 2.0 stop bits)

for 6-8 data bits, <SS> can range from 9 through 16 (0.5625 stop bits through 1.0 stop bits) or from 25 through 32 (1.5625 stop bits through 2.0 stop bits)

<W> = event counters version

<T> = event counters status: 00h if OK, 01h if event counters eeprom is corrupted

<CC> = calibration event counter

<NN> = configuration event counter

<EEEEEEE> - date and time of last calibration event

2 bytes unsigned integer year

1 byte unsigned integer month

1 byte unsigned integer day of month

1 byte unsigned integer hour

1 byte unsigned integer minutes

1 byte unsigned integer seconds

<FFFFFFF> - date and time of last configuration event

2 bytes unsigned integer year

1 byte unsigned integer month

1 byte unsigned integer day of month

1 byte unsigned integer hour

1 byte unsigned integer minutes

1 byte unsigned integer seconds

<GGGG> - DeviceNet serial number (in the range 0x10000000 through 0x1fffffff)

<b> OPI board comm. baud rate

0 = default 500,000 bps

1 = 250,000 bps

2 = 128,000 bps

3 = 115,200 bps

<m> OPI board comm.. multi-drop mode

0= default use multi-drop

1= No multi-drop mode simply first byte received is length of data to follow

DescriptionRequestResponse
Get mainboard version and status56h 30h56h 30h 06h <vvvv> <zzzzzzzzzz>
Get version, type and status of option card in slot 156h 31h56h 31h 15h <eeee> (NAK error)

or

56h 31h 06h <vvvv> <xxxxxxxxxx>
Get version, type and status of option card in slot 256h 32h56h 32h 15h <eeee> (NAK error)

or

56h 32h 06h <vvvv> <xxxxxxxxxx>
Get mainboard time/date53h 30h53h 30h 06h <ddddddd>
Repeat time/date at sepecified interveral5Dh 30h <mmmm>5Dh 30h 06h <ddddddd> (immediate response)

or

5Dh 30h 06h (ack if interval is zero and stop repeat)

5Dh 30h 01h <ddddddd> (repeat at specified interval)
Set mainboard time/date44h 30h <ddddddd>44h 30h 15h <eeee> (NAK error)

or

44h 30h 06h (ACK successfully changed time/date)
Set current units for scale 163h 31h <u>44h 31h 15h <eeee> (NAK error)

or

44h 31h 06h (ACK successfully changed units)
Get one time scale 1 wt57h 31h57h 31h 15h <eeee> (NAK error)

or

57h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>
Get one time scale 2 wt57h 32h57h 32h 15h <eeee> (NAK error)

or

57h 32h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>
Get one time scale 12 wt57h 3Ch57h 3Ch 15h <eeee> (NAK error)

or

57h 3Ch 06h <ii> <gggg> <tttt> <nnnn> <u> <s>
Get one time total scale weight (if totalizing enabled)57h 7Fh57h 7Fh 15h <eeee> (NAK error)

or

57h 7Fh 06h <ii> <gggg> <tttt> <nnnn> <u> <s> <#1> <g1> <s1> <#2> <g2> <s2> <#3> <g3> <s3> …
Get one time scale 1 wt with audit trail41h 31h41h 31h 15h <eeee> (NAK error)

or

41h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s> <aaaa> <tttttt>
Repeat wt from scale 1 at specified interval52h 31h <mmmm>52h 31h 15h <eeee> (NAK error)

or

52h 31h 06h (ACK if interval is zero and stop repeat weight)

or

52h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>

(Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)
Repeat wt from scale 1 at specified interval or immediately upon weight change43h 31h <mmmm>43h 31h 15h <eeee> (NAK error

or

43h 31h 06h (ACK if interval is zero and stop repeat weight)

or

43h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s> (repeat at requested interval or immediately when weight or status change occurs)

(Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)
Zero scale 15Ah 31h5Ah 31h 15h <eeee> (NAK error)

or

5Ah 31h 06h (ACK, scale zeroed successfully)
Set tare for scale 145h 31h <tttt>45h 31h 15h <eeee> (NAK error)

or

45h 31h 06h (ACK, scale tared successfully)
Set tare scale 1 to scale 1 current wt46h 31h46h 31h 15h <eeee> (NAK error)

or

46h 31h 06h (ACK, scale tared successfully)
Get beginning and ending audit trail record IDs54h 30h54h 30h 15h <eeee> (NAK error)
or


54h 30h 06h <bbbb> <llll>
Get weight and time/date for audit ID55h 30h <aaaa>55h 30h 15h <eeee> (NAK error)
or
55h 30h 06h <gggg> <tttt> <nnnn> <u> <s> <aaaa> <ddddddd> <#>
Get standard calibration parameters for scale 150h 31h50h 31h 15h <eeee> (NAK error)

or
50h 31h 06h <ppppppppp>
Set standard calibration parameters for scale 151h 31h <ppppppppp>51h 31h 15h <eeee> (NAK error)

or

51h 31h 06h (ACK successfully set parameters)
Get multiple-interval calibration parameters for scale 158h 31h58h 31h 15h <eeee> (NAK error)

or
58h 31h 06h <hhhhhhhhhh>
Set multiple-interval calibration parameters for scale 159h 31h <hhhhhhhhhh>59h 31h 15h <eeee> (NAK error)

or

59h 31h 06h (ACK successfully set parameters)
Get calculated calibration values for scale 14Fh 31h4Fh 31h 15h <eeee> (NAK error)

or
4Fh 31h 06h <jjjjjjjjjj>
Calibration scale 142h 31h <wwww> <s> (wwww = wt on scale, s = step)42h 31h 15h <eeee> (NAK error)

or

42h 31h 06h (ACK calibration step started)

As progress completes

42h 31h 01h <q> (q = percent complete, p = 100d step complete)
Get one time I/O status record for I/O board 149h 31h49h 31h 15h <eeee> (NAK error)

or

49h 31h 06h <oooo>
Repeat I/O status for board 14Ah 31h <mmmm>4Ah 31h 15h <eeee> (NAK error)

or

4Ah 31h 06h (ACK, if interval 0 – stop repeat)

or

4Ah 31h 06h <oooo> (repeat at specified interval)

(Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)
Repeat I/O status for board 1 at specified interval or immediately if status change4Bh 31h <mmmm>4Bh 31h 15h <eeee> (NAK error)

or

4Bh 31h 06h (ACK, if interval 0 – stop repeat)

or

4Bh 31h 06h <oooo> (repeat at specified interval or immediately upon status change – If interval FFFFFFFF only output on status change)

(Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)
Set output status for I/O board 14Ch 31h <oooo> <kkkk>4Ch 31h 15h <eeee> (NAK error)

or

4Ch 31h 06h (ACK successfully set outputs)

Set output for I/O board 1 when specified condition is true5Bh 31h <oooo> <kkkk> <cccccccccc>5Bh 31h 15h <eeee> (NAK error)

or

5Bh 31h 06h (ACK successfully set outputs)

Set serial port record format47h 30h <y> <ffffffffff>47h 30h 15h <eeee> (NAK error)

or

47h 30h 06h (ACK successfully set format)

One time output specified data to mainboard serial port48h 30h <rrrrrrrrrr>48h 30h 15h <eeee> (NAK error)

or

48h 30h 06h (ACK successfully sent data)

One time output specified data to first option card serial port48h 31h <rrrrrrrrrr>48h 31h 15h <eeee> (NAK error)

or

48h 31h 06h (ACK successfully sent data)

One time output specified data to mainboard CAN bus port (mainboard test software only)48h 7Fh <rrrrrrrrrr>48h 7Fh 15h <eeee> (NAK error)

or

48h 7Fh 06h (ACK successfully sent data)

Get input buffer from mainboard serial port68h 30h68h 30h 15h <eeee> (NAK error)

or

68h 30h 06h <rrrrrrrrrr>
Get input buffer from first option card serial port68h 31h68h 31h 15h <eeee> (NAK error)

or

68h 31h 06h <rrrrrrrrrr>
Get input buffer from mainboard CAN bus port (mainboard test software only)68h 7Fh68h 7Fh 15h <eeee> (NAK error)

or

68h 7Fh 06h <rrrrrrrrrr>
One time output specified format to mainboard serial port5Ch 30h <y>5Ch 30h 15h <eeee> (NAK error)

or

5Ch 30h 06h (ACK successfully sent data based on format)

One time output specified format to first option card serial port5Ch 31h <y>5Ch 31h 15h <eeee> (NAK error)

or

5Ch 31h 06h (ACK successfully sent data based on format)

Repeat output specified format to mainboard serial port at specified interval4Dh 30h <y> <mmmm>4Dh 30h 15h <eeee> (NAK error)

or

4Dh 30h 06h (ACK mainboard repeats ouput to serial port at specified interval, or stop repeat if interval set to zero)
Repeat output specified format to first option card serial port at specified interval4Dh 31h <y> <mmmm>4Dh 31h 15h <eeee> (NAK error)

or

4Dh 31h 06h (ACK mainboard repeats ouput to serial port at specified interval, or stop repeat if interval set to zero)
Set output condition for specified format for mainboard serial port4Eh 30h <y> <ccccccccc>4Eh 30h 15h <eeee> (NAK error)

or

4Eh 30h 06h (ACK mainboard monitors for condition specified and sends format 1 serial output when true)
Set output condition for specified format for first option card serial port4Eh 31h <y> <ccccccccc>4Eh 31h 15h <eeee> (NAK error)

or

4Eh 31h 06h (ACK mainboard monitors for condition specified and sends format 1 serial output when true)
Switch the main board to update mode5Eh 30h5Eh 30h 06h (ACK)
Erased main board flash except for the boot loader (in update mode only)60h 30h <@@@@@@>60h 30h 15h <eeee> (NAK if error)

or

60h 30h 06h (ACK from bootloader and setup for flash update)
Send next block of binary data for mainboard flash (in update mode only)61h 30h <rrrrrrrrrrrr>60h 30h 15h <eeee> (NAK if error)

or

61h 30h 06h (ACK)
Switch main board from boot program to main program62h 30h62h 30h 15h <eeee> (NAK if error)

or

62h 30h 06h (ACK)
Set DeviceNet parameters69h 30h <!!!>69h 30h 15h <eeee> (NAK if error)

or

69h 30h 06h (ACK)
Get DeviceNet parameters6Ah 30h6Ah 30h 15h <eeee> (NAK if error)

or

6Ah 30h 06h <!!!>
Adjust scale 1 span up6Bh 31h6Bh 31h 15h <eeee> (NAK if error)

or

6Bh 31h 06h
Adjust scale 1 span down6Ch 31h6Ch 31h 15h <eeee> (NAK if error)

or

6Ch 31h 06h
Get number of chars inmain board serial portqueue and handshake status32h 30h32h 30h 15h <eeee> (NAK if error)

or

32h 30h 06h <QQ><H>
...
Set main board serial port baud rate33h 30h <BB>33h 30h 15h <eeee> (NAK if error)

or

33h 30h 06h
...
Set or clear main board serial port rts34h 30h <R>34h 30h 15h <eeee> (NAK if error)

or

34h 30h 06h
...
Set main board serial port data bits, parity, and stop bits35h 30h <D><P><S>35h 30h 15h <eeee> (NAK if error)

or

35h 30h 06h
...
Get main board serial port baud rate, data bits, parity, and stop bits36h 30h36h 30h 15h <eeee> (NAK if error)

or

36h 30h 06h <BBBB><DD><PP><SS>
...
Set scale 1 as the default scale for serial port formats37h 30h 31h37h 30h 15h <eeee> (NAK if error)

or

37h 30h 06h
...
Set totalizer as the default scale for serial port formats37h 30h 7Fh37h 30h 15h <eeee> (NAK if error)

or

37h 30h 06h
Increment calibration counter64h 30h64h 30h 15h <eeee> (NAK if error)

or

64h 30h 06h
Increment configuration counter65h 30h65h 30h 15h <eeee> (NAK if error)

or

65h 30h 06h
Read calibration and configuration counters66h 30h66h 30h 06h <W><T><CC><NN><EEEEEEE><FFFFFFF>
Enable/disable OPI debug mode6Dh 30h 01 (enable)

or

6Dh 03h 00 (disable)
6Eh 30h 06h
Single point calibration of scale 16Eh 31h6Eh 30h 15h <eeee> (NAK if error)

or

6Eh 30h 06h

Note: calibration step 1 must be done first. If the calibration weightwas zero, then a new dead load will be established. If the calibration weight was not zero, then a new span will be calculated using the original dead load.
...
Set DeviceNet serial number6Fh 30h <GGGG>6Fh 30h 15h <eeee> (NAK if error)

or

6Fh 30h 06h
Get DeviceNet serial number70h 30h70h 30h 15h <eeee> (NAK if error)

or

70h 30h 06h <GGGG>
Set multipoint calibration parameters for scale 171h 31h <MMMMMMMMMM>71h 31h 15h <eeee> (NAK if error)

or

71h 31h 06h
...
Get multipoint calibration parameters for scale 172h 31h72h 31h 15h <eeee> (NAK if error)

or

72h 32h 06h <MMMMMMMMMM>
Change OPI board comm. baud rate73h 30h <b>73h 30h 15h <eeee> (NAK if error)
or


73h 30h 06h (ACK sent before baud rate change)
Change OPI board multi-drop mode74h 30h <m>74h 30h 15h <eeee> (NAK if error)
or


74h 30h 06h (ACK sent before multi-drop change)

Error Codes:

Low eight bits bitmapped for some responses

BitZero ScaleGet wt w/ audit
0MotionMotion
1Below zeroBelow zero
2Over capacityOver capacity
3Out of range
4
5
6
7

00010000h = CRC error

00010100h = Unrecognized command

00010200h = Specified scale not present

00010300h = Parameter out of range

00010400h = Specified serial output format not defined

00010500h = Calibration timeout

00010600h = Calibration error

00010700h = Expression error

00010800h = Request to stop repeat when specified repeat is not in progress

00020100h = Hardware error

Conditions:

Infix expression such as:

(gross weight of scale one greater than 5000 and digital I/O board one input 4 equal to one)

GROSS1 > 5000 && DIO1-4 = 1

Converted to postfix:

GROSS1 5000 > DIO1-4 1 = &&

Converted to binary:

F1h (scale gross) 01h (scale number) F5h (literal float) ffff (4-byte IEEE 5000.0) FDh (operator) 3Eh (operator >) F4h (I/O) 0104h (dio 1-4) F6h (literal integer) nnnn (4-byte integer 1) FDh (operator) 3Dh (operator =) FDh (operator) 41n (operator logical AND)

F1h 01h F5h <ffff> FDh 3Eh F4h 01h 04h F6h <nnnn> FDh 3Dh FDh 41h

F1h = scale ID gross wt 1-byte follows

F2h = scale ID tare wt 1-byte follows

F3h = scale ID net wt 1-byte follows

F4h = dio ID 2-byte follows (first byte card number, second byte input number)

F5h = literal float 4-bytes follow

F6h = literal integer 4-bytes follow

F7h = literal string follows – variable length first byte length

FAh = comm port receive buffer port ID 1-byte follows

(This allows on-demand to be configured such as: FAh 01h F7h 01h 05h FDh 3Dh = [comm 1 rcv = ENQ])

FDh = operator 1-byte follows

3Ch <

3Dh = (Eqauality – not assignment)

3Eh >

4Ch ‘L’ <=

47h ‘G’ >=

4Eh ‘N’ !=

41h ‘A’ && (Logical And)

4Fh ‘O’
(Logical Or)

26h & (Bitwise And)

7Ch | (Bitwise Or)

2Ah *

2Bh +

2Dh –

2Fh /

Last modified 16 years ago Last modified on 03/19/09 09:31:56
Note: See TracWiki for help on using the wiki.