IO-Link Masterv2.01.01
 
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).

This example has been compiled and tested with the following versions:

Software Package Version
Code Composer Studio™(CCS) 12.7.0
MCU+ SDK 09.02.00.49
TI ARM clang 3.2.2.LTS
SysConfig Tool 1.20.0

CCS Example Project

Connect the Evaluation Board AM64x EVM

  • Connect the IO-Link/Breakout Board TMDS64DC01EVM to the AM64x EVM board via J2 and J3.
  • Connect the AM64x EVM to a 12V power supply.
  • Connect the IO-Link/Breakout Board TMDS64DC01EVM to a 24V power supply.
  • Connect the evaluation board to the computer using two micro-USB cables going to the J26 UART
    (for IOLink SMI Communication) and J28 JTAG (for uploading and debugging) on the AM64x EVM board.

Steps to Run the Example

Import Project in CCS

Importing the project into your CCS workspace

  • Click on File → Import.
  • Select C/C++ → CCS Projects.
  • Click on Next.
  • Navigate to the examples/industrial_comms/iolink_master_demo folder using the Browse... button.
  • Select the folder of the board you want to import.
  • Click on Select folder.

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

Compile, Run and Debug Project

  • Make sure the IO-Link Master USB JTAG is connected to the PC and the Master is powered on.
  • Since we are running the application on the R5F, one needs to initialize the whole board through the DMSC M3.
    The MCU+ SDK includes a launch script which does all the initalization steps.
    It is located in the MCU+ SDK folder at mcu_plus_sdk /tools/ ccs_load/ am64x/
  • One needs to check your Debug Configuration in Run → Debug Configurations.
    See if the configured launch file location fits to your setup environment.
    Otherwise one also needs to edit this line.
  • Click on Debug.

CCS automatically builds the project, connects to the Master,
transfers the compiled binary project data into the Master's 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.

Be aware that the IO-Link AM437x IDK Main Board revision differs from the regular IDK
and does not support SD storage.

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)

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 Storage (NVRAM) Hardware Driver.

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 (J26) of the AM64x EVM.

  • Make sure the example project is running on the IO-Link Master.
  • Start the IO-Link Master GUI tool.
  • Wait for it to scan available interfaces
  • 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: 0) to DEACTIVED.
Port 0 is by default set to IOL_AUTOSTART, which starts an auto-detect-sequence.
For more details on port modes see the section Set up IO Link Port
and the IO-Link Specification v1.1.3.

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.

  • 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 DEACTIVED 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):
  • 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.3.

  • 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.3 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.