Sample program 1 - short-circuit detection (current-controlled)

Sample program 1 - short-circuit detection (current-controlled) 1: Download

Program description and function

In addition to the classic use for controlling LEDs, the EL2596 can also be used for testing electrical contacts and other special applications. The current-controlled LED output can detect short-circuits or general current changes within a few milliseconds, display them as an error message and, if necessary, switch off. The test specimen to be tested, for example an electrical contact, must be connected potential-free to the LED output (connections 1 and 9).

In this sample, a device is connected to the EL2596-0000 (FW03), which in the normal state after enabling the output conducts a quiescent current of about 100 mA. If a short circuit also occurs, an error message is generated and the LED output of the EL2596 switches off after a short time.

The current/voltage curve during the short circuit can be seen in the following scope recording. The values “Output-Current” and “Output-Voltage” are read from the info data of the terminal. The time required to completely switch off the output is about 3 ms, the current increases briefly to approx. 700 mA.

Sample program 1 - short-circuit detection (current-controlled) 2:
Time for detection of a short-circuit

With this sample program, a short circuit can be detected at the LED output with the help of the EL2596. For this purpose, the EL2596 outputs a specified current at the LED output (operation mode: “Current Control”). If a short circuit is detected at the LED output, an error message is generated, which can be read and processed with this sample program.

For this purpose, as described in the chapter Commissioning the values for the supply and output voltage, as well as the maximum output current must be specified in the CoE data.

Sample program 1 - short-circuit detection (current-controlled) 3:
Setting current and voltage values in the CoE

The specified output values are then output at the output of the LED terminal. “Current Control” mode must be selected as the output mode (CoE index 0x8004:01).

Sample program 1 - short-circuit detection (current-controlled) 4:
Selecting the “Current Control” operation mode

“Current Control (with info data)” is used as the Predefined PDO.

Sample program 1 - short-circuit detection (current-controlled) 5:
Selection of the Predefined PDOs “Current Control with info data”

In the sample program, diagnostic data are read from the diagnostic messages of the terminal. To do this, the NetID of the EtherCAT network and the ID of the EL2596 must be specified in the global variable list (GVL).

Sample program 1 - short-circuit detection (current-controlled) 6:
Sample program 1 - GVL

The NetID can be displayed in TwinCAT under the EtherCAT Master on the “EtherCAT” tab. The ID must be specified in the GVL as sNetID in inverted commas as a string.

Sample program 1 - short-circuit detection (current-controlled) 7:
Displaying the NetID

The ID of the slave can also be found in the EtherCAT master. The “Online” tab must be selected in order to do this. This value must then be specified as nSlaveAddr.

Sample program 1 - short-circuit detection (current-controlled) 8:
Displaying the slave address

The sample program can then be started. To use the sample program, the included visualization should be opened.

Sample program 1 - short-circuit detection (current-controlled) 9:
Sample program 1 - Visualization
Sample program 1 - short-circuit detection (current-controlled) 10:

Limiting the peak current in case of short-circuit

If a short-circuit occurs at the LED output, currents >6 A can flow for a short time. In order to limit the peak output current, a resistor in the low ohm range can be connected in series with the component on which a short-circuit is to be detected.