Skip to content

TDC‐E Interface Configuration

tkrzielSICKAG edited this page Feb 20, 2024 · 10 revisions

Welcome to the TDC-E Network Configuration section! Here, the process of connecting your TDC-E to the network and similar services is described. See the list of described configurations below:

1. Digital Input Output

This section describes the setup of the environment in which DIOs can be tested, checked and used. The setup for digital inputs and outputs usage will be discussed. To set up a DIO, go to SICK's Interface Manager and login with provided credentials.

This enables TDC-E component editing. The components that can be edited can be found on the right panel of the screen. Select DIO from the panel. This will open a window on which all the available DIOs are listed. Choose a DIO that isn't used by another service and change its direction to Output, then set the value to 1. Then choose another DIO which must be set to Input. Connect your wanted devices with the corresponding wires on the TDC-E device by checking the PWR+AIN/DIO cable diagram.

An alternate method of setting the DIO devices is using internal Linux commands. To expose a specific device, type the following command:

echo XXX > /sys/class/gpio/export

The X part is the GPIO pin corresponding to a digital input and/or output. Consult the How to use Digital-I/O blocks manual for finding the correct gpio for your use case. Make sure to expose all relevant DIOs!

To set a device as an output, type:

echo out > /sys/class/gpio/gpioXXX/direction

To set a gpio's mode to input, use the following line:

echo in > /sys/class/gpio/gpioXXX/direction

2. Analog Input

This section describes the setup of the environment in which analog inputs can be tested, checked and used.

To set up an AIN, go to SICK's Interface Manager and login with the provided credentials.

This enables TDC-E component editing. The components that can be edited can be found on the right panel of the screen.

To set up analog inputs, click the Analog Inputs item on the right panel. It should open a window listing all available AINs. Select an unused AIN and set it to Enabled. Then choose the AIN mode, which can be Voltage or Current. On the right side of the screen, the value of the analog input is shown. When disabled, this value is set to 0. When enabled, it shows a larger value. Find the wire that corresponds to the pin of the chosen AIN by consulting the PWR+AIN/DIO cable diagram.

For simulating the state change, you can connect the two wires. The value of the AIN should now change to the voltage set on your TDC-E device. Disconnecting the wires should set it back to its initial value.

3. Accelerometer and Magnetometer

Both the accelerometer and magnetometer are built-in, internal devices inside of the TDC-E, so they do not need to be set up physically. For reading and processing the data the devices send, however, they first need to be enabled. To do so, you can run the following commands on your TDC-E device:

ssh [email protected], then type set password
echo 1 > /sys/class/misc/FreescaleAccelerometer/enable
echo 1 > /sys/class/misc/FreescaleMagnetometer/enable

The first command is used to connect to and log into your TDC-E device. The first command writes the number 1 into the file located in /sys/class/misc/FreescaleAccelerometer/enable. This action replaces anything written in the accelerometer's enable file with 1, meaning the machine will enable the accelerometer. If not enabled, the value of the enable file is 0. The last command had the same function, but enables the magnetometer.

The accelerometer and magnetometer should now be operable.

4. CAN

This section describes the needed environment setup to work with the CAN bus. To set up the environment in which CAN data can be worked, the CAN bus first needs to be connected to your TDC-E device. To do so, take a 20-pin Micro-Fit male connector and connect it to your device. To connect the necessary wires, consult the PWR+AIN/DIO cable diagram and find which wires need to be connected to the CAN device.

The next step is to go to SICK's Interface Manager and log in with your provided credentials.

This enables TDC-E component editing. The components that can be edited can be found on the right panel of the screen. Firstly, select the wanted Can from the list. Set Enabled to Yes and change the BitRate to the value corresponding to your device. You can turn both Cans on at the same time.


NOTE: Make sure to use the same settings on both CANs. This means e.g. to use the same baud rate for both devices. Make sure to terminate the CANs because of duplex communication flow!


The device should now be ready. A nifty way of checking whether the CAN is getting data is to open ssh [email protected] and log into your TDC-E device, then typing the following command:

 candump

A correctly set-up device will display fetched data, while a device that isn't properly set up will only display the header, without incoming messages. Find a screenshot of correctly displayed data below:

image

5. GPS

This section describes how to connect your TDC-E device with a GPS. to connect your GPS device, make sure to insert the GS cable into the MCX female connector for connecting the GPS antenna. See the picture bellow for more details.

image

To connect the GPS to the device, use connector 1.

The next step is to go to SICK's Interface Manager and log in with your provided credentials.

This enables TDC-E component editing. The components that can be edited can be found on the right panel of the screen. Find GPS, then select Enabled to enable using the device. GPS is now available and usable.

6. Bluetooth

This section describes how to connect to and work with Bluetooth devices. It describes turning Bluetooth on, scanning for available devices, making your device visible, pairing, trusting and connecting the wanted device.

To enter the working environment for connecting devices with your TDCE, connect to your TDC-E. Authenticate using your credentials, then follow the steps listed below.

To turn Bluetooth on, type the following line into the terminal.

hciconfig hci0 up

This will initialize your HCI device. To check the interface status now, use hciconfig. It will display the Type of your device, BD Address, ACL MTU, SCO MTU, and RX and TX bytes. To display the MAC address of the Bluetooth module, you can use hcitool dev. Next up, we will start the Bluetooth interface. To do so, type the following command:

 bluetoothctl

You will enter the [bluetooth] terminal, and the terminal will show your controller MAC address and whether the device is pairable. List the pairable devices using devices. This will show you all the devices which you can pair with your TDC-E at the moment. The MAC address of the pairable device is listed, and so is its name. If the device you want to pair isn't listed, make sure to set the following parameters:

  • pairable on
  • discoverable on

If you want to turn on advertising, also type the following line:

  • advertise on

Now, type scan on. This should list all the Bluetooth devices that can be paired with your device. To stop scanning, type scan off. Next up, find the MAC address of the device you want to pair with the TDC-E. For example, we want to connect our P T 80111D device to the TDC-E. It is listed in the following format:

Device E1:6B:1A:7E:C5:BE P T 80111D

The MAC address of the device is E1:6B:1A:7E:C5:BE. Copy the address and proceed to the following steps. Different types of Bluetooth devices require different types of connections. This guide discusses pairing, trusting and connecting a device, though a lot of Bluetooth devices use advertisements to send data to other devices, which doesn't always require connection. To pair the device, use:

pair [dev]

Here, the [dev] part of the command should be replaced with your copied MAC address. The TDC-E should now attempt to pair with the device. Pairing is a requirement before the TDC-E can connect to the wanted Bluetooth device. If a problem arises during pairing, check the Bluetooth device parameters or restart your Bluetooth service. Sometimes, the device needs to be trusted before connecting to it. To do so, type:

trust [dev]

The [dev] part is once again related to the MAC address of the device you want to connect. Now, to connect to a device, use:

connect [dev]

Your Bluetooth device should now be connected t the TDC-E. To check the devices parameters, you can type info [dev], which will list the device's name, alias, whether it is paired, trusted, blocked, connected or a legacy pairing. It will also list the manufacturer data key and value. Another useful command that provides access to the Bluetooth subsystem monitor infrastructure for reading HCI traces is btmon. To exit the bluetooth interface, type exit or quit. To turn Bluetooth off, type hciconfig hci0 down.

7. RS 232

This section describes the working environment for using RS 4xx. To set up an interface, go to SICK's Interface Manager and login with your credentials.

These credentials will enable you to edit the TEMS Manager properties. To enable Edit Mode, click on the En-/Disable expert mode controls. Afterwards, find the RS 232 interface on the right panel of the screen and check the available parameters. To simulate an environment, the two wires meant for data were connected, creating a suitable testing environment.

Set up the necessary environment for your device on the TEMS Manager. Make sure to set the BaudRate to correspond with the device you are using. Then select Enabled. Make sure to Enable the WebSocket server. Connect the device you are using to the TDC-E. Consult your PWR+AIN/DIO cable diagram to connect the correct wires. The device should now be operable.

NOTE: RS and SSI cannot be used at the same time!

8. RS 4xx

This section describes the working environment for using RS 4xx. To set up an interface, go to SICK's Interface Manager and login with your credentials.

These credentials will enable you to edit the TEMS Manager properties. To enable Edit Mode, click on the En-/Disable expert mode controls. Afterwards, find the RS 4xx interface on the right panel of the screen and check the available parameters. For this example, the following device was used: RK300-04 Leaf Wetness Sensor, operating with RS 485.

Set up the necessary environment for your device on the TEMS Manager. Make sure to set the BaudRate and Mode to correspond with the device you are using. Then select Enabled. For working with websockets, also make sure to Enable the WebSocket server. Connect the device you are using to the TDC-E. Consult your PWR+AIN/DIO cable diagram to connect the correct wires. The device should now be operable.

NOTE: RS and SSI cannot be used at the same time!

9. 1-Wire

This section describes the working environment for using 1-Wire. To set up an interface, go to SICK's Interface Manager and login with your credentials.

NOTE*: Before proceeding, make sure to check the voltage your 1-Wire device works with, then set up the environment needed for the sensor.*

Your 1-Wire device will need to reside within an environment that can provide it with its exact voltage need. The TDC-E works with voltages 9-36, but also provides a DIO (Digital I/O) that supplies a wire with 5 V.

For example, if your 1-Wire works with 5V, it needs to reside within an environment that provides those 5 needed volts, since higher voltage would damage the device. Thus, the 5V DIO pin is needed (pin 484 if not using HW Interface). If the sensor you want to use is of the same voltage as the TDC-E provides, no additional action is needed, and you can proceed to the next step.

Pick the pin that would supply your 1-Wire with voltage, then set its Output to state 1*.* Consult your TDC-E COMM connector terminals diagram to set the correct wires for GND, +5V DO and the 1-Wire data wire respectively.