Native Mode Communications
Page 0 of 01=
Native Mode Communications Communications
In-Sight Communications Reference
About the Native Mode Protocol Basic Native Mode Syntax xtended Native Mode Syntax Communicating !ith In-Sight Sensors via Serial Port "sing Native Mode Commands Communicating !ith In-Sight Sensors via #elnet "sing Native Mode Commands $ist of Native Mode Commands
About the Native Mode Protocol #he In-Sight Native Mode %rotocol is an ASCII %rotocol that allo!s an In-Sight sensor to be controlled from any of the follo!ing& ' Custom Custom a%%lication a%%lication %rograms %rograms running running on a PC ' Remote Remote hosts that that su%%ort su%%ort standard standard serial communications ' #elnet #elnet over over an thernet net!or( #he Native Mode %rotocol is divided into t!o sets of commands& Basic Basic and and xtended xtended)) Basic Native Mode commands are t!o characters long* %lus %arameters +if any, and a terminator character extended Native Mode Mode commands include additional additional functions or commands) #he commands are not case sensitive) #he terminator is CR . $/ +ASCII characters 01 . 02, !hen sending Native Mode commands using a telnet connection) 3hen using Native Mode commands over over a serial %ort* an alternate terminator character may be s%ecified in the Native Mode 4etails 4etails the default terminator is CR +ASCII character 01,)
3hen a Native Mode command is remotely issued to an In-Sight sensor* the In-Sight sensor %rocesses the command and then returns a res%onse* consisting of an ASCII string follo!ed by the terminator character) Commands that set that set values values return 1 for 5success5* 0 for 5unrecogni6ed command5* or a negative number for 5failure5) Commands that get that get values values return various values* de%ending on the command) Notes&
' A subset subset of of Native Mode commands can be sent from any P$C +that allo!s a generic CIP CIP message, message, over an therNet7IP connection using x%licit Messaging) ' #he In-Sight 8222 series vision sensor has the follo!ing follo!ing limitations& 9 /oll /ollo! o!in ing g basic native mode commands are commands are not su%%orted on the In-Sight 8222 series vision sensor& Read Image +RI,* +RI,* 3rite Image +3I,** :et ;alue +:;,* +3I, +:;,* Set Integer +SI,* +SI,* Set /loat +S/,* +S/,* Set Region +SR,* +SR,* Set String +SS,* +SS,* Set vent +S,* +S,* Set vent and 3ait +S3, and +S3, and Send Message +SM,) +SM,) 9 xtended Native mode commands are commands are not su%%orted on the In-Sight 8222 series vision sensor* exce%t !here noted) 9 #he In-Sight 8222-00270827082C 8222-00270827082C vision sensor sensor is only ca%able of returning Pass7/ail data) data) 3hen attem%ting to retrieve numeric data* an invalid %ermission +-<, error !ill be returned)
Basic Native Mode Syntax #he general syntax of a Basic Native Mode command is as follo!s&
[command][parameter][terminator]
!here [command] consists [command] consists of t!o characters) Some Native Mode commands ta(e an o%tional [parameter]) [parameter])
#he Basic Native Mode command is com%leted !ith a [terminator] character) [terminator] character) #he terminator is CR . $/ +ASCII characters 01 . 02, !hen sending Native Mode commands using using a telnet connection) 3hen using using Native Mode commands over over a serial %ort* an alternate terminator character may be s%ecified in the Native the Native Mode 4etails 4etails the default terminator is CR +ASCII character 01,)
Basic Native Mode commands are not case-sensitive) No s%aces exist bet!een %arameters)
Notes&
file&777C&7"sers7la%to%7A%%4ata7$ocal7#em%7@hhC88)htm
8>7?7820=
Native Mode Communications
Page 8 of 01=
' Native Mode commands that that are executed on a ob ob +such as 3rite ob and ob and 4elete ob, ob, are included %rimarily for bac(!ards com%atibility) ' #he chec(sum that is used by Native Mode file transfer commands commands is a standard standard 0<-bit Cyclical Redundancy Chec( )
Extended Native Mode Syntax #he general syntax of an xtended Native Mode command is as follo!s&
[command1] [command2] [input parameters][terminator]
!here [command1] is any one of the three xtended Native Mode commands +:et +:et** Put Put** ; ;,) ,) [command2] re%resents [command2] re%resents the secondary command* indicating !hich data to send* receive* or execute* based u%on [command1]) [command1]) [input parameters] su%%ly parameters] su%%ly o%tional su%%lementary information to the command)
#he xtended Native Mode command is com%leted !ith a [terminator] character) [terminator] character) #he terminator is CR . $/ + ASCII characters 01 . 02, !hen sending Native Mode commands using a telnet connection) 3hen using N ative Mode commands over a serial %ort* an alternate terminator character may be s%ecified in the Native the Native Mode 4etails 4etails the default terminator is CR +ASCII character 01,)
xtended Native Mode commands are not case-sensitive) Note that s%aces exist bet!een certain in%ut %arameters)
Communicating Communicating with n!Sight Sensors via Serial Port "sing Native Mode commands 0) n the the Sensor menu* menu* clic( Serial Port Settings) 8) In the the Serial Port Settings dialog* dialog* choose Native /rom the Mode dro%-do!n list) 1) Configure the remote serial device to use the the same %ort settings as the In-Sight sensor) Note& 3hen using Native Mode commands over a serial %ort* a different terminator character may be s%ecified in the Native Mode 4etails* 4etails* !hich is accessed from the Serial Port dialog) dialog)
Communicating Communicating with n!Sight Sensors via #elnet "sing Native Mode Commands #elnet is a built-in Microsoft 3indo!s client that can be used to remotely communicate !ith the sensor using In-Sight Native Mode commands) 0) %en the telnet telnet client a%%licati a%%lication on on the remote remote host) 8) In the telnet a%%lication* connect to the In-Sight sensor by either either its Dost Name or Name or IP address) address) If the connection is successful* a 53elcome to In-Sight+tm,5 message a%%ears* along !ith the hard!are sensor ty%e +for exam%le& ?022* ?>22C, and the session number) 1) nter a valid user name and %ass!ord for the In-Sight In-Sight sensor) #he user name and %ass!ord entered entered must exist in the"ser the "ser $ist for $ist for that sensor) If the log on is successful* the message 5"ser $ogged In5 !ill a%%ear) Eou can test the telnet connection by ty%ing the Native Mode :et ;alue command* ;alue command* 5gva2225* at the telnet %rom%t) If successful* the command returns a 1* follo!ed by the value in cell A2 in t he s%readsheet of the In-Sight sensor* $mage&
Custom a%%lications can be !ritten +to run on a remote host, to automate the telnet logon %rocess* as !ell a s to send and receive Native Mode data)
Notes&
' By default* !hen connected connected via telnet* there is is no default timeout) timeout) #o set a timeout timeout value* use thePut the Put #imeout command) #imeout command) ' "nder ty%ical use* %ass!ord %ass!ord echo is disabled disabled in the telnet client client a%%lication for security %ur%oses)
file&777C&7"sers7la%to%7A%%4ata7$ocal7#em%7@hhC88)htm
8>7?7820=
Native Mode Communications
Page 1 of 01=
' 3hen using telnet to log on to an In-Sight sensor from a "nix-based %latform* %latform* the telnet command line must be in the follo!ing format&
F telnet !here is is either the In-Sight sensorGs Dost Name or IP Address* and is is the remote telnet %ort +usually 81,) Su%%lying the %ort number disables the "nix username7%ass!ord username7%ass!ord authentication and and forces the "nix system to %rom%t you you for a user name and %ass!ord)
Native Mode Commands
In-Sight Communications Reference
Basic Native Mode Commands xtended Native Mode Commands
Basic Native Mode Commands %ile & 'ob Commands ' ' ' ' ' ' ' ' ' ' ' '
$oad /ile& /ile& +$/, $oads the s%ecified Hob from flash memory on the In-Sight vision system* ma(ing it the active Hob) Store /ile& /ile& +#/, Saves the current Hob in flash memory on the vision system) Read /ile& /ile& +R/, Reads a Hob from the flash memory on the vision system) 3rite /ile& /ile& +3/, Sends a Hob to the flash memory on the vision system) 4elete /ile& /ile& +4/, 4eletes the s%ecified Hob or cell data file +)cxd, from flash memory on the vision system) :et /ile& /ile& +:/, Returns the filename of the ac tive Hob on the vision system) Set ob& ob& +S, $oads a Hob from one of the Hob slots in flash memory on the vision system* ma(ing it the active Hob) Store ob& ob& +#, Saves the current Hob into the s%ecified slot in fla sh memory on the vision system) Read ob& ob& +R, Reads a Hob from the s%ecified In-Sight Hob slot) 3rite ob& ob& +3, Sends a Hob to the s%ecified Hob slot in fl ash memory on the vision system) 4elete ob& ob& +4, 4eletes the Hob from the s%ecifie d slot in flash memory on the vision system) :et ob& ob& +:, :ets the currently loaded HobGs I4 number)
mage Commands ' ' ' '
Read BMP& BMP& +RB, Sends the current image* in ASCII hexadecimal format* from a vision system to an external device) Read Image& Image& +RI, Sends the current image* in ASCII hexadecimal format* from a vision system to an external device) 3rite BMP& BMP& +3B, Sends image data from an external device to the vision system) 3rite Image& Image& +3I, Sends image data from an e xternal device to the vision system)
Settings & Cell (alue Commands ' ' ' ' ' ' ' ' ' ' '
:et ;alue& ;alue& +:;, Returns the value in a s%ecified cell or symbolic tag) Set Integer & +SI, Sets an i nteger value in a s%ecified cell or symbolic tag) Set /loat& /loat& +S/, Sets a floating %oint value in a s%ecified cell or symbolic tag) Set Region& Region& +SR, Sets the values of an ditRegion cell or symbolic tag) Set String& String& +SS, Sets a string value in a s%ecified cell or symbolic tag) :et Info& Info& +:I, Returns system information about the In-Sight vision system) Read Settings& Settings& +RS, Reads the system settings data from a vision system) 3rite Settings& Settings& +3S, Sends the system settings data from an external device to the vision system) Store Settings& Settings& +#S, Stores the vision system settings to the %roc)set file) Set IP Address $oc( & +S$, Prevents unauthori6ed changes to a vision systemGs IP address) :et IP Address $oc( & +:$, Returns the security status of the IP a ddress on a vision system)
Execution & )nline Commands ' ' ' '
Set nline& nline& +S, Sets the vision system into nline or ffline mode) :et nline& nline& +:, Returns the nline state of the vision system) Set vent& vent& +S, #riggers a s%ecified event) Set vent and 3ait& 3ait& +S3, #riggers a s%ecified event and !aits until the command is com%leted to return a res%onse)
file&777C&7"sers7la%to%7A%%4ata7$ocal7#em%7@hhC88)htm
8>7?7820=