Write to the IO-Link Device
This example uses the Raw_Set (0x33) service in the IO-Link Service Parameter object.
To write parameters to the IO-Link device, complete these steps.
- Create a message instruction and the message tag.
- Create the associated destination tag of the correct data types for the IO-Link data. You can also use an array.
- Open the Message Configuration dialog and enter the following information in the Configuration tab.
- Service Type = Custom
- Service Code = 0x33 (hex)
- Class = 0x10B (hex)
- Instance = IO-Link index number
For IO-Link index 0, the instance is represented as 0x10000, since CIP Instance 0 is used to address class attribute.- Attribute = 0 or the IO-Link subindex number (hex)
- Source Element = The tag that holds the data for the desired subindex
- Source Length = The number of bytes of data in the source tag
- Destination Element = Leave blank
- On the Communication tab, select the path to the IO-Link device.
- Select OK. The message is now configured and ready to use.If any element of the return data is larger than one byte, you must reverse the byte order of the element.When a controller is connected to the IO-Link master module, you must select the ‘Connected’ checkbox to write parameters with message instructions. If the ‘Connected’ checkbox is not selected, the messages may fail with a connection error. This error occurs because the controller owns the module, which is in Protection Mode, and does not allow external changes.Verify that the parameter you want to write to is writable. Parameters can be read-only, write- only, or read and write.For more information on the vendor-specific services in the IO-Link Service Parameter object, see Execute IO-Link Commands Through Explicit Messaging.
Provide Feedback