Owner manual
P/N64118rev.B
Appendix A: Data Transmission
34
Banner Engineering Corp. •Minneapolis,U.S.A.
www.bannerengineering.com•Tel:763.544.3164
Appendix A: Data Transmission
A.1 Host Mode Command String
Asdiscussedinsection5.3.2ofthismanual,thecontrolmodulehasthreecontrol
modeoptions:continuous,gate,andhost.Hostmoderequiresaserialtransmission
stringfromaseparatedevice,typicallyaPCorprocesscontroller.Theserial
transmissionmediumcanbeeitherRS-485orRS-232.
WhenHostcontrolmodeisselected,thehostprocesscontrollerinitiatesscansusinga
commandstring.Thecommandstringisathree-bytemessage,consistingof:
•Controlbytewithdecimalvalue248,
•ControllerID(theidentificationofaspecificcontrolmoduleonthestring,indicated
byoneof15ASCIIlettersAthroughO,andspecifiedinthePSF),and
•Scaninitiationbyte(ASCIIletterS).
Thecommandstringisfurtherdefinedasfollows:
/*the below C code will define an array called msg that will contain the Host Scan Command */
unsigned char msg[3]; /*declare three byte unsigned character array using C language */
msg[0]=248; /*control byte */
msg[1]=65; /*assume the controller ID is the letter A */
msg[2]=83; /*assume initiation byte which is the ASCII letter S */
Thehosttransmitsthisthree-bytemessageatthedefinedbaudrate.Theformatisone
startbit,onestopbit,evenparity,andeightdatabits.Whenthecontrolmodule
receivesthismessage,itinitiatesascan(assumingHostmodeisselected)andthen
updatesitsoutputsasrequired.ThecontrolmodulethenwaitsforthenextHost
Commandmessagebeforeinitiatinganotherscan.
A.2 Serial Data Format and Header String
Theprogrammedmeasurementmodeormodesdeterminethetypeofinformationthat
isseriallytransmitted.ForexampleifMeas1issetforFBBandMeas2issetforLBB,
thenthedatatransmittedtothehostcontainsthevaluesofthefirstandlastbeam
blocked.TheAllmeasurementmodeprovidesthestatusofallbeamstothehost.
Inadditiontomeasurementmodeinformation,thedatatransmissionalsocontainsa
two-bytestartstringandaterminationbyte.Thestartstringconsistsofafirstbytethat
doesnotchange,followedbythecontrollerID.Thefirstbytevalueisahex1Cor28
decimal.Attheendofthestring,thecontrolmodulewillplaceaterminationbyte.The
terminationbyeistheASCIIcharacterforalinefeed(hexvalue0A).Thesethreebytes
collectivelyarecalledtheSerialHeaderstring.
Figure A-1. Serial Transmission options
(PSF Configuration screen)