Skip to content

Server walkthrough

Server Walkthrough

Firstly, let's set up the CTO configuration, then continue with configuring the device as a 5GHz Wi-Fi Server.

CTO Configuration

  1. Ensure firmware of Server is ≥ v2.3.

  2. Open the Proemion Configurator.

  3. Open a New configuration.

    New Configuration
    Figure 1: New Configuration

  4. You can see two devices under Local Connectivity Gateways
    Select the correct one, according to your device.

    Choose Device Type
    Figure 2: Choose Device Type

  5. Add DOD Information, and save as required

    Save DOD Information
    Figure 3: Save DOD Information

  6. Add a new 'Custom CAN Communication' folder.

    Custom CAN Communication
    Figure 4: Custom CAN Communication

  7. Add 'Transmit PDO Messages (PDOs)' to this folder.

    Transmit CAN messages
    Figure 5: Transmit CAN messages

  8. Add the appropriate number of PDOs.
    We are setting up three PDOs in this example:

    1. Analog Voltage 1
    2. Wireless Connection State 2
    3. Wireless Interface Watchdog Tick

    Add three PDOs
    Figure 6: Add three PDOs

  9. Device variables must be added in order to be sent as PDOs.
    In this example, we will send:

    • Analog Voltage 1

    • Wireless Connection State 2

    • Wireless Interface Watchdog Tick

  10. First, we must add the appropriate Device Variables.
    Add a 'Device Variables' group.

    Add Device Variables
    Figure 7: Add Device Variables

  11. As well as the three values we are transmitting, we base a decision on a forth Device Variable (Wireless Interface Watchdog Tick) - so add that too.
    There should be the following Device Variables:

    Device Variables Added
    Figure 8: Device Variables Added

  12. Rename PDOs as required to match the function.

    Rename Server PDOs
    Figure 9: Rename Server PDOs

Set Cyclic Analog Voltage

We will configure the transmission of a single Device Variable in the Object Dictionary (OD) to be sent on a periodic basis. It will be sent to COB-ID 0x300.

  1. Click on the 'PDO Analogue 1' PDO under 'Custom CAN Communication'

  2. Here we set the timing of the message.
    a. Select the CAN bus for transmission (2).
    This will be sent on the physical as well as wireless bus.
    b. CAN-ID length
    c. It is a cyclic message with a specified frequency.
    d. Destination COB-ID.

    Set Analog Communication parameters
    Figure 10: Set Analog Communication parameters

  3. Now that the transmission of the message has been defined, we specify the contents..

  4. Click the 'Mapping parameter' tab to define the data to send.

    Mapping parameter
    Figure 11: Mapping parameter

  5. Currently, no data is mapped into this PDO.

    Analog Mapping parameter
    Figure 12: Analog Mapping parameter

  6. At the bottom is where we select the data to put into the message.
    a. The data-type of the selected Device Variable is shown.
    You can pack several Device Variables into the same PDO if they fit.

    Analog Width
    Figure 13: Analog Width

    b. In this example, the Analogue Input is a 32bit real/float, so it takes up the entire PDO width.
    You can align different data with the green fields.
    c. Press 'New' when the field is correct.

  7. Items contained in this PDO are now listed.
    (In this case, just one, but all data packed into the message will be listed).

    Analog Input Listed
    Figure 14: Analog Input Listed

  8. The first PDO has been configured.

Cyclically if a condition is met

This configuration sends a message periodically only if some condition is met.
This example will send current state of the Wireless Watchdog Timer Counter (how many seconds since initializing the watchdog timer) every second after 30s (until the device resets at 10 minutes) from the Server.
The message will be sent to Cob-ID 0x303.

  1. Configure as in the image:
    a. Suitable CAN bus (2)
    b. Appropriate period (1000ms)
    c. Select 'Cyclic' and 'Send message on event'
    d. Configure destination COB-ID
    e. The lower half of this page determines the condition that must be met in order to trigger sending the message (at the appropriate time).

    Server Watchdog PDO configuration
    Figure 15: Server Watchdog PDO configuration

    f. It can be seen that if the Device Variable 'Wireless Interface Watchdog Tick' is greater than 30, then the message can be sent.
    Every time the timer is triggered, this evaluation will be checked.
    Since this value increases every second, this message will begin to be transmitted 30 seconds after boot.

  2. Configure the contents in a similar way as we did before with the Analog Input CTO.
    In this example, we will send the contents of the Tick itself, so we can see the value increasing every second.

    Server Watchdog PDO contents
    Figure 16: Server Watchdog PDO contents

  3. Enable the WIreless Interface Watchdog
    Set 0x3333:0x80 [Wireless Interface Watchdog Period] to 600 (decimal) to timeout after 10 minutes.

Event-driven message

Here we configure a message every time some event happens - regardless of time.
In this example, every time a Client device connects to port 30,001, we will send the Connection State to COB-ID 0x306.

  1. Select only 'Send message on event'.

  2. The comparison value will be the 'Connection State 2' which changes to 1 on successful connection, then back to 0 when the connection is lost.
    For this, we can use a fixed value for the comparison.

    Server Connection PDO configuration
    Figure 17: Server Connection PDO configuration

  3. Configure the contents of the message - in this case, the state of connection, itself.

    Server Connection PDO contents
    Figure 18: Server Connection PDO contents

5GHz Wi-Fi Server Configuration

Now that the DOD has been set up for transmitting CTOs, let's configure the device as a Server, so that Clients may connect to it:

For simplicity, create a new group 'ServerSetup' in the 'Device Variables' folder to contain device variables not involved in the CTOs.
Server Device Variables

This will be basically a standard 5GHz Wi-Fi Server, with MultiTalk enabled.

Add the following Device Variables, with the following settings (change highlighted objects as necessary):

Object Setting Notes
0x3000:0x01 [Wi-Fi Operating Mode] 0x02 [Mini Access Point]
0x3000:0x10 [Enable 2.4GHz WiFi Band / Infrastructure only] 0 Disabled
0x3000:0x11 [Enable 5GHz WiFi Band / Infrastructure only] 1 Enabled
0x3008:0x03 [Bluetooth Enable] 0 Disabled
0x3008:0x09 [BLE Enable] 0 Disabled
0x3008:0x02 [WiFi Enable] 1 Enabled
0x3000:0x04 [WiFi Authentication Type] 7 [WPA/WPA2 Mixed]
0x3000:0x09 [WiFi DCHP Mode] 2 [Server (WiFi MiniAP only)]
0x3000:0x25 [WiFi Region] As Appropriate
0x3000:0x02 [WiFi SSID] PDO_Server
0x3000:0x05 [WiFi Authentication Key] ChocolateCake4Breakfast!
0x3000:0x0F [Access Point WiFi Channel / MiniAP only] 36
0x3008:0x04 [MultiTalk Enable] 1 [Enabled] For Client 2 -> Client 1 communications
0x4054:0x10 [Forward all CANOpen messages] 1 [Forward]
0x3010:0x15 [Connection Direction Configuration/Server or Client 1] 2 [Server enabled] For Client 1
0x3010:0x16 [Connect Type 1] 1 [TCP Socket] For Client 1
0x3010:0x17 [URL Address/WiFi Client only 1] 192.168.0.34 For Client 1
0x3010:0x18 [Socket Listen Port/WiFi only 1] 30000 For Client 1
0x3011:0x15 [Connection Direction Configuration/Server or Client 2] 2 [Server enabled] For Client 2
0x3011:0x16 [Connect Type 2] 1 [TCP Socket] For Client 2
0x3011:0x17 [URL Address/WiFi Client only 2] 192.168.0.34 For Client 2
0x3011:0x18 [Socket Listen Port/WiFi only 2] 30001 For Client 2
0x4000:0x16 [CAN Message Output CAN2] 1 [Start Msg. Output active]
0x4050:0x03 [Node Id CAN 1] 34
0x4050:0x04 [Node Id CAN 2] 35

Program the Device

We have finished configuring the setup.
Now we must program the new configuration.

  1. Establish a connection to the device.
    Be sure to do a node-scan to select the correct device.

  2. Select '(Download) All Entries and Reset'.

    Download All Entries
    Figure 19: Download All Entries

  3. 'Start'

    Download to Device
    Figure 20: Download to Device

  4. Reboot the device.