Changes between Version 1 and Version 2 of Docs/Prog/Protocol


Ignore:
Timestamp:
03/19/09 09:31:56 (15 years ago)
Author:
kyle_s
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Protocol

    v1 v2  
    11= Mainboard Protocol =
     22008-02-14 Don Wilson
     3Messages needed, expressed as communications from OPI board to main board
     4Message format information:
     5            Messages are encoded as variable length binary data with CRC-16 validation
     6
     7Mainboard will provide acknowledgement response. If nak reponse or no response after timeout OPI board may request again.
     8
     9 
     10
     11 
     12
     13Record format (records to and from mainboard):
     14
     15 
     16
     17Byte
     18
     19 
     20
     211          Multidrop address (record length)
     22
     23 
     24
     25<message>
     26
     27...
     28
     29 
     30
     31(record length – 2)      CRC-16
     32
     33 
     34
     35 
     36
     37[[BR]]Message formats:
     38
     39(If mainboard detects CRC fail for any request response message will be 15h <eeee> (eeee = error code))
     40
     41(Second byte of request identifies scale/analog, serial port number, option card slot number for many requests)
     42
     43 
     44
     45Summary:
     46
     47||Hex||Char||Description||
     48||~~~~~~41~~~~~~||~~~~~~A~~~~~~||~~~~~~Get wt with audit~~~~~~||
     49||__32__||__2__||__Get number of chars in COM queue and handshake status__||
     50||__33__||__3__||__Set COM port baud rate__||
     51||__34__||__4__||__Set COM port RTS__||
     52||__35__||__5__||__Set COM port data bits, parity, and stop bits__||
     53||__36__||__6__||__Get COM port baud rate, data bits, parity, and stop bits__||
     54||__37__||__7__||__Set default scale for serial port formats__||
     55||42||B||Calibrate specified step||
     56||43||C||Repeat wt specified interval or upon weight change||
     57||44||D||Set date/time||
     58||45||E||Set tare for specified scale to specified weight||
     59||46||F||Set tare for specified scale to current scale weight||
     60||47||G||Set specified serial port record format||
     61||48||H||One time output to serial port||
     62||49||I||Get I/O status||
     63||4A||J||Repeat I/O status at specified interval||
     64||4B||K||Repeat I/O status at specified interval or upon status change||
     65||4C||L||Set I/O output||
     66||4D||M||Repeat specified output format at specified interval to specified serial port||
     67||4E||N||Set output condition for specified serial port||
     68||4F||O||Get calculated calibration values||
     69||50||P||Get standard calibration parameters||
     70||51||Q||Set standard calibration parameters||
     71||52||R||Repeat wt specified interval||
     72||53||S||Get mainboard time/date||
     73||~~~~~~54~~~~~~||~~~~~~T~~~~~~||~~~~~~Get audit trailing beginning and ending IDs~~~~~~||
     74||~~~~~~55~~~~~~||~~~~~~U~~~~~~||~~~~~~Get weight, time/date for specified audit ID~~~~~~||
     75||56||V||Get version||
     76||57||W||Get one time scale wt||
     77||58||X||Get multiple-interval calibration parameters||
     78||59||Y||Set multiple-interval calibration parameters||
     79||5A||Z||Zero specified scale||
     80||5B||[||Set condition for I/O output||
     81||5C||\||One time output specified format to serial port||
     82||5D||]||Repeat time/date at specified interval||
     83||5E||!^||Switch mainboard to update mode||
     84||60||`||Erase flash except boot loader__ (only available when in update mode)__||
     85||61||a||Next block binary data__ (only available when in update mode)__||
     86||62||b||Switch from boot program to main program||
     87||63||c||Set scale current units||
     88||64||d||~~~~~~Get number of events in event log~~~~~~__Increment calibration counter__||
     89||65||e||__Increment configuration counter__~~~~~~Get current event counter value~~~~~~||
     90||66||f||__Read calibration and configuration counters__~~~~~~Read entry from event log~~~~~~||
     91||~~~~~~67~~~~~~||~~~~~~g~~~~~~||~~~~~~Add entry to event log~~~~~~||
     92||68||h||Get serial port input buffer||
     93||69||i||Set !DeviceNet params||
     94||6A||J||Get !DeviceNet params||
     95||6B||k||Adjust span – Up||
     96||6C||l||Adjust span – Down||
     97||__6D__||__m__||__Enable/disable opi debug mode__||
     98||__6E__||__n__||__Do single point calibration (must be preceded by Calibration step 1)__||
     99||__6F__||__o__||__Set !DeviceNet serial number__||
     100||__70__||__p__||__Read !DeviceNet serial number__||
     101||__71__||__q__||__Set multipoint calibration parameters__||
     102||__72~~~~1~~~~__||__r__||__Get multipoint calibration parameters__||
     103||__73__||__s__||__Change mainboard/OPI board baud rate__||
     104||__74__||__t__||__Change main board/OPI board multi-drop mode__||
     105
     106 
     107
     108<vvvv> = version four byte unsigned integer assumed decimal 2 places
     109
     110 
     111
     112<zzzzzzzzzz> = mainboard status
     113
     114            Byte 01h = 2-byte unsigned integer status  (0000h no error, …)
     115
     116                        bit 15 = 1 = executing from boot area, = 0 = executing from main program area
     117
     118bit 14 = 1 = the checksum of the boot area failed
     119
     120bit 13 = 1 = the checksum of the main program area failed
     121
     122                        The program will not switch from the boot area unless both the boot area and the main program
     123
     124 area checksums have passed.
     125
     126 
     127
     128            03h = 1-byte unsigned integer total number of options cards installed
     129
     130            04h = 2-byte bit-mask identifying which card slots are occupied (card1 = bit0 …)
     131
     132            (Following bytes are unsigned integer number of each type of option card)
     133
     13406h Scale Interface Board (SIB)[[BR]]07h Dual Serial (SIO)[[BR]]08h Dual Parallel (PIO)[[BR]]09h Smart Scale Interface (SSI)[[BR]]0Ah Allen/Bradley interface (ABI)[[BR]]0Bh Network Interface Card (NIC)[[BR]]0Ch Digital Input/Output (DIO)[[BR]]0Dh Smart Cell (SCD)[[BR]]0Eh Digital to Analog Converter (DAC)[[BR]]0Fh Counter/Input (CIC)[[BR]]10h (CAN778)[[BR]]11h High-Speed Scale Interface Board (HSSIB)[[BR]]12h Modem (MODEM)[[BR]]
     135
     136<xxxxxxxxxx> = option card type and status
     137
     138            Byte 01h = type of card (00h = no card installed, 01h = SIB, 02h = SIO, 03h = PIO, …)
     139
     140            Byte 02h = 2-byte unsigned integer status (0000h no error, …)
     141
     142            Byte 04h – card specific status  …
     143
     144                       
     145
     146 
     147
     148<pppppppppp> = calibration parameters
     149
     150            Version of calibration parameters 0001h – 2 byte integer
     151
     152Capacity - 4 byte IEEE float
     153
     154Interval digit - 1 byte integer
     155
     156Motion range grads - 1 byte integer
     157
     158Sample rate - 1 byte integer
     159
     160Filter number - 1 byte integer
     161
     162Filter break range - 1 byte integer
     163
     164Filter value - 1 byte integer
     165
     166Zero tracking range - 1 byte integer (10=.5 grad, 1-9 = 1-9 grads)
     167
     168Interval decimal precision - 1 byte integer
     169
     170Units - 1 byte integer (1=lb only, 2=kg only, 3=lb and kg, 4=custom)
     171
     172Flags - 1 byte integer (bit 0 = 1 = zero limit, bit 1 = 1 = usa flag, bit 2 = 1 = 2nd order linearization)
     173
     174Conversion factor from primary units to secondary units - 4 byte IEEE float (usually set to .453592 for lb to kg)
     175
     176Secondary weight units interval digit - 1 byte integer
     177
     178Secondary weight units interval decimal precision - 1 byte integer
     179
     180Number of calibration points - 1 byte integer
     181
     182Totalizer – 1 byte integer[[BR]]Flags2 – 1 byte integer  OIML=1 (0 = OIML no, 1 = OIML yes) (global – not per scale)
     183
     184Primary units label – 6 bytes null terminated
     185
     186Secondary units label – 6 bytes null terminated
     187
     188 
     189
     190 
     191
     192<hhhhhhhhhh> = multiple interval calibration parameters
     193
     194            Version of multiple interval calibration parameters 0001h – 2 byte integer
     195
     196low interval range capacity - 4 byte IEEE float
     197
     198middle interval range capacity - 4 byte IEEE float
     199
     200middle interval range decimal precision - 1 byte integer
     201
     202high interval range decimal precision - 1 byte integer
     203
     204middle interval range interval digit - 1 byte integer
     205
     206high interval range interval digit - 1 byte integer
     207
     208middle interval range converted units decimal precision - 1 byte integer
     209
     210high interval range converted units decimal precision - 1 byte integer
     211
     212middle interval range converted units interval digit - 1 byte integer
     213
     214high interval range converted units interval digit - 1 byte integer
     215
     216 
     217
     218__<MMMMMMMMMM> = multipoint calibration parameters or 2^nd^ order linearization parameters or Guardian linearization parameters (variation of 2^nd^ order linearization)__
     219
     220__            Version of parameters 0064h - 2 byte integer (0064h=1.00)__
     221
     222__            conversion factor 1 or 2^nd^ order conversion factor or 0 for Guardian linearization - 4 byte IEEE float__
     223
     224__            conversion factor 2 or Guardian linear coefficient - 4 byte IEEE float__
     225
     226__            conversion factor 3 or Guardian 2^nd^ order coefficient - 4 byte IEEE float__
     227
     228__            frequency 0 - 4 byte IEEE float__
     229
     230__            frequency 1 - 4 byte IEEE float__
     231
     232__            frequency 2 - 4 byte IEEE float__
     233
     234__            intercept 0 or Guardian tweak low weight (in grads) - 4 byte IEEE float__
     235
     236__            intercept 1 or Guardian tweak high weight (in grads) - 4 byte IEEE float__
     237
     238__            intercept 2 or Guardian tweak weight (in grads) - 4 byte IEEE float__
     239
     240__ __
     241
     242<jjjjjjjjjj> = calculated calibration values
     243
     244            Version of calculated calibration parameters 0001h – 2 byte integer
     245
     246Conversion factor ('C' numbers) - 4 byte IEEE float
     247
     248Calibrated dead load - 4 byte IEEE float
     249
     2502nd conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)
     251
     2523rd conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)
     253
     2544th conversion factor - 4 byte IEEE float (calculated as part of calibration if use multi-point cal or 2nd order linearization)
     255
     2561st calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     257
     2582nd calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     259
     2603rd calibration point frequency - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     261
     2621st calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     263
     2642nd calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     265
     2663rd calibration point intercept - 4 byte IEEE float (calculated as part of calibration if use multi-point cal)
     267
     268dead load raw counts - 4 byte IEEE float (calculated during calibration)
     269
     270 
     271
     272 
     273
     274<ddddddd> = time / date
     275
     276            2 bytes unsigned integer year
     277
     278            1 byte unsigned integer month
     279
     280            1 byte unsigned integer day of month
     281
     282            1 byte unsigned integer hour
     283
     284            1 byte unsigned integer minutes
     285
     286            1 byte unsigned integer seconds
     287
     288 
     289
     290<eeee> = error code – four byte unsigned integer
     291
     292 
     293
     294<ii> = interval – 2 byte – first byte value, second byte decimal places
     295
     296 
     297
     298<gggg> = gross weight – four byte IEEE float
     299
     300<tttt> = tare weight – four byte IEEE float
     301
     302<nnnn> = net weight – four byte IEEE float
     303
     304<wwww> = specific weight – four byte IEEE float
     305
     306 
     307
     308<u> = units  - one byte (00h= primary, 01h=secondary)
     309
     310<s> = status – one byte – bitmapped
     311
     31201h = motion
     313
     31402h = overcap
     315
     31604h = below zero
     317
     31808h = center zero
     319
     32010h = error
     321
     32220h = keypad tare
     323
     324 
     325
     326<aaaa> = audit trail ID – four byte unsigned long integer
     327
     328 
     329
     330'''<'''bbbb> = beginning audit trail ID – four byte unsigned long integer
     331
     332 
     333
     334<llll> = ending audit trail ID – four byte unsigned long integer
     335
     336 
     337
     338<mmmm> = millisecond interval – 4 byte unsigned integer – zero stop repeat
     339
     340 
     341
     342<oooo> = digital input/output – 4 byte bit-field
     343
     344 
     345
     346<kkkk> = digital output mask – 4 byte bit-field mask to designate which outputs are to be affected by the <oooo> value
     347
     348 
     349
     350<cccccccccc> = condition expression – variable length binary data – see explanation below
     351
     352 
     353
     354<ffffffffff> = serial output format string – variable length ASCII character codes similar to “X” option 788 open command
     355
     356 
     357
     358<rrrrrrrrrr> = raw bytes to send to serial port / or mainboard update  – variable length ASCII character codes
     359
     360 
     361
     362<q> = single byte unsigned integer percent
     363
     364 
     365
     366<y> = single byte record format number
     367
     368 
     369
     370<#> = single byte scale ID
     371
     372 
     373
     374<@@@@@@> = mainboard update parameters
     375
     376            2 bytes unsigned integer version
     377
     378            4 bytes unsigned integer total bytes of binary data file to be sent
     379
     380 
     381
     382<!!!> = device net parameters
     383
     384            1 byte unsigned integer enable ( 0 = disabled, 1 enabled)
     385
     386            1 byte unsigned integer node address (0 – 63)
     387
     388            1 byte unsigned integer baud rate (0 = 125K, 1 = 250K, 2 = 500K)
     389
     390 
     391
     392__<QQ> = 2-byte number of bytes in serial port receive queue__
     393
     394__ __
     395
     396__<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)__
     397
     398__ __
     399
     400__<BB> = baud rate (1152=115200, 576=57600, 384=38400, 288=28800, 192=19200, 144=14400, 96=9600, 48=4800, 24=2400, 12=1200)__
     401
     402__ __
     403
     404__<R>=0=rts inactive,=1=rts active__
     405
     406__ __
     407
     408__<D> = number of serial port data bits (5, 6, 7 or 8) or 0 to leave data bits unchanged__
     409
     410__ __
     411
     412__<P> = serial port parity (‘n’=none, ‘e’=even, ‘o’=odd, ‘m’=mark, ‘s’=space) or 0 to leave parity unchanged__
     413
     414__ __
     415
     416__<S> = serial port stop bits (1/16ths of a bit) or 0 to leave parity unchanged__
     417
     418__             for 5 data bits, <SS> can range from 17 through 32 (1.0625 stop bits through 2.0 stop bits)__
     419
     420__             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)__
     421
     422__ __
     423
     424__<W> = event counters version__
     425
     426__ __
     427
     428__<T> = event counters status:  00h if OK, 01h if event counters eeprom is corrupted__
     429
     430__ __
     431
     432__<CC> = calibration event counter__
     433
     434__<NN> = configuration event counter__
     435
     436__ __
     437
     438__<EEEEEEE> - date and time of last calibration event__
     439
     440__            2 bytes unsigned integer year__
     441
     442__            1 byte unsigned integer month__
     443
     444__            1 byte unsigned integer day of month__
     445
     446__            1 byte unsigned integer hour__
     447
     448__            1 byte unsigned integer minutes__
     449
     450__            1 byte unsigned integer seconds__
     451
     452__ __
     453
     454__<FFFFFFF> - date and time of last configuration event__
     455
     456__            2 bytes unsigned integer year__
     457
     458__            1 byte unsigned integer month__
     459
     460__            1 byte unsigned integer day of month__
     461
     462__            1 byte unsigned integer hour__
     463
     464__            1 byte unsigned integer minutes__
     465
     466__            1 byte unsigned integer seconds__
     467
     468__ __
     469
     470__<GGGG> - !DeviceNet serial number (in the range 0x10000000 through 0x1fffffff)__
     471
     472__ __
     473
     474__<b>      OPI board comm. baud rate__
     475
     476__            0 = default 500,000 bps__
     477
     478__            1 = 250,000 bps__
     479
     480__            2 = 128,000 bps__
     481
     482__            3 = 115,200 bps__
     483
     484__ __
     485
     486__<m>     OPI board comm.. multi-drop mode__
     487
     488__            0= default use multi-drop__
     489
     490__            1= No multi-drop mode simply first byte received is length of data to follow__
     491
     492__ __
     493
     494 
     495
     496||'''Description'''||'''Request'''||'''Response'''||
     497||Get mainboard version and status||56h 30h||56h 30h 06h <vvvv> <zzzzzzzzzz>||
     498||Get version, type and status of option card in slot 1||56h 31h||56h 31h 15h <eeee> (NAK error)[[BR]][[BR]]or[[BR]][[BR]]56h 31h 06h <vvvv> <xxxxxxxxxx>||
     499||Get version, type and status of option card in slot 2||56h 32h||56h 32h 15h <eeee> (NAK error)[[BR]][[BR]]or[[BR]][[BR]]56h 32h 06h <vvvv> <xxxxxxxxxx>||
     500||…|| || ||
     501||Get mainboard time/date||53h 30h||53h 30h 06h <ddddddd>||
     502||Repeat time/date at s~~~~~~e~~~~~~pecified interv~~~~~~er~~~~~~__al__||5Dh 30h <mmmm>||5Dh 30h 06h <ddddddd>  (immediate response)[[BR]][[BR]]or[[BR]][[BR]]5Dh 30h 06h (ack if interval is zero and stop repeat)[[BR]][[BR]]5Dh 30h 01h <ddddddd> (repeat at specified interval)||
     503||Set mainboard  time/date||44h 30h <ddddddd>||44h 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]44h 30h 06h (ACK successfully changed time/date)||
     504||Set current units for scale 1||63h 31h <u>||44h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]44h 31h 06h (ACK successfully changed units)||
     505||…|| || ||
     506||Get one time scale 1 wt||57h 31h||57h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]57h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>||
     507||Get one time scale 2 wt||57h 32h||57h 32h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]57h 32h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>||
     508||…|| || ||
     509||Get one time scale 12 wt||57h  3Ch||57h 3Ch 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]57h 3Ch 06h <ii> <gggg> <tttt> <nnnn> <u> <s>||
     510||Get one time total scale weight (if totalizing enabled)||57h  7Fh||57h 7Fh 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]57h 7Fh 06h <ii> <gggg> <tttt> <nnnn> <u> <s> <!#1> <g1> <s1> <!#2> <g2> <s2> <!#3> <g3> <s3> …||
     511||~~~~~~Get one time scale 1 wt with audit trail~~~~~~||~~~~~~41h 31h~~~~~~||~~~~~~41h 31h 15h <eeee> (NAK error)~~~~~~[[BR]][[BR]]''~~~~~~or~~~~~~''[[BR]][[BR]]~~~~~~41h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s> <aaaa> <tttttt>~~~~~~||
     512||…|| || ||
     513||Repeat wt from scale 1 at specified interval||52h 31h <mmmm>||52h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]52h 31h 06h (ACK if interval is zero and stop repeat weight)[[BR]][[BR]]''or''[[BR]][[BR]]52h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s>[[BR]][[BR]](Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)||
     514||…|| || ||
     515||Repeat wt from scale 1 at specified interval or immediately upon weight change||43h 31h <mmmm>||43h 31h 15h <eeee> (NAK error[[BR]][[BR]]''or''[[BR]][[BR]]43h 31h 06h (ACK if interval is zero and stop repeat weight)[[BR]][[BR]]''or''[[BR]][[BR]]43h 31h 06h <ii> <gggg> <tttt> <nnnn> <u> <s> (repeat at requested interval or immediately when weight or status change occurs)[[BR]][[BR]](Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)||
     516||…|| || ||
     517||Zero scale 1||5Ah 31h||5Ah 31h 15h <eeee> (NAK error)[[BR]][[BR]]or[[BR]][[BR]]5Ah 31h 06h (ACK, scale zeroed successfully)||
     518||…|| || ||
     519||Set tare for scale 1||45h 31h <tttt>||45h 31h 15h <eeee> (NAK error)[[BR]][[BR]]or[[BR]][[BR]]45h 31h 06h (ACK, scale tared successfully)||
     520||…|| || ||
     521||Set tare scale 1 to  scale 1 current wt||46h 31h||46h 31h 15h <eeee> (NAK error)[[BR]][[BR]]or[[BR]][[BR]]46h 31h 06h (ACK, scale tared successfully)||
     522||~~~~~~Get beginning and ending audit trail record IDs~~~~~~||~~~~~~54h 30h~~~~~~||~~~~~~54h 30h 15h <eeee> (NAK error)[[BR]]''or''~~~~~~[[BR]][[BR]]~~~~~~54h 30h 06h <bbbb> <llll>~~~~~~||
     523||~~~~~~Get weight and time/date for audit ID~~~~~~||~~~~~~55h 30h <aaaa>~~~~~~||~~~~~~55h 30h 15h <eeee> (NAK error)[[BR]]''or''[[BR]]55h 30h 06h <gggg> <tttt> <nnnn> <u> <s> <aaaa> <ddddddd> <#>~~~~~~||
     524||Get standard calibration parameters for scale 1||50h 31h||50h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]]50h 31h 06h <ppppppppp>||
     525||…|| || ||
     526||Set standard calibration parameters for scale 1||51h 31h <ppppppppp>||51h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]51h 31h 06h (ACK successfully set parameters)||
     527||…|| || ||
     528||Get multiple-interval calibration parameters for scale 1||58h 31h||58h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]]58h 31h 06h <hhhhhhhhhh>||
     529||…|| || ||
     530||Set multiple-interval calibration parameters for scale 1||59h 31h <hhhhhhhhhh>||59h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]59h 31h 06h (ACK successfully set parameters)||
     531||…|| || ||
     532||Get calculated calibration values for scale 1||4Fh 31h||4Fh 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]]4Fh 31h 06h <jjjjjjjjjj>||
     533||…|| || ||
     534||Calibration scale 1||42h 31h <wwww> <s> (wwww = wt on scale, s = step)||42h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]42h 31h 06h (ACK calibration step started)[[BR]][[BR]]''As progress completes''[[BR]][[BR]]42h 31h 01h <q> (q = percent complete, p = 100d step complete)||
     535||…|| || ||
     536||Get one time I/O status record for I/O board 1||49h 31h||49h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]49h 31h 06h <oooo>||
     537||…|| || ||
     538||Repeat I/O status for board 1||4Ah 31h <mmmm>||4Ah 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Ah 31h 06h (ACK, if interval 0 – stop repeat)[[BR]][[BR]]''or''[[BR]][[BR]]4Ah 31h 06h <oooo> (repeat at specified interval)[[BR]][[BR]](Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)||
     539||…|| || ||
     540||Repeat I/O status for board 1 at specified interval or immediately if status change||4Bh 31h <mmmm>||4Bh 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Bh 31h 06h (ACK, if interval 0 – stop repeat)[[BR]][[BR]]''or''[[BR]][[BR]]4Bh 31h 06h <oooo> (repeat at specified interval or immediately upon status change – If interval FFFFFFFF only output on status change)[[BR]][[BR]](Initial response should be immediate – repeats will be same format except third character 06h ACK replaced by 01h SOH)||
     541||…|| || ||
     542||Set output status for I/O board 1||4Ch 31h <oooo> <kkkk>||4Ch 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Ch 31h 06h (ACK successfully set outputs)[[BR]][[BR]] ||
     543||…|| || ||
     544||Set output for I/O board 1 when specified condition is true||5Bh 31h <oooo> <kkkk> <cccccccccc>||5Bh 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]5Bh 31h 06h (ACK successfully set outputs)[[BR]][[BR]] ||
     545||…|| || ||
     546||Set serial port record format||47h 30h <y> <ffffffffff>||47h 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]47h 30h 06h (ACK successfully set format)[[BR]][[BR]] ||
     547||One time output specified data to mainboard serial port||48h 30h <rrrrrrrrrr>||48h 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]48h 30h 06h (ACK successfully sent data)[[BR]][[BR]] ||
     548||One time output specified data to first option card serial port||48h 31h <rrrrrrrrrr>||48h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]48h 31h 06h (ACK successfully sent data)[[BR]][[BR]] ||
     549||…|| || ||
     550||One time output specified data to mainboard CAN bus port__ (mainboard test software only)__||48h 7Fh <rrrrrrrrrr>||48h 7Fh 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]48h 7Fh 06h (ACK successfully sent data)[[BR]][[BR]] ||
     551||Get input buffer from mainboard serial port||68h 30h||68h 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]68h 30h 06h <rrrrrrrrrr>||
     552||Get input buffer from first option card serial port||68h 31h||68h 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]68h 31h 06h <rrrrrrrrrr>||
     553||…|| || ||
     554||Get input buffer from mainboard CAN bus port__ (mainboard test software only)__||68h 7Fh||68h 7Fh 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]68h 7Fh 06h <rrrrrrrrrr>||
     555||One time output specified format to mainboard serial port||5Ch 30h <y>||5Ch 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]5Ch 30h 06h (ACK successfully sent data based on format)[[BR]][[BR]] ||
     556||One time output specified format to first option card serial port||5Ch 31h <y>||5Ch 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]5Ch 31h 06h (ACK successfully sent data based on format)[[BR]][[BR]] ||
     557||…|| || ||
     558||Repeat output specified format to mainboard serial port at specified interval||4Dh 30h <y> <mmmm>||4Dh 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Dh 30h 06h (ACK mainboard repeats ouput to serial port at specified interval, or stop repeat if interval set to zero)||
     559||Repeat output specified format to first option card serial port at specified interval||4Dh 31h <y> <mmmm>||4Dh 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Dh 31h 06h (ACK mainboard repeats ouput to serial port at specified interval, or stop repeat if interval set to zero)||
     560||…|| || ||
     561||Set output condition for specified format for mainboard serial port||4Eh 30h <y> <ccccccccc>||4Eh 30h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Eh 30h 06h (ACK mainboard monitors for condition specified and sends format 1 serial output when true)||
     562||Set output condition for specified format for first option card serial port||4Eh 31h <y> <ccccccccc>||4Eh 31h 15h <eeee> (NAK error)[[BR]][[BR]]''or''[[BR]][[BR]]4Eh 31h 06h (ACK mainboard monitors for condition specified and sends format 1 serial output when true)||
     563||…|| || ||
     564||Switch the main board to update mode||5Eh 30h||5Eh 30h 06h (ACK)||
     565||Erase~~~~~~d~~~~~~ main board flash except for the boot loader__ (in update mode only)__||60h 30h <@@@@@@>||60h 30h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]60h 30h 06h (ACK from bootloader and setup for flash update)||
     566||Send next block of binary data for mainboard flash__ (in update mode only)__||61h 30h <rrrrrrrrrrrr>||60h 30h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]61h 30h 06h (ACK)||
     567||Switch main board from boot program to main program||62h 30h||62h 30h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]62h 30h 06h (ACK)||
     568||Set !DeviceNet parameters||69h 30h <!!!>||69h 30h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]69h 30h 06h (ACK)||
     569||Get !DeviceNet parameters||6Ah 30h||6Ah 30h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]6Ah 30h 06h <!!!>||
     570||Adjust scale 1 span up||6Bh 31h||6Bh 31h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]6Bh 31h 06h||
     571||…|| || ||
     572||Adjust scale 1 span down||6Ch 31h||6Ch 31h 15h <eeee> (NAK if error)[[BR]][[BR]]or[[BR]][[BR]]6Ch 31h 06h||
     573||…|| || ||
     574||__Get number of chars inmain board serial portqueue and handshake status__||__32h 30h__||__32h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__32h 30h 06h <QQ><H>__||
     575||__...__||__ __||__ __||
     576||__Set main board serial port baud rate__||__33h 30h <BB>__||__33h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__33h 30h 06h__||
     577||__...__||__ __||__ __||
     578||__Set or clear main board serial port rts__||__34h 30h <R>__||__34h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__34h 30h 06h__||
     579||__...__||__ __||__ __||
     580||__Set main board serial port data bits, parity, and stop bits__||__35h 30h <D><P><S>__||__35h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__35h 30h 06h__||
     581||__...__||__ __||__ __||
     582||__Get main board serial port baud rate, data bits, parity, and stop bits__||__36h 30h__||__36h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__36h 30h 06h <BBBB><DD><PP><SS>__||
     583||__...__||__ __||__ __||
     584||__Set scale 1 as the default scale for serial port formats__||__37h 30h 31h__||__37h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__37h 30h 06h__||
     585||__...__||__ __||__ __||
     586||__Set totalizer as the default scale for serial port formats__||__37h 30h 7Fh__||__37h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__37h 30h 06h__||
     587||__Increment calibration counter__||__64h 30h__||__64h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__64h 30h 06h__||
     588||__Increment configuration counter__||__65h 30h__||__65h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__65h 30h 06h__||
     589||__Read calibration and configuration counters__||__66h 30h__||__66h 30h 06h <W><T><CC><NN><EEEEEEE><FFFFFFF>__||
     590||__Enable/disable OPI debug mode__||__6Dh 30h 01 (enable)__[[BR]][[BR]]__or__[[BR]][[BR]]__6Dh 03h 00 (disable)__||__6Eh 30h 06h__||
     591||__Single point calibration of scale 1__||__6Eh 31h__||__6Eh 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__6Eh 30h 06h__[[BR]][[BR]]__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.__||
     592||__...__||__ __||__ __||
     593||__Set !DeviceNet serial number__||__6Fh 30h <GGGG>__||__6Fh 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__6Fh 30h 06h__||
     594||__Get !DeviceNet serial number__||__70h 30h__||__70h 30h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__70h 30h 06h <GGGG>__||
     595||__Set multipoint calibration parameters for scale 1__||__71h 31h <MMMMMMMMMM>__||__71h 31h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__71h 31h 06h__||
     596||__...__||__ __||__ __||
     597||__Get multipoint calibration parameters for scale 1__||__72h 31h__||__72h 31h 15h <eeee> (NAK if error)__[[BR]][[BR]]__or__[[BR]][[BR]]__72h 32h 06h <MMMMMMMMMM>__||
     598||__Change OPI board comm. baud rate__||__73h 30h <b>__||__73h 30h 15h <eeee> (NAK if error) [[BR]]or__[[BR]][[BR]]__73h 30h 06h (ACK sent before baud rate change)__||
     599||__Change OPI board multi-drop mode__||__74h 30h <m>__||__74h 30h 15h <eeee> (NAK if error) [[BR]]or__[[BR]][[BR]]__74h 30h 06h (ACK sent before multi-drop change)__||
     600
     601 
     602
     603 
     604
     605 
     606
     607 
     608
     609'''Error Codes:'''
     610
     611 
     612
     613Low eight bits bitmapped for some responses
     614
     615 
     616
     617||'''Bit'''||'''Zero Scale'''||'''Get wt w/ audit'''||''' '''||''' '''||''' '''||
     618||'''0'''||Motion||Motion|| || || ||
     619||'''1'''||Below zero||Below zero|| || || ||
     620||'''2'''||Over capacity||Over capacity|| || || ||
     621||'''3'''||Out of range|| || || || ||
     622||'''4'''|| || || || || ||
     623||'''5'''|| || || || || ||
     624||'''6'''|| || || || || ||
     625||'''7'''|| || || || || ||
     626
     627 
     628
     629 
     630
     63100010000h = CRC error
     632
     63300010100h = Unrecognized command
     634
     63500010200h = Specified scale not present
     636
     63700010300h = Parameter out of range
     638
     63900010400h = Specified serial output format not defined
     640
     64100010500h = Calibration timeout
     642
     64300010600h = Calibration error
     644
     64500010700h = Expression error
     646
     64700010800h = Request to stop repeat when specified repeat is not in progress
     648
     649 
     650
     65100020100h = Hardware error
     652
     653 
     654
     655 
     656
     657'''Conditions:'''
     658
     659 
     660
     661Infix expression such as:
     662
     663 
     664
     665(gross weight of scale one greater than 5000 and digital I/O board one input 4 equal to one)
     666
     667 
     668
     669GROSS1 > 5000 && DIO1-4 = 1
     670
     671 
     672
     673Converted to postfix:
     674
     675 
     676
     677GROSS1 5000 > DIO1-4 1 = &&
     678
     679 
     680
     681Converted to binary:
     682
     683 
     684
     685F1h (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)
     686
     687 
     688
     689 
     690
     691F1h 01h F5h <ffff> FDh 3Eh F4h 01h 04h F6h <nnnn> FDh 3Dh FDh 41h
     692
     693 
     694
     695 
     696
     697F1h = scale ID gross wt 1-byte follows
     698
     699F2h = scale ID tare wt 1-byte follows
     700
     701F3h = scale ID net wt 1-byte follows
     702
     703F4h = dio ID 2-byte follows (first byte card number, second byte input number)
     704
     705F5h = literal float 4-bytes follow
     706
     707F6h = literal integer 4-bytes follow
     708
     709F7h = literal string follows – variable length first byte length
     710
     711 
     712
     713FAh = comm port receive buffer port ID 1-byte follows
     714
     715            (This allows on-demand to be configured such as: FAh 01h F7h 01h 05h FDh 3Dh = [comm 1 rcv = ENQ])
     716
     717 
     718
     719 
     720
     721FDh = operator 1-byte follows
     722
     723            3Ch  <
     724
     725            3Dh  =             (Eq~~~~a~~~~u__a__lity – not assignment)
     726
     727            3Eh  >
     728
     729            4Ch  ‘L’ <=
     730
     731            47h  ‘G’ >=
     732
     733            4Eh ‘N’ !=
     734
     735           
     736
     737            41h ‘A’ &&     (Logical And)
     738
     739            4Fh ‘O’ ||         (Logical Or)
     740
     741            26h &              (Bitwise And)
     742
     743            7Ch |                (Bitwise Or)
     744
     745           
     746
     747            2Ah *
     748
     749            2Bh +
     750
     751            2Dh –
     752
     753            2Fh  /
     754
     755 
     756
     757 
     758
     759