Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Acyclic Commands to an IO Link Device

Understanding Command Structure…………………….……………..... 2-3


Using the Acyclic Add_On Instruction to send Commands….... 4-21
Using ifm AL1x2x Mailbox to send Commands……………………... 22-41
Command Structure
2

Generic Request Structure to the IO-Link Device

Command Header Port # – Port Number where the IO-Link device is connected on the AL1x2x module
Port# Index – Parameters changed; Units, Display, Switch Points, etc…
Index & SubIndex SubIndex – Sub menu parameters within the Index parameter

Read Or Write Designation Read Or Write Designation bits


Trigger Trigger – Bit to trigger command

Command Length – Number of bytes to be sent to the IO-Link device


Command Data Command Values – Number Value of each parameter to be written
Command Length
Command Values
All Values for Index, SubIndex, command length, and Value Range are given in the IO Device
Description.
Response Structure
3

Generic Response Structure from the IO-Link Device

Command Header Port # – Port Number where the IO-Link device is connected on the AL1x2x module
Port# Index – Parameters changed; Units, Display, Switch Points, etc…
Index & SubIndex SubIndex – Sub menu parameters within the Index parameter

Read Or Write Designation Read Or Write Designation bits


Handshake Handshake – Acknowledgement bit indicating command was received

Command Data Command Length – Number of bytes of the command response


Command Values – Number Value of each parameter read
Command Length
Error Codes – Error Values received when a fault occurs in the write command
Command Response
Error Codes
All Values for Index, SubIndex, command length, and Value Range are given in the IO Device
Description.
Using Add_On Instruction to send Commands
4

Add_On Instructions for sending acyclic commands to any manufacturer’s IO Link Device

1. Open Folder 3 in the AL1x2x PLC Allen Bradley folder to find the Add_On Instructions.
a. Unzip the “AL1x2x AddOn Instruction.<date>.zip”
b. Open the Folder named “3. AddOn Instruction-Acyclic Commands” to find the
4 port and 8 port .L5X Acyclic Add_On files.
Using Add_On Instruction to send Commands
5

Example: An ifm O5D100 is connected to port 1 of the AL1x2x.

A. Send a command to the O5D100 to turn the laser off.


B. Send another command to turn the laser on.
C. Send an invalid command to the O5D100 to generate an error code.
Using Add_On Instruction to send Commands
6

2. Import the Add_On instruction to the PLC.

3. Select the appropriate .L5X for the application; 4 port or 8 port


Using Add_On Instruction to send Commands
7

4. Click and drag the Add_On instruction onto a rung of logic.

5. Enter a unique name for the Acyclic_nPort_IOL, then right click on the name to
declare the new tag.
Using Add_On Instruction to send Commands
8

6. Click Create in the New Tag window

7. In the Add_On Instruction fill in the PLC_Input and PLC_Output parameters with the
Input and Output Data from the Controller Tags of the AL1x2x Ethernet Module.
Using Add_On Instruction to send Commands
9

8. Download the logic rung to the PLC and put the PLC in Run Mode
Using Add_On Instruction to send Commands
10

9. Find the IO Device Description PDF for the IO-Link device from the ifm website
a. For ifm devices go to the ifm global website, text search the IO-Link device’s article
number and click the button.
b. Click the article number in the search results to be taken to the datasheet.
Using Add_On Instruction to send Commands
11

c. From the datasheet click on the Downloads tab

d. Scroll down through the datasheet to find and download the IO Device Description PDF
Using Add_On Instruction to send Commands
12

10. Find the Index, SubIndex, Command Length and Value range for the
Laser Configuration settings for the O5D100 from the IO Device Description PDF.

From the IO Device Description of the O5D100


Using Add_On Instruction to send Commands
13

11. Input the Port Number, Index, SubIndex, Write Command, Command Length,
and WR_Data_1 in the Acyclic data Req and Resp Add_On Instruction

Write Command = 2
Read Command = 1

Command Length is 8 bits (1 byte)

A 0 is being sent to turn off the


Laser of the O5D100
Using Add_On Instruction to send Commands
14

12. Toggle the Trigger bit to send the command


13. No errors are returned and the laser is off.
Using Add_On Instruction to send Commands
15

14. Turn the laser on by sending a Laser Configuration request with a Value Range of 1.
Input the Port Number, Index, SubIndex, Write Command, Command Length, and Wr_Data_x

Write Command = 2
Read Command = 1

Command Length is 8 bits (1 byte)

A 1 is being sent to turn on the


Laser of the O5D100
Using Add_On Instruction to send Commands
16

15. Toggle the Trigger bit to send the command


16. No errors are returned and the laser is turned on.
Using Add_On Instruction to send Commands
17

17. To verify the Laser Configuration use a Read command. Input the Port Number, Index,
SubIndex, Read Command, and Command Length

Write Command = 2
Read Command = 1

Command Length is 8 bits (1 byte)


Using Add_On Instruction to send Commands
18

18. Toggle the Trigger bit to send the command


19. No errors are returned.
20. RD_8Bit_Data returned a value of 1 indicating the Laser configuration is “Laser on.”
Using Add_On Instruction to send Commands
19

21. Send an invalid command to the O5D100 by requesting a Laser Configuration value of 10.
Input the Port Number, Index, SubIndex, Write Command, Command Length, and
WR_Data_x in the AL1x2x command mailbox: Request

Write Command = 2
Read Command = 1

Command Length is 8 bits (1 byte)

An invalid value of 10 (a hex) is being sent


to the O5D100
Using Add_On Instruction to send Commands
20

22. Toggle the Trigger bit to send the command


23. The Error_bit goes True and Error_Codes are returned.
Using Add_On Instruction to send Commands
21

24. Reference the Error Types in the IO Device Description document.

From the IO Device Description of the O5D100


Using ifm AL1x2x Mailbox to send Commands
22

The AL1x2x Command Mailbox: Request and Response is pre-mapped by the eds file to the
Configuration Input and Output tags of the AL1x2x Ethernet Module.

Request Response
Using ifm AL1x2x Mailbox to send Commands
23

AL1x2x Command Mailbox: Request


Used to send a command to an IO-Link device using the Controller Output Tag <ModuleName>:O.Data.
Command Header
Read/Write Designation and Toggle
Command Data
Using ifm AL1x2x Mailbox to send Commands
24

AL1x2x Command Mailbox: Response


Used to view the response from an IO-Link device using the Controller Input Tag <ModuleName>:I.Data.
Command Header
Read/Write Designation and Handshake
Command Data
Using ifm AL1x2x Mailbox to send Commands
25

Example: An ifm O5D100 is connected to port 1 of the AL1x2x.

A. Send a command to the O5D100 to turn the laser off.


B. Send another command to turn the laser on.
C. Send an invalid command to the O5D100 to generate an error code.
Using ifm AL1x2x Mailbox to send Commands
26

1. Find the IO Device Description PDF for the IO-Link device from the ifm website
a. For ifm devices go to the ifm global website, text search the IO-Link device’s article
number and click the button.
b. Click the article number in the search results to go to the datasheet.
Using ifm AL1x2x Mailbox to send Commands
27

c. From the datasheet click on the Downloads tab

d. Scroll down through the datasheet to find and download the IO Device Description PDF
Using ifm AL1x2x Mailbox to send Commands
28

2. Find the Index, SubIndex, Command Length and command array values for the
Laser Configuration settings on the O5D100 from the IO Device Description PDF.

From the IO Device Description of the O5D100


Using ifm AL1x2x Mailbox to send Commands
29

3. Input the Port Number, Index, SubIndex, Write Command, Command Length, and
Command Array values in the AL1x2x command mailbox: Request

Write Command
Request Set True

Binary code for byte Length.


O5D Laser Config is an
8 bit command (1 byte)

Value of 0 to be sent
to turn laser off
Using ifm AL1x2x Mailbox to send Commands
30

4. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
31

5. Open the AL1x2x command mailbox: Response to see the command response.
Port Number, Index, SubIndex, Write Response, Handshake, Response Length, and
Command Array values. The laser is Off.

Write Command Echo


Request = True

Binary code
for byte Length of
Response
O5D Laser Config is
8 bit command = 1 byte

Response Byte
Data[6].8-Data[6].15
shows no errors
Using ifm AL1x2x Mailbox to send Commands
32

6. Turn the laser on by sending a Laser Configuration request with a Value Range of 1.
Input the Port Number, Index, SubIndex, Write Command, Command Length and
Command Array values in the AL1x2x command mailbox: Request

Write Command
Request Set True

Binary code
for byte Length.
O5D Laser Config is
8 bit command = 1 byte

Value of 1 to be sent
to turn laser on
Using ifm AL1x2x Mailbox to send Commands
33

7. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
34

8. Open the AL1x2x command mailbox: Response to see the command response.
Port Number, Index, SubIndex, Write Response, Handshake, Response Length, and
Diagnostic Data (Errors) = 0. The laser is on.

Write Command Echo


Request = True

Binary code
for byte Length of
Response
O5D Laser Config is
8 bit command = 1 byte

Response Byte
Data[6].8-Data[6].15
shows no errors
Using ifm AL1x2x Mailbox to send Commands
35

9. To verify the Laser Configuration use a Read command. Input the Port Number, Index,
SubIndex, Read Command.

Read Command
Request Set True
Using ifm AL1x2x Mailbox to send Commands
36

10. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
37

11. Open the AL1x2x command mailbox: Response to see the command response.
Port Number, Index, SubIndex, Write Response, Handshake, Response Length, and
Command Response = 1

Read Command Echo


Request = True

Binary code
for byte Length of
Response
O5D Laser Config is
8 bit command = 1 byte

Response Byte Data[6].8-


Data[6].15 shows a value
of 1 indicating laser is on.
Using ifm AL1x2x Mailbox to send Commands
38

12. Send an invalid command to the O5D100 by requesting a Laser Configuration value of 10.
Input the Port Number, Index, SubIndex, Write Command, Command Length, and
Command Array values in the AL1x2x command mailbox: Request

Write Command
Request = Set True

Binary code
for byte Length.
O5D Laser Config is
8 bit command = 1 byte

Invalid Value for


Laser configuration
Using ifm AL1x2x Mailbox to send Commands
39

13. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
40

14. Open the AL1x2x command mailbox: Response to see the command response.
Port Number, Index, SubIndex, Write Response, Handshake, Response Length, and
Diagnostic Data (Errors) = 8030 Hex

Write Command Echo


Request = True

2 byte Command
Response

8030 Hex (2 byte) Error


code Response
Using ifm AL1x2x Mailbox to send Commands
41

15. Reference the Error Types in the IO Device Description document.

From the IO Device Description of the O5D100

You might also like