Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 36 of 47

Bulletin 2803 VIM Vision Input Module User Manual: 15 - Using the RS-485 Port, pages 313 to 321

Pages 313 to 321 of 404, from Bulletin 2803 VIM Vision Input Module User Manual

The original document is the PDF (26 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 2803-VIM2

Page 313

Chapter

15

Using the RS-485 Port 75-79

Read S,tatistics Blocks

Use this command to have the VIM2 module send the specified statistics block(s). The VIM2 module responds to the first request as soon as it is not busy. If a repeat count is included in the command, the VIM2 module provides subsequent responses upon completion of each inspection. The Read Statistics Blocks command has this format:

> RSx,SBf [CR] or >RSx,SBf 1 -f2[CR] X f fl-f2

= Number of times command is repeated (optional, default =l) = Selected block. Valid range of l-4, or use cI* ” to indicate all blocks. = Span of blocks (for example l-3)

The VIM2 module response has the following format:

data[CR] for first block specified da$CR] for last block specified where data in the uploaded statistics blocks consists of a number of bytes, each separated by a space (see Appendix D for detailed statistics block information). Each byte consists of two hexadecimal characters (00-FF), and each individual hexadecimal character is represented by an ASCII character. Host/Mode Stipulations: Valid for either master host or non-master host. Valid in run mode only (Note: In order for the VIM2 module to collect statistics, it must be running in the learn mode).

Page 314

Using the

RS-485

Port

Chapter

15 f ock

Use the Lo& command to prevent the VIM2 module from entering the setup mode. The command has the following structure:

75-20

> L [CR] There is no VIM2 module response to this command. If you send the Lock command to the VIM2 module while it is in the setup mode, the VIM2 module will go to run mode as soon as the user exits the setup mode. If you send the Lock command to the VIM2 module while it is in the standby mode, the VIM2 module will exit the standby mode and go to run mode. Host/Mode Stipulations: Valid for master host only. Valid in setup or standby mode only.

Unlock

Use the Unlock command to allow the VIM2 module to enter the setup mode. The command has the following structure:

>U [CR] There is no VIM2 module response to this command. If you send the Unlock command to the VIM2 module while it is in the run mode, the VIM2 module will exit the run mode and go to standby mode. Note: To enter setup mode from standby mode, you must pick a bright area on the monitor screen with the light pen. If you send the Unlock command to the VIM2 module while it is in the standby mode (it is already unlocked), there will be no effect. Host/Mode Stipulations: Valid for master host only. Valid in run or stand by mode only.

Page 315

Chapter 15

Using the RS-485 Port 15-27

Trigger

Use the Trigger command to initiate a VIM2 module inspection cycle (if the VIM2 module is in run mode), or to have the VIM2 module acquire an image (if the VIM2 module is in setup mode). The command has the following structure:

>T [CR] There is no VIM2 module response to this command.

Note: Sending the Trigger command to the VIM2 module does not activate the SWG TRIGGER LED on the VIM2 module. Host/Mode Stipulations: Valid for master host only. Valid in run mode ifthe VIM2 module is set for host triggering. Valid in setup mode ifthe VIM2 module is set for host triggering, and if the setup trigger is set to Run Mode Trigger.

Change Display Mode

Use the Change Display Mode command to change the monitor image displayed during run mode to the image specified in this command. The command has the following structure:

>W,D,n [CR] n

= Selected display, where; 1= window 1 2 = window 2 3 = window 3 4 = window 4 5= windows l-4 6= “live” image

There is no VIM2 module response to this command. Note: If the VIM2 module is displaying a halted image (as a result of running in either the Halt on Reject or Halt on Inspection arm mode), sending the Change Display Mode command will have the same effect as a light pen pick. That is, when the command is sent, the monitor image display will not change to the specified image, but will toggle to the next display in sequence.

Host/Mode Stipulations:

Valid for master host or nonmaster host. Valid in run mode only.

Page 316

Chapter

15

Using the

RS-485

Port

1s-22

Reset

Statistics

Use this command to reset all statistics collected while the VIM2 module operated in the learn mode. The command has this format:

>ZS [CR] There is no VIM2 module response to this command. Host/Mode Stipulations: Valid for master host or nonmaster host. Valid in run mode or standby mode only.

Page 317

Chapter

15

Using the RS-485 Port IS-23

After you have become familiar with the ASCII commands, you can use the following command summary as a quick reference guide.

ASCII Command Summary

Table 5.A ASCII Command

Summarv ,

Serial Line Diagnosis

4

>XD

Host/Mode

Field Descriptions

Command Structure

Command

Stipulations*

For Master / Non-Master

[CR]

Modes SU, SB, R Serial Line

>X

I,n 1,n2 [CR]

Initialization n 1 = max. erroneous (o-65535) n2 = max. inspections messages for Master / Non-Master Modes SU, SB, R until reset

(O-65535) Echo

> Ex, data [CR]

Read Configuration

>RCn,

CBf [CR] x = times repeated (O-255)

For Master / Non-Master

Data = ASCII string

Modes SU, SB, R n = configuration (1 = EEPROM

Write

Configutration

>W,C,f

[CR]

>data

[CR].

>data

[CR]

Verify

>V [CR]

Save Configuration

>Sn

.

[CR]

RAM to EEPROM Load Configuration From EEPROM

>LO,nl

,n2 [CR] to

Of [CR] f = configuration block(s)

For Master,

Mode SB only

For Master,

Mode SB only

For Master,

Mode SB only

For Master,

Mode SB only data = configuration each specified block data for n = EEPROM configuration

(1 = EEPROM

#l, nl

= EEPROM x = times

2 = EEPROM

E!it

> RRx, RD [CR] x = times

2 = EEPROM configuration repeated (O-255)

repeated (O-255)

For Master / Non-Master Modes SU, SB, R For Master / Non-Master Mode R

Blocks

>RRx,

RBf [CR] x = times repeated (O-255)

f = selected block(s) Read Statistics

#2)

= Yes)

Results Read Results

#2)

configuration #l, f = selected bit(s) Read Discrete

Master Modes SB, R for Master n2 = new startup

>Rx,

#2)

block(s)

(0 = No, Other Read Outputs

Mode SB for Master / Non2 = EEPROM f = configuration

(1 = EEPROM

RAM

#l,

> RSx, SBf [CR]

BI ocks x = times repeated (O-255)

f = selected block(s)

For Master / Non-Master Mode R For Master / Non-Master Mode R

Lock

>L

[CR]

For Master,

Modes SU, SB

Unlock

>U

[CR]

For Master,

Modes SB, R

Trigger >T [CR] For Master, Modes SU, R ..I 8.. -I. , r I., I. . . I -.. -, -. .. *Master ana Non-Master rnarcate nest type for wmcn command IS vatra. Su, 56, ana K rnalcate VIM2 modult modes for which command is valid, where SU = setup mode, SB = standby mode, and R = run mode.

Page 318

Chapter 75

Using the RS-485 Port

ASCII Command Summary (Continued) Table 5-A

ASCII Command Summary (continued) I I

I

Command

1 CMrr-rre Display

I

Command Structure

1 >W,D,n

[CR1

Field Descriptions n = selected display (l-4 = windows I-4, respectively, 5 = all windows,

I

Reset Statistics

>ZS

[CR]

Host/Mode

Stipulations*

For Master / Non-Master Mode R

6 = “live”) For Master / Non-Master Modes SB, R

I *Master and Non-Master indicate host type for which command is valid. SU, SB, and R indicate VIM2 modes for which command is valid, where SU = setup mode, SB = standby mode, and R = run mode.

module

Page 319

Chapter 15

Using the RS-485 Port 15-25

Dfl

Protocol

The remainder of this chapter describes the use of DFl protocol commands. After you have made the equipment connections and configured the VIM2 module for RS-485 communications and DFl protocol, DFl packets of data can be sent to the VIM2 module. In this section, we only describe the DFl command structure and the actual DFl commands that are used with the VIM2 module. For more information about DFl protocol, refer to Appendix E of this manual.

DFl Character Set

In the DFl protocol mode, all data is transferred between the VIM2 module and a host as bytes with values of 00-FF (hex). Refer to Appendix G to convert control codes like ACK and NAK to/from hexadecimal values.

Command Structure

Each command the host device sends to the VIM2 module is represented by a block of data beginning with DLE STX (Data Link Escape, Start of Transmission) and terminated with DLE ETX BCC (Data Link Escape, End Transmission, Block Check Character). The data between the header and trailer characters is the command data. The following shows the structure of a typical command: . .

. .. ..... ....

... .. . . .

_ DLE i STX i Data :. .._. _...... . . . ... . .. ..i HEA;ER

I.~~;~oMMII”D

I.

..

.. . .

_ i DLE i ETX ; BCC i ,.v;.L.s ;... ._.. ..-. . .I ,,r,.i..

, ,,;,,, i

Note: To avoid any confusion between DLE (10 hex) and data equal to 10 (hex:), a value of 10 (hex) is transmitted as 10 (hex) 10 (hex). The DLE code is transmitted simply as 10 (hex). This is referred to as “DLE stuffing.”

Page 320

Chapter

15

Using the RS-485 Port

15-26

Command Structure (continued)

There are different types of fields that can occur in the command data; these fields are described below: l

Operation field- This field appears in every command, and contains the code for the command directed to the VIM2 module. For example, the structure of a command is shown below, where 01 indicates the Echo command: . ...... .... ..-............~. .... . . .._............ ~... . r . . ... ... ; 01 i 00 ; 02 ; 31 ; 32 ; 33 _

: . ... I

I .. \

OPERIITIOC 1 X(HIGH BYTE) l

.. +.,..y..7 ........ DATA

X (LOW BYTE)

x (H) / x (L) -These two fields are included with certain commands to indicate the number of times the command is executed (in the example above, the x value is 0002 the command is executed twice). The valid range is 0000 to FFFF (65,535). If you use a value of 0000, the command will be executed indefinitely (until another command is received). Note: A value of 0000 is treated as a 0001 for the Echo command. Note also that when a repeat count is used with any Read type command (not including Read Configuration), the VIM2 module will send the data after each inspection, until the number of repeats is executed, or until another Read type command (including Read Configuration) is received; the newly received command will then be executed. Commands such as Trigger, or Change Display Mode received before the repeats are completed will not cancel the remainder of the command repeats, nor will going to setup mode then returning to run mode.

l

Data field- Contains data (described per command).

l

Object field - This field appears in some commands, in addition to the operation field, to further define the operation. For example, in the diagram below, the operation field, 07, indicates a Read command, while the object field, 15, specifies that results blocks will be read.

opERAT,o(

. . . . . . . . . ..-............

-... . . . . . . .._............_.............

i

;

07 . .. .

: 7

00

. . .. . . ..

X (HIGH BYTE)

01 . [...L i

15 ..

y..

X (LOW BYTE)

;

00 ._.....

; \

OBJECT f (FLAG)

l

The n qualifier is included in some commands to indicate a specific configuration, or to indicate parameter values.

l

The f flag parameter is included in some commands to select specific blocks, bits, or images.

Page 321

Chapter 15

Using the RS-485 Port 15-27

Serial Line Initialization

Use this command to set two parameters for the serial line error tracking (listed as nl(H) / n I(L) and n2(H)l nZ(L) for this command, and dl and d2 in the response to the Serial Line Diagnosis command). Refer also to the Serial Line Error Tracking section in this chapter for more information. This command has the following structure: :..........:...............~...............~...............~

...............

.

i 11 i nl (H) ; nl (L) i n2 (H) i n2 (L) i 1..........:...............:...............:...............~........ ....... . Where:

11 = Serial Line Initialization command nl(H) I nl(L) = Maximum numberoferroneous messages (default = 100). Range is 0000 -FFFF. nZ(H) I n2(L) = Maximum number of inspections between resets of consecutive erroneous error counter, or between reenabling of communications (default = 500). Range is OOOOFFFF.

Sending this command also resets the VIM2 module’s counter for each parameter (refer to d3 and d4 in the response to the Serial Line Diagnostics command). Set the n l(H) / n I(L) value according to the selected baud rate, and the maximum allowable error delay. Set the nZ(H)l n2(L) value according to the average inspection rate and the required delay before trying to reenable communications. Host/Mode non-master

Stipulations: Valid for either master host or host. Valid in all modes.