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

The text of a manual · part 8 of 25

Bulletin 5370 CVIM Configurable Vision Input Module Communications Manual: 4 - Using the Remote I/O Link, pages 56 to 64

Pages 56 to 64 of 202, from Bulletin 5370 CVIM Configurable Vision Input Module Communications Manual

The original document is the PDF (723 KB). 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 5370-CVIM

Page 56

Chapter 4 Using the Remote I/O Link (Node Adapter)

Converting Results Data (cont’d)

Transferring Configuration Blocks

You can transfer configuration block data between the CVIM module and CFG Host using block transfer reads and writes. These blocks contain the operating instructions for the CVIM module (refer to Appendix D). When transferring configuration blocks, note the following: When the CVIM module is receiving configuration blocks from a CFG Host, the CVIM module will leave the active run mode, set the module busy bit, turn off local I/O, turn off the data valid bit, and ignore any input triggers (setup menu option is also disabled). After receiving one or more new configuration blocks (and the last block bit), the CVIM module will validate the entire configuration since many of the operating parameters are interrelated. If the CVIM module detects an invalid configuration, the new configuration will be ignored and the CVIM module will set the Configuration Fault bit and operate using the old configuration. Note that this is true for TEMPLATE blocks. These blocks are described in the next section.

4–19

Page 57

Chapter 4 Using the Remote I/O Link (Node Adapter)

Transferring Configuration Blocks (cont’d)

You must use the discrete I/O bits in conjunction with block transfers to inform the CVIM module of the Block Transfer Type, Toolset Number, Block Number and, Last Block by setting discrete bit information using simple ladder programming (refer to Table 4.B):

• Set bit 1 of output word 3 to indicate a CONFIGURATION block transfer. • Use bits 10 through 17 of output word 3 to indicate which block to transfer. Refer to Appendix D for block numbers.

• Set bit 3 in output word 3 to tell the CVIM to send the last block. If you forget to set this bit, the CVIM module will wait for an indefinite period of time for more data. Note: Later in this chapter we provide an example PLC program for accessing configuration data.

Transferring Template Blocks

Part of the configuration memory is reserved for blocks of data which contain previously stored image information when using reference windows. These blocks are referred to as template blocks. Template blocks can be accessed like configuration blocks with some differences:

• A template may require different amounts of memory depending upon the size of the template and the complexity of the feature.

• Total memory storage may require up to 100 (64 word) blocks of memory.

• You may not alter template data, you should only upload and download the data between the CVIM and a host.

• You must keep the complete template memory intact. You may not transfer a single template by itself.

• When template data is being tansferred (to or from) the CVIM module, the CVIM module will exit the active mode and ignore incoming triggers. The CVIM will also assert the module busy bit.

4–20

Page 58

Chapter 4 Using the Remote I/O Link (Node Adapter)

Transferring Template Blocks (cont’d)

Word 1, bits 8 – 15 of the first template block indicate the total number of template blocks of the configuration. You must always upload or download all of the template blocks as a unit. You cannot archive only a part of the template blocks. When uploading templates from the CVIM module, the program should read the first template block and check word 1, bits 8– 15 to determine the number of template blocks to follow. The number of blocks remaining is 1 less than the total number of template blocks. When downloading templates to the CVIM module, the program must send all template blocks. Bit 8 – 15 of word 1 determine the number of blocks to send: Note: An error in downloading templates will cause the loss of all templates presently stored in CVIM module RAM.

Example Program for Accessing Results Data

The following program provides an example of using continuous block transfer to detect and acquire new data (Reference line#1 X–position) after an inspection is triggered. The program then counts the total number of times new results were obtained by the PLC. The program assumes that the CVIM module is rack 02 and the push buttons are rack 01. Note: This is not the most efficient method to accomplish this function. A faster method is to connect the data valid bit output on the 1771-JMB board to a PLC input (refer to Figure 4.9). You can then use the valid bit output to trigger a single read. Refer to Chapter 3 for a description of the data valid bit. The program has the following structure: 1. Waits for push button trigger. 2. Reads present number of total triggers before sending trigger request to the CVIM module. 3. Triggers the CVIM module. 4. Continues to read total number of triggers to detect new data. 5. Retrieves new data. 6. Program waits for next push button trigger. The program begins on the next page.

4–21

Page 59

Chapter 4 Using the Remote I/O Link (Node Adapter)

Example Program for Accessing Results Data, Cont’d 31 December 1989 Page 1 Ladder Listing Processor File: CVIMBLK.ACH Rung 2:0 Rung 2:0 Block Transfer Results, Toolset 1, Results Block 1. | Block | | Transfer | | Results | | O:023 | +–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+–––(L)––––+–+ | | 00 | | | |Specify | | | |Toolset | | | | O:023 | | | +–––(L)––––+ | | | 04 | | | |Block 1 of| | | |4 Types | | | | O:023 | | | +–––(L)––––+ | | 10 | Rung 2:1 Push Button Input to Trigger a CVIM Inspection. | I:010 B3 B3 | +––––] [––]ONS[––––––––––––––––––––––––––––––––––––––––––––––––––––––––( )–––––+ | 02 4 3 | Rung 2:2 Flags for First Block Read, and Continuous Block Read Until New Results. | B3 B3 | +––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+––––(L)–––+–+ | 3 | 2 | | | | B3 | | | +–––(L)––––+ | | 1 | | Rung 2:3 Read Results Block #1 From CVIM. | B3 +BTR––––––––––––––––––––+ | +––––]ONS[––––––––––––––––––––––––––––––––––––––+BLOCK TRNSFR READ +–(EN)–+ | 2 |Rack 2| | | |Group 0+–(DN) | | |Module 0| | | |Control Block N7:100+–(ER) | | |Data file N7:0| | | |Length 0| | | |Continuous Y| | | +–––––––––––––––––––––––+ | Rung 2:4 Clear Block Transfer Read Error, If It Occurs. | BTR Error BTR Enable | | N7:100 N7:100 | +––––] [–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––(U)–––––+ | 12 15 |

4–22

Page 60

Chapter 4 Using the Remote I/O Link (Node Adapter)

Example Program for Accessing Results Data, Cont’d 31 December 1989 Page 2 Ladder Listing Processor File: CVIMBLK.ACH Rung 2:5 Rung 2:5 Set n7:70 to the ”Total Triggers” Just Before Initiating this Inspection. | BTR Done |First Read | | N7:100 B3 +FLL–––––––––––––––+ | +––––] [–––––––] [–––––––––––––––––––––––––––––––––––––––|–+FILL FILE +++ | 13 1 | |Source N7:63||| | | |Dest #N7:70||| | | |Length 1||| | | +–––––––––––––––––+|| | | B3 || | +––(U)–––––––––––––––+| | | 1 || | | CVIM Trig || | | 0:020 || | +––(L)–––––––––––––––+| | 12 | |Rung 2:6 After the Requested Inspection is Done, This Rung will Detect the ”Total Trigger” Value Incrementing, the New Results will be Available. | +NEG–––––––––––––––+ B3 | +–+NOT EQUAL +––––––––––––––––––––––––––––––––––––––––––––––+–––(L)–––++ | |Source A N7:63| | 15 || | | 6824| | || | |Source B N7:70| | || | | 0| | 0.020 || | +––––––––––––––––––+ +–––(U)–––+| | 10 | Rung 2:7 This Rung Counts Total Number of Times New Results were Received by PLC Since Reset Button was Pushed. | B3 +CTU–––––––––––––––+ | +––] [––––––––––––––––––––––––––––––––––––––––––––––––––++Count Up +–(CU)++ | 15 ||Counter C5:1| || | ||Preset 0+–(DN)|| | ||Accum 30| || | |+––––––––––––––+ || | | B3 || | +––(U)––––––––––––––––+| | | 2 || | | B3 || | +––(U)––––––––––––––––+| | 15 |

4–23

Page 61

Chapter 4 Using the Remote I/O Link (Node Adapter)

Example Program for Accessing Results Data, Cont’d 31 December 1989 Page 3 Ladder Listing Processor File: CVIMBLK.ACH Rung 2:8 Rung 2:8 This Rung Resets All Flags and the Counter. | I:011 C5:1 + +––––] [–––––––––––––––––––––––––––––––––––––––––––––––––+–(RES)–––––––––––––+–+ | 17 | | | | | | | | | | | | | B3 | | | +–(U)–––––––––––––––+ | | | 1 | | | | B3 | | | +––(U)––––––––––––––+ | | | 2 | | | | B3 | | | +––(U)––––––––––––––+ | | | 15 | | | | 0:020 | | | +––(U)––––––––––––––+ | | | 12 | | | | N7:100 | | | +––(U)––––––––––––––+ | | | 13 | | | |+FLL–––––––––––––+ | | | ++FILL FILE +–+ | | +Source N7:63+ | | +Dest #N7:70+ | | +Length 1+ | | +––––––––––––––––+ | Rung 2:9 | | +–––––––––––––––––––––––––––––––––[End of File]––––––––––––––––––––––––––––––––+ | |

4–24

Page 62

Chapter 4 Using the Remote I/O Link (Node Adapter)

Example Program For Accessing Configuration Data

The following program provides an example of using bi–directional block transfers to:

• Transfer CVIM module configuration data to a PLC. • Modify the data. In this program we move the location of Window 1, Toolset 1 up or down.

• Transfer the reconfigured data back to the CVIM module from the PLC. Ladder Listing Rung 2:0

31 December 1989 Processor File: CVIMCNFG.ACH

Page 1 Rung 2:0

Initialize CVIM for Configuring Block Transfers.

TS1, Configures Block 42 of 135. Block Xfer | Config | | O:023 | +–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––+–––( )––––+–+ | | 01 | | | |Toolset 1 | | | | O:023 | | | +–––( )––––+ | | | 04 | | | |32’s BIT | | | | O:023 | | | +–––( )––––+ | | | 15 | | | |8’s BIT | | | | O:023 | | | +–––( )––––+ | | | 13 | | | |2’s BIT | | | | O:023 | | | +–––( )––––+ | | | 11 | | Rung 2:1 | PB Request for Moving Window 1 Location Up on Screen (SUB). | | UP UP | | I:010 B3 B3 | +––––] [–––––[ONS]–––––––––––––––––––––––––––––––––––––––––––––––––––––(L)–––––+ | 14 0 1 | Rung 2:2 | PB Request to Move Window 1 Location Down on Screen (ADD). | | DOWN DOWN | | I:010 B3 B3 | +––––] [–––––[ONS]–––––––––––––––––––––––––––––––––––––––––––––––––––––(L)–––––+ | 15 10 11 |

4–25

Page 63

Chapter 4 Using the Remote I/O Link (Node Adapter)

Example Program For Accessing Configuration Data Cont’d.

31 December 1989 Page 2 Ladder Listing Processor File: CVIMCNFG.ACH Rung 2:3 Rung 2:3 Read Present Configuration Data for Window 1 (42 words). | UP |BTR EN |BTW EN Window 1 DATA. | | B3 N7:100 N7:110 N7:110 +BTR––––––––––––––––––––+ | +–+–––] [––––+–––]/[––––––––]/[––––––––] [––––––+BLOCK TRNSFR READ +–(EN)–+ | | 1 | 15 15 13 |Rack 02| | | | | |Group 0+–(DN) | | |DOWN | |Module 0| | | | B3 | |Control Block N7:100+–(ER) | | +–––] [––––+ |Data file N7:0| | | 11 |Length 0| | | |Continuous N| | | +–––––––––––––––––––––––+ |

Rung 2:4 Move Window 1 Location UP (SUB) or DOWN (ADD) 20 Pixels on Screen. | BTR DN |UP | | N7:100 B3 +SUB–––––––––––––––+ | +––––] [––––––––] [–––––––––––––––––––––––––––––––––––––––+SUBTRACT +–+ | 13 1 |Source A N7:12| | | | 60| | | |Source B 20| | | | | | | |Dest N7:12| | | | 60| | | +––––––––––––––––––+ | Rung 2:5 | BTR DN |DOWN | | N7:100 B3 +ADD–––––––––––––––+ | +––––] [––––––––] [–––––––––––––––––––––––––––––––––––––––+ADD +–+ | 13 11 |Source A N7:12| | | | 60| | | |Source B 20| | | | | | | |Dest N7:12| | | | 60| | | +––––––––––––––––––+ |

4–26

Page 64

Chapter 4 Using the Remote I/O Link (Node Adapter)

31 December 1989 Page 3 Ladder Listing Processor File: CVIMCNFG.ACH Rung 2:6 Rung 2:6 Write New Configuration Data to CVIM, Reset for Next Request to Move Window 1 Location ”Last Block” Bit Must be Sent to Inform CVIM to Revalidate and Run!!!!!!! | BTR DN |BTR EN |BTR EN | | N7:100 N7:100 N7:110 I:020 +BTW––––––––––––––––––––+ | +––––] [––––––––]/[––––––––]/[––––––––] [–––––++BLOCK TRNSFR READ +–(EN)+–+ | 13 15 15 03 ||Rack 2| | | | ||Group 0+–(DN)| | | ||Module 0| | | | ||Control Block N7:110+–(ER)| | | ||Data file N7:0| | | | ||Length 0| | | | ||Continuous N| | | | |+–––––––––––––––––––––––+ | | | | UP | | | | B3 | | | +–––––––(U)––––––––––––––––––––+ | | | 1 | | | | DOWN | | | | B3 | | | +–––––––(U)––––––––––––––––––––+ | | | 11 | | | | BTN DN | | | | N7:100 | | | +–––––––(U)––––––––––––––––––––+ | | | 13 | | | | Last Block | | | | O:023 | | | +–––––––(L)––––––––––––––––––––+ | | 03 |

4–27