XT2640OperatingManual 13July2016 Page140of187
+1.2345678e6
153465782.34
24.2.2.5 VDEFC OMMANDFIE LDSYNTAX
ThisfieldtypeallowsyoutodefineaVPAusinganyoneofthefollowingsyntaxes‐
1to3 NR1syntax
A1toA3 KEYWORDsyntax
VPA1toVPA3 KEYWORDsyntax
CH1toCH4 KEYWORDsyntax,definestheVPAwhichispresentlyconfiguredtousethechannelidentifiedbyCH1to
CH4;somecommandsdonotsupportthissyntaxwithinaVDEFfield
24.2.2.6 CDEFCOMMANDFIEL DSYNTAX
Thisfieldtypeallowsyoutodefineachannelusinganyoneofthefollowingsyntaxes‐
1to4 NR1syntax
CH1toCH4 KEYWORDsyntax
24.2.2.7 RDEFCOMMANDFIELDSYNTAX
Thisfieldtypecontains1to5sub‐fieldswhichdefineameasurementresulttobeused.Seealatersectionfordetailsregardingthe
sub‐fieldsoftheRDEFcommandfieldtype.
24.2.2.8 DDEFCOMMANDFIELDSYNTAX
Thisfieldtypecontains1to5sub‐fieldswhichdefineameasurementresulttobeused.Seealatersectionfordetailsregardingthe
sub‐fieldsoftheDDEFcommandfieldtype.
24.2.2.9 COLORCOMMANDFIELDSYNTAX
ACOLORcommandfieldcontainsthreeNR1typesub‐fieldsdefiningthelevelofthered,greenandbluecolorcomponents
respectively.Eachvalueisamaximumof255correspondingtofullbrightnessoftherespectivecolor.
24.2.2.10 BLANKCOMMAN DFIELD SYNTAX
Insomecasesitisallowedtohaveablankcommandfield.Thisisafieldwhichhasaprecedingfieldseparatorcharacterbutis
immediatelyfollowedbyanotherseparatororterminatorcharacter.ExceptforaSTRINGcommandfield,ablankfieldmaycontain
oneormorewhitespacecharactersbutnoothercharacters.
24.3 RESPONSESTOCOMMANDS
SomecommandscausetheXT2640torespondwitharequesteddataresponseorsetofdataresponses.Theresponseisformedbya
setoffields,similartothoseforcommandsdescribedabove.
Notethatallcommandkeywordswhichendwiththe?charactercausearesponse;allcommandkeywordswhichdonotendwiththe
?characterdonotcausearesponse.
AllresponsesfromtheXT2640usethestandard7‐bitASCIIcharactersetusing8‐bitencoding(the8
th
bitiszero)independentofthe
actualinterfacebeingused.
Youmayrequestmorethanoneresponseinasetofcommands,inwhichcaseeachresponse(orsetofresponses)isseparatedfrom
thepreviousbyacommaseparatorandtheresponsesareincludedinthesameorderastheywererequested.Acompleteresponse
isalwaysterminatedbyacarriagereturnfollowedbyalinefeedASCIIcharacterandmaycontainupto65535charactersintotal.
Itisexpectedthatafteracommandisgiventotheunittoproducearesponsethattheoriginatorwillnotissuefurthercommands
requestingaresponseuntilthatpriorresponsehasbeenfullyreceived.Iftheunitreceivesacommandwhichrequestsaresponse
butthepriorresponsehasnotbeenfullytransmittedthenthisraisesaTxOverrunerror.
24.3.1 RESPONSEFIELDS
Asdefinedforeachsuchcommandaresponseisoneormorefields,eachofwhichisofthefollowingtypes.
24.3.1.1 STRINGRESPONSEFIELDSYNTAX
ASTRINGresponseisasetofASCIIcharactersformingtheresponse.OnlyprintableASCIIcharactersareusedandthelengthofa
STRINGresponseisvariable,theterminatingcomma(ifmoreresponsefieldsfollowit)ortheterminatingcarriagereturnandline
feedcharactersshouldbeusedtodeterminetheendofaSTRINGfield.
24.3.1.2 NR1RESPONSEFIELDSYNTAX
ANR1responseisasetofASCIInumericcharactersdefininganintegervalue.ThelengthofaNR1responseisvariable,the
terminatingcomma(ifmoreresponsefieldsfollowit)ortheterminatingcarriagereturnandlinefeedcharactersshouldbeusedto
determinetheendofaNR1field.ANR1responseneverincludesapolaritysymbolasallsuchresponsesarepositive.
24.3.1.3 NR3RESPONSEFIELDSYNTAX
ANR3responseisasetofASCIIcharactersdefiningafloatingpointnumericvalue.ThelengthofaNR3responseisfixedat11
charactershoweveritisrecommendedthattheterminatingcomma(ifmoreresponsefieldsfollowit)ortheterminatingcarriage
returnandlinefeedcharactersbeusedtodeterminetheendofaNR3field.
ANR3responsealwayshasthefollowingpartsintheordershown–
Apolaritycharacter,definingthepolarityofthenumeric