IO-Link Master2.02.06
 
Loading...
Searching...
No Matches
Quickstart - IO-Link Master

Software Installation

To start working with the IO-Link Master, you need the software Code Composer Studio™(CCS).

CCS Example Project

Connect the Evaluation Board LP-AM263P

  • Connect the J9 and J10 on the LP-AM263P to 3.3V using jumpers (for powering up the Breakout Board)
  • Connect the IO-Link/Breakout Board BOOSTXL-IOLINKM-8 to the LP-AM263P board via J1/J3, J2/J4, J5/J7, and J6/J8 connectors. Ensure not to press too hard to avoid any contact with the screw heads.
  • Connect the J10 connector on the LP-AM263P to a USB-C 5.0V power supply (min. 3.0A)
  • Connect the J7 connector on the IO-Link/Breakout Board BOOSTXL-IOLINKM-8 to a 24V power supply.
  • Connect the LP-AM263P to a computer using a micro-USB cable going to the J20 connector. This is for UART
    (for IOLink SMI Communication) as well as JTAG (for uploading and debugging).

Steps to Run the Example

Import Project in CCS

Importing the project into your CCS workspace

  • Click on File → Import Projects....
  • Navigate to the examples/industrial_comms/iolink_master_demo folder using the Browse... button.
  • Click on Select folder.

    CCS should have discovered and selected the project.
  • Click on Finish to import the project.

Compile, Run and Debug Project

  • Right-click on the project and click on "Build Projects"

  • Make sure the USB JTAG is connected to the PC and the Board is powered on.
  • To Debug, right-click on the project and select "Debug Project"
    CCS automatically builds the project(if not done explicitly), connects to the Board,
    transfers the compiled binary project data into the RAM and starts a debugging session.

  • When the transfer is complete the debugger halts at the main() function.

  • Click on Run to execute the program.

To run your code without the CCS debugger, you need to manually flash the compiled binary data
(including a compatible bootloader) into the devices QSPI attached flash memory.
(See Flash a Hello World example)

LED Behavior

The example uses one LED on the base board to indicate that the software is running. This is indicated by a slow blinking sequence.

The IO-Link add-on boards have multiple LEDs to indicate the status of the communication ports. The launchpad add-on board has an additional blue LED (Pin2) which is used to indicate the state of the pin. This pin is HW controlled and not changeable by software.

The port-specific LEDs in the example are implemented as follows:

Status LED green LED red
Inactive Off Off
Search for IO-Link device slow blinking Off
IO-Link normal operation On Off
Incompatible device On slow blinking
DI/DO Mode On Off
Overcurrent (LP/CQ) N/A fast blinking

Modify Example

This example runs the Master stack functions in its own separate task. This task initializes
all needed interfaces and then executes the IOLM_exampleRun() function in an endless loop.
The IOLM_exampleRun() function is located in the ExampleSMI.c file,
where it is possible to add or modify code to fit the desired environment.

Modify Non-volatile Storage Hardware Driver

For details see Non-Volatile Memory (NVM).

Using customized PRU Firmware

To use a customized PRU firmware, simply reference the binaries in the iolmPruExampleConfig structure in main.c, as can be seen in the example below:

SMI - Graphical User Interface

The IO-Link Master GUI can be used to connect to the IO-Link Master's
Standardized Master Interface (SMI) via USB , to set up configuration parameters,
read status information and communicate with attached IO-Link devices.

Connect to the Master

Now one can connect a micro USB cable to the UART USB port to XDS110 MAIN UART0 USB port (J20).

  • Make sure the example project is running on the IO-Link Master.
  • Start the IO-Link Master GUI tool.
  • Click on Scan for Master and wait for the results
  • COMx: Master should appear in Serial Connection → Port.
  • Click on Serial Connection → Connect

Port Configuration

In the Std Port Config tab the configuration and status of the Master's ports can be read and changed.

You can retrieve the Master's current port configuration and port status by clicking the corresponding buttons.

The default setting sets all ports except the first one (port number: 1) to DEACTIVATED. Port 1 is by default set to IOL_AUTOSTART, which starts an auto-detect-sequence. For more details on port modes see the section IO-Link Specification v1.1.4.

After changing the Master's port configuration it will be saved in its internal non-volatile memory and remain even after restarting or turning it off.

To connect a device to a certain port, its mode has to be changed to IOL_AUTOSTART. In this example, the device is connected in Port 4.

  • Physically connect your device to the IO-Link add-on board.
  • Set the Port Number to the desired port one wants to configure.
  • Open the dropdown list Port Mode: and select the desired mode.

  • Click on Set Port Config to send your altered configuration to the Master.

    If a device is connected and the communication is established, the port's status changes from DEACTIVATED to OPERATE.
  • Click on Get Port Status to see if the device is connected.

Read/Write Process Data

  • To read Process Data from a device go to the Process Data tab and set Port: to its corresponding port number.
  • Click on Read to read Process Data.

  • Enable Auto (ms): and click on Read to get continuous data.

Read/Write ISDUs

In the On Request Data tab you can request Indexed Service Data Units (ISDUs) from the device or send ISDUs to the device.
For more information on ISDUs see the IO-Link Specification v1.1.4.

  • As an example, you can get the vendor name by setting the Index to 16 and leaving the Sub-Index set to 0.

Load IODD files

It is possible to import IO Device Description (IODD) files for ones connected devices in the Std Port Config tab. This makes it easier to read and set device parameters.
For more information on IODD files see the IO-Link Specification v1.1.4 and the IODDFinder.

  • Make sure the port status is in OPERATE mode.
  • Click on Read IODD.
  • Navigate to the specific IODD file for the device.
  • Click on Open.
  • Click on the ISDU Request Data tab.
  • Click on Update List to read all available ISDUs from the device.
  • Values which aren't read-only can be changed and then sent to the device by pressing the Write button.