The text of a manual · part 40 of 43
QX-870 Industrial Raster Scanner User Manual, pages 391 to 400
Pages 391 to 400 of 426
The original document is the PDF (7.0 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 Microscan QX-870
Page 391
Appendices
Programming Flow Charts Triggered by PLC, symbol data required, timeout or decode ends read cycle. Setup: Read Cycle Trigger Mode = External Edge or External Level. Symbol Data Output = Enabled globally and for EtherNet/IP. When to Output = As Soon As Possible. End of Read Cycle = Timeout. No Read message = Enabled.
QX-870 Industrial Raster Scanner User Manual
A-105
Page 392
Using EtherNet/IP
NET and MOD LED Indicators MOD (Module) Indicator State
Summary
Steady OFF
No power
Steady GREEN
Device operational
Steady RED
Major fault
Flashing GREEN / Self-test RED
Requirement If no power is supplied to the device, the module status indicator will be steady OFF. If the device is operating correctly, the module status indicator will be steady GREEN. If the device has detected a non-recoverable minor fault, the module status indicator will be steady RED. While the device is performing its power-up testing, the module status indicator will be flashing GREEN / RED.
Microscan Implementation Per requirement Per requirement Safe Mode: Basic comm. only. Scanning system non-functional. Per requirement.
NET (Network) Microscan Implementation No power, no Per requirement. If the device does not have an IP device has IP address Steady OFF address (or is powered off), the network Before acquired an IP status indicator will be steady OFF. address via DHCP. requirement. If the device has no established connections, Per After device has but has obtained an IP address, the Flashing GREEN No connections network status indicator will be flashing acquired an IP address (static or GREEN. DHCP). If the device has at least one established connection (even to the Message Steady GREEN Connected Router), the network status indicator will Per requirement. be steady GREEN. Connection If one or more of the connections in which the device is the target has timed Per requirement. timeout Flashing RED out, the network status indicator will be flashing RED. If the device has detected that its IP Steady RED Duplicate IP address is already in use, the network Not implemented. status indicator will be steady RED. While the device is performing its Flashing GREEN / Self-test power-up testing, the module status Per requirement. RED indicator will be flashing GREEN / RED. Indicator State
A-106
Summary
Requirement
QX-870 Industrial Raster Scanner User Manual
Page 393
Appendices
Appendix K, Operating the Serial Gateway Data Fields in the QX-870 EtherNet/IP (CIP) Interface Object This appendix outlines a rough pseudo-code description of how to operate the serial gateway data fields in the QX-870 EtherNet/IP (CIP) interface object.
Service Code All EtherNet/IP (CIP) data com transactions with the QX-870, both send and receive, are performed with Service Code=0x45, Class ID=0x68, Instance=1, Attribute ID=0x6A. Each transaction can send data, receive data, or both. Attribute 0x6A has a variable size, with a minimum of 16 bytes, and the maximum 486 bytes. The first 16 bytes are a header with several fields that enable serial gateway-style functionality. The remainder of the data packet can be 0 to 470 bytes, and contains the serial data. The usage of these fields, and the serial data, is described below.
To send a command to the QX-870: 1. Populate the Serial Data field with a serial command. 2. Populate the Send Length field with the string length of the serial command. 3. If only sending a command, and not waiting for a response in the same transaction: • Populate the Receive Timeout field with 0. • Populate the Receive Length field with 0. If sending a command and waiting for a response in the same transaction: • If sending a serial trigger, and expecting symbol data output: Populate the Receive Timeout with a value equal to the device’s read cycle timeout <K220,,timeout>, plus 20 (milliseconds). • If sending a command that requests data, like a read of the counters <T><V><X><N>: Populate the Receive Timeout with a value of 10 (milliseconds) or greater. Populate the Receive Length field with a value set to the maximum length of data the PLC can handle in one transaction, up to 470. If set too small, the device will fragment the response over multiple transactions. 4. Populate the Receive Request Flags with 0x1, if needed, to delete all pending data from the device before it sends a response to the command. 5. Initiate the transaction. 6. When the transaction is complete, check the Receive Length field: • If Receive Length is 0, no data has been received.
QX-870 Industrial Raster Scanner User Manual
A-107
Page 394
Operating the Serial Gateway Data Fields in the QX-870 EtherNet/IP (CIP) Interface Object • If Receive Length is non-zero, then new data has been received. Process the Serial Data field up to the value of Receive Length, and manage any fragmentation per standard programming technique. Check the Receive Response Flags. If the value is not 3, then the string sitting in the Serial Data field in not a complete message. It is a fragment of a larger message.
To receive data from the QX-870: 1. Populate the Send Length field with 0. 2. Populate the Receive Length field with a value set to the maximum length of data the PLC can handle in one transaction, up to 470. If set too small, the device will fragment the response over multiple transactions. 3. Populate the Receive Timeout field with a value that the PLC is willing to wait for the transaction to complete. When receiving bar code data, this would typically be set to the read cycle timeout <K220,,timeout>, plus 20 milliseconds or so. When checking for a command response, set this to at least 10 milliseconds. 4. Populate the Receive Request Flags with 0x1, if needed, to delete all pending data from the device, and only respond with data generated by the device after this request is received. 5. Initiate the transaction. 6. When the transaction is complete, check the Receive Length field: • If Receive Length is 0, no data has been received. • If Receive Length is non-zero, then new data has been received: Process the Serial Data field up to the value of Receive Length, and manage any fragmentation per standard programming technique. Check the Receive Response Flags. If the value is not 3, then the string sitting in the Serial Data field in not a complete message. It is a fragment of a larger message.
A-108
QX-870 Industrial Raster Scanner User Manual
Page 395
Appendices
Appendix L, Allen-Bradley Version 16 PLC Setup This section was created and run on the following Allen Bradley/Rockwell components: • RSLogix 5000 Version 16 • ControlLogix 5561 processor • 756-ENBT/A EtherNet/IP interface card, firmware version 4.003 or newer. This setup procedure was also followed in RSLogix with a CompactLogix 5332E as the processor, though the final program was not tested with a CompactLogix processor. 1. Create the I/O Configuration for the base system, including the system’s Ethernet interface:
QX-870 Industrial Raster Scanner User Manual
A-109
Page 396
Allen-Bradley Version 16 PLC Setup 2. Add QX-870 by right-clicking on the Ethernet interface, and select “New Module”:
3. Select “ETHERNET-MODULE Generic Ethernet Module”, and click OK:
A-110
QX-870 Industrial Raster Scanner User Manual
Page 397
Appendices 4. Configure the following fields: “Name” = A useful name to remember the unit “IP Address” = The IP Address of QX-870 “Comm Format” = “Data – DINT” “Input” “Assembly Instance” = Choose either 100 (Small) or 101 (Big) “Input” “Size” = 21 (Small), or 44 (Big) “Output” “Assembly Instance” = 198 “Output” “Size” = 3 “Configuration” “Assembly Instance” = 1 “Configuration” “Size” = 0 (none) 5. Click OK when done. Example: For Small IN (Instance 100, Size 21):
QX-870 Industrial Raster Scanner User Manual
A-111
Page 398
Allen-Bradley Version 16 PLC Setup Example: For Big IN (Instance 101, Size 44):
6. Configure the “Required Packet Interval (RPI)” and click OK. 20 ms or slower is strongly recommended. 10 ms is the minimum allowed by QX-870:
A-112
QX-870 Industrial Raster Scanner User Manual
Page 399
Appendices 7. Double-click on the “Controller Tags” item, and verify QX-870’s :I and :O tags appear in the Controller Tags window:
8. Open the “Main Routine”:
QX-870 Industrial Raster Scanner User Manual
A-113
Page 400
Allen-Bradley Version 16 PLC Setup 9. Right-click on the top rung and select “Import Rung”:
10. Click the Attachments icon in this PDF to show the 32-000001-xx.L5X file. Save the file to the location of your choice. Navigate to the file and click Import.
Click the icon at left in this PDF to display attached files. Right-click the 32-000001-xx.L5X file and select Save Attachment.
After you have saved the 32-000001-xx.L5X file, navigate to it and click Import in the Import Rung dialog.
A-114
QX-870 Industrial Raster Scanner User Manual