Sshqgl[ $ 5hprwh $fwlydwlrq – Grass Valley XSwitch Feb 01 2005 User Manual

Page 36

Advertising
background image

©2001 XSWITCH Installation and Operations Manual 35

$SSHQGL[ $ 5HPRWH $FWLYDWLRQ

EXAMPLE FOR BASIC PROGRAM V 2.0:

Known command string to send:

“2,L”

LEN is length of command string.

Known values:

DEST: 04

decimal value —> convert to ASCII character of value: 04

SRC:

254

decimal value —> convert to ASCII character of value: 254

LEN:

03

decimal value

—> convert to ASCII character of value: 03

Input string for CRC program:

Chr$(4)+Chr$(254)+Chr$(3)+”2,L”

Returned hexadecimal CRC value returned from basic program under Visual Basic: “FFFFFA92”

LSB needed from CRC is 92

MSB needed from CRC is FA

Using the standard protocol:

Where the CRCL is the LSB needed from CRC and the CRCH is the MSB needed from CRC,

the entire packet is now in the form (using values from previous example):

packet string = Chr$(4)+Chr$(254)+Chr$(3)+”2,L”+Chr$(&H92)+Chr$(&HFA)

NOTES:

LSB and MSB of CRC are hexadecimal values. Remember to change back to decimal

form to use Chr$ or use hexadecimal notation.

Basic eliminates leading zeros. Therefore if CRC returns only 3 characters, the last two are LSB

and the first character from CRC is MSB.

i.e.:

CRC=“3FE”,

LSB=FE

MSB=3

i.e.:

CRC=“2E”,

LSB=2E

MSB=0

DEST

SRC

LEN

C/C

DATA1

DATAn

CRCL

CRCH

Advertising