0% found this document useful (0 votes)
145 views40 pages

AL1x2x Acyclic Commands Rev2

The document describes how to send acyclic commands to an IO-Link device using the Add_On DFB instruction for the AL1x2x PLC. Key steps include: 1. Importing the DFB instruction file and declaring tags 2. Referencing the device description to determine command parameters 3. Populating the DFB instruction with port, index, command, and data to write configuration values 4. Toggling the trigger to send commands and reading responses

Uploaded by

Phạm Nhất
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views40 pages

AL1x2x Acyclic Commands Rev2

The document describes how to send acyclic commands to an IO-Link device using the Add_On DFB instruction for the AL1x2x PLC. Key steps include: 1. Importing the DFB instruction file and declaring tags 2. Referencing the device description to determine command parameters 3. Populating the DFB instruction with port, index, command, and data to write configuration values 4. Toggling the trigger to send commands and reading responses

Uploaded by

Phạm Nhất
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

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 DFB 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 Schneider folder to find the DFB Instructions.
a. Unzip the “AL1x2x DFB Instruction.<date>.zip”
b. Open the Folder named “3. DFB Instruction-Acyclic Commands” to find the
Acyclic_iol .xdb Acyclic DFB files.
Acyclic_backup_restore .xdb DFB files. To validate the Back-up (memorization in a port of master)
Using DFB 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 DFB Instruction to send Commands
6

2. Import the DFB instruction to the PLC.

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


Using DFB Instruction to send Commands
7

4. Click and drag the DFB 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 DFB Instruction to send Commands
8

6. 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 DFB Instruction to send Commands
9

7. 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 DFB Instruction to send Commands
10

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 DFB Instruction to send Commands
11

8. 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 DFB Instruction to send Commands
12

9. 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 DFB Instruction to send Commands
13

12. Toggle the Trigger bit to send the command


13. No errors are returned and the laser is off.
14. Done
Using DFB Instruction to send Commands
14

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 DFB Instruction to send Commands
15

15. Toggle the Trigger bit to send the command: %M0


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

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
17

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 DFB Instruction to send Commands
18

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 DFB Instruction to send Commands
19

22. Toggle the Trigger bit to send the command


23. The Error_bit goes True and Error_Codes are returned.
Using DFB Instruction to send Commands
20

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

128: Hex (80)


48: Hex (30)

From the IO Device Description of the O5D100


Using ifm AL1x2x Mailbox to send Commands
21

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
22

AL1x2x Command Mailbox: Request


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

AL1x2x Command Mailbox: Response


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

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
25

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
26

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
27

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
28

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

Binary code for byte Length. Write Command


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

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

4. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
30

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


Response Byte Request = True
Data[6].8-Data[6].15
shows no errors
Binary code
for byte Length of
Response
O5D Laser Config is
8 bit command = 1 byte
Using ifm AL1x2x Mailbox to send Commands
31

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

Binary code
for byte Length. Write Command
O5D Laser Config is Request Set True
8 bit command = 1 byte

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

7. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
33

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


Response Byte Request = True
Data[6].8-Data[6].15
shows no errors
Binary code
for byte Length of
Response
O5D Laser Config is
8 bit command = 1 byte
Using ifm AL1x2x Mailbox to send Commands
34

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
35

10. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
36

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

Response Byte Data[6].8- Binary code


Data[6].15 shows a value for byte Length of
of 1 indicating laser is on. Response
O5D Laser Config is
8 bit command = 1 byte
Using ifm AL1x2x Mailbox to send Commands
37

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

Binary code
for byte Length. Write Command
O5D Laser Config is Request = Set True
8 bit command = 1 byte

Invalid Value for


Laser configuration
Using ifm AL1x2x Mailbox to send Commands
38

13. Toggle the Trigger bit to send the command


Using ifm AL1x2x Mailbox to send Commands
39

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
8030 Hex (2 byte) Error 2 byte Command
code Response Response
Using ifm AL1x2x Mailbox to send Commands
40

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

From the IO Device Description of the O5D100

You might also like