Difference between revisions of "Digital Inputs / Outputs"

From Wiki
m
 
(99 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
The control electronics come with a digital input / output module (DIO Module). This page shows how to connect actuators, valves or sensors to the module.
 +
 +
The DIO module provides 7 digital inputs and 7 digital outputs. The inputs are electrically decoupled from the control electronics by an optocoupler and accept 24V input signals.
 +
* The outputs are solid state relays which can switch up to 500 mA per channel. The DIO module does not provide its own supply voltage for the DIOs.
 +
* The inputs are optocouplers which can detect a 24 V Signal. Signal and signal ground needs to be connected to the DIO Module.
 +
 +
Please note: the integrated DIO modules of the igus ReBeL are not electrically decoupled from the control electronics, they share 24V and GND from the power supply.
 +
 +
Indicators: When the state of a sensor input or an output changes the yellow LED on the top blinks once.
 +
 +
==Electrical connections==
 
[[File:DIO-Connections.PNG|400px|thumb|Digital IO connection]]
 
[[File:DIO-Connections.PNG|400px|thumb|Digital IO connection]]
 +
[[file:DIO_pinout.png|thumb|400px|left]]
 +
===Connect Digital Inputs:===
 +
* Disconnect the robot/electronics from power.
 +
* Connect the ground pin (Output connector 1, to GND)
 +
* Supply 24V to one of the input pins
 +
* Example on the left: 24V via switch to input pin 4
 +
* Result in CPRog: digital input Din24 is triggered
  
The CPR robolink control comes with a digital input / output module. This page shows how to connect actuators, valves or sensors to the module.
+
===Connect Digital Outputs===
 
+
*Disconnect the robot/electronics from power.
The Digital IO module provides 7 digital inputs and 7 digital outputs. The inputs are electrically decoupled from the control electronics by an optocoupler and accept 24V input signals. The outputs are reed relays which can drive up to 500 mA per channel.  
+
*Connect the supply pin to 24V power supply
 +
*The supply is forwarded to one of the outputs pins via reed relays
 +
*Connect a valve or another component to the output pin
 +
*Connect the component to GND to close the electrical circuit
 +
*See the example with the lamp on output 5 on the left.
  
Indicators: When the state of a sensor input or and output changes the orange LED on the top is blinking once.
+
===Start the Robot and iRC / CPRog===
 +
*Connect electronics/robot to power, ensure the emergency stop button is disengaged.
 +
*Start CPRog:
 +
**Reset and Enable the robot
 +
**Set DOut 25 to true to switch on the lamp
 +
<br clear=all>
  
==CPRog Project Configuration==
+
==Nomenclature==
 +
===Mover===
 +
To control the IOs in Software, all ''CPR robots'', such as the Mover, provide digital inputs and outputs that are named channel 1 through 4.
  
Each robot control is delivered with and configured for a single Digital IO module. So if you have only one Digital IO module, skip this section.
+
===Modular Control Electronics / igus robolink arms/ igus gantry robots===
If you want to add an additional module, please add a line in the project file, e.g. <code>C:\CPRog\Data\Project\51_IGUS_arm5DOF_SV.prj</code>:
+
In contrast, the ''igus robolink arms and gantry robots'' use the following nomenclature:
<code>
 
<DIOModule ID="112"/>
 
<span style="color:#008000"><DIOModule ID="128"/></span>
 
</code>
 
The first line shows the existing entry for the first Digital IO module (CAN ID 112 = 0x70). The ID switch at the top of this physical module is set to 1.
 
  
The second line adds a Digital IO module with CAN ID 128 = 0x80. The ID switch on the physical module has to be set to 2 to match this ID.
+
The Modular control electronics for these robots can be equipped with more than one DIO module. To address pins 1-7 of the inputs/outputs of every module, the modules are in three different address spaces:
  
==Naming Conventions==
+
* For the first DIO-Module: Channels 21 through 27, i.e. DOut21, DOut22,... or DIn21, DIn22,...
 +
** DOut21 switches pin 1 of DIO module 1.
 +
** DOut22 switches pin 2 of DIO module 1.
 +
**..
 +
**DOut27 switches pin 7 of DIO module 1.
  
All CPR robots provide digital inputs and outputs on channels 1 to 4.
+
* For the second DIO-Module: Channels 31 through 37
 +
** DOut31 switches pin 1 of DIO module 2.
 +
** DOut32 switches pin 2 of DIO module 2.
 +
**..
 +
**DOut37 switches pin 7 of DIO module 2.
  
In the case of the robolink arm these channels are only mapped from the original channels which are:
+
* For the third DIO-Module: Channels 41 through 47
* For the first DIO-Modul: 21 to 27
+
** DOut41 switches pin 1 of DIO module 3.
* For the second DIO-Modul: 31 to 37
+
** DOut42 switches pin 2 of DIO module 3.
* For the third DIO-Modul: 41 to 47
+
**...
 +
**DOut47 switches pin 7 of DIO module 3.
  
More than 3 DIO modules are not possible.
+
The nomenclature for the inputs is DInXX analogous to the DOutXX nomenclature explained above.
 +
The maximum amount of DIO modules installed in the control electronics is currently 3.
  
 
'''Attention:''' The DIO are also used by the [[PLC Interface]] (if active), refer to this.
 
'''Attention:''' The DIO are also used by the [[PLC Interface]] (if active), refer to this.
 
  
 
==How to use the outputs==
 
==How to use the outputs==
[[File:CPRog_DInTestProgram.PNG|400px|thumb|Digital IO connection]]
+
[[file:DIO_add_digitalout.png|thumb|600px|Add Digital Out command]]
 
+
The output signals can be switched on or off with the 'Digital Out' command in CPRog (see screenshot on the right). To add this command in the program editor click "Action" -> "Digital Output".
The output signals can be switched on or off with the 'Digital Out' command.
 
* The 'Local' parameter has to be 'true' to use the physical outputs. If it is 'false' the virtual global outputs are used.  
 
* The 'Ch' channel parameter defines the output channel, see the naming conventions above
 
* The 'State' parameter tells CPRog to switch the output on 'true' or off 'false'
 
  
 
Please be aware that the outputs can only be switched on when the robot is enabled!
 
Please be aware that the outputs can only be switched on when the robot is enabled!
  
'''Attention:''' The outputs must not drive more then 500 mA, also not at startup! Avoid higher currents e.g. due to capaciators! Use a secondary relay in this this case.
+
[[file:Caution.png|frameless|50px]]The outputs must not drive more then 500 mA, also not at startup! Avoid higher currents, e.g. caused by the inrush current of capacitors! Use a secondary relay in this case to prevent damage to the DIO module.
 
 
  
 +
Here an '''example''' on [[How to operate a gripper using CPRog and the Modular Control Electronics]]
 +
<br clear=all>
  
 
==How to use the inputs==
 
==How to use the inputs==
The digital inputs can be used e.g. in if-then-else statements. The local and channel parameters are used as above.
+
[[file:DIO_cprog_input_program.png|thumb|600px|right|Check status of Digital Input in an if-statement ]]
 +
The digital inputs can be used e.g. in if-then-else statements.
  
The program on the right shows a simple test. The first input of DIO module 1 is checked in a loop. If it is true than the first output is set.
+
The picture on the right side shows a simple example: The first input of the first DIO module (DIn21) is checked. If it is true than the first output of the first DIO module (DOut21) is switched on; otherwise it is switched off.
  
 +
==Additional IO Modules==
  
----
+
If not ordered otherwise each robot control cabinet comes with one digital IO module. The following guides explain how you can add up to 2 additional modules:
  
'''Example'''
+
* How to add [[Additional DIO-Modules]]
 +
* How to add [[Additional DIO-Boards of the DCi Control Electronics]]
  
The picture on the right shows an output example:
 
The first pin ( upper left line ) accepts the power supply for all outputs. The other seven lines are the outputs of the reed relays. This means, the relay connects, when switched on, the supply pin (first pin) with the according output pin.
 
  
For inputs its the same: the first pin is the ground pin, to be connected with the sensor ground. The sensor signal is connected with one of the seven input pins.
+
[[Category:CPRog]][[Category:robolink]][[Category:Robot Programming]][[Category:DIO_Modules]]

Latest revision as of 13:17, 21 June 2024

The control electronics come with a digital input / output module (DIO Module). This page shows how to connect actuators, valves or sensors to the module.

The DIO module provides 7 digital inputs and 7 digital outputs. The inputs are electrically decoupled from the control electronics by an optocoupler and accept 24V input signals.

  • The outputs are solid state relays which can switch up to 500 mA per channel. The DIO module does not provide its own supply voltage for the DIOs.
  • The inputs are optocouplers which can detect a 24 V Signal. Signal and signal ground needs to be connected to the DIO Module.

Please note: the integrated DIO modules of the igus ReBeL are not electrically decoupled from the control electronics, they share 24V and GND from the power supply.

Indicators: When the state of a sensor input or an output changes the yellow LED on the top blinks once.

Electrical connections

Digital IO connection
DIO pinout.png

Connect Digital Inputs:

  • Disconnect the robot/electronics from power.
  • Connect the ground pin (Output connector 1, to GND)
  • Supply 24V to one of the input pins
  • Example on the left: 24V via switch to input pin 4
  • Result in CPRog: digital input Din24 is triggered

Connect Digital Outputs

  • Disconnect the robot/electronics from power.
  • Connect the supply pin to 24V power supply
  • The supply is forwarded to one of the outputs pins via reed relays
  • Connect a valve or another component to the output pin
  • Connect the component to GND to close the electrical circuit
  • See the example with the lamp on output 5 on the left.

Start the Robot and iRC / CPRog

  • Connect electronics/robot to power, ensure the emergency stop button is disengaged.
  • Start CPRog:
    • Reset and Enable the robot
    • Set DOut 25 to true to switch on the lamp


Nomenclature

Mover

To control the IOs in Software, all CPR robots, such as the Mover, provide digital inputs and outputs that are named channel 1 through 4.

Modular Control Electronics / igus robolink arms/ igus gantry robots

In contrast, the igus robolink arms and gantry robots use the following nomenclature:

The Modular control electronics for these robots can be equipped with more than one DIO module. To address pins 1-7 of the inputs/outputs of every module, the modules are in three different address spaces:

  • For the first DIO-Module: Channels 21 through 27, i.e. DOut21, DOut22,... or DIn21, DIn22,...
    • DOut21 switches pin 1 of DIO module 1.
    • DOut22 switches pin 2 of DIO module 1.
    • ..
    • DOut27 switches pin 7 of DIO module 1.
  • For the second DIO-Module: Channels 31 through 37
    • DOut31 switches pin 1 of DIO module 2.
    • DOut32 switches pin 2 of DIO module 2.
    • ..
    • DOut37 switches pin 7 of DIO module 2.
  • For the third DIO-Module: Channels 41 through 47
    • DOut41 switches pin 1 of DIO module 3.
    • DOut42 switches pin 2 of DIO module 3.
    • ...
    • DOut47 switches pin 7 of DIO module 3.

The nomenclature for the inputs is DInXX analogous to the DOutXX nomenclature explained above. The maximum amount of DIO modules installed in the control electronics is currently 3.

Attention: The DIO are also used by the PLC Interface (if active), refer to this.

How to use the outputs

Add Digital Out command

The output signals can be switched on or off with the 'Digital Out' command in CPRog (see screenshot on the right). To add this command in the program editor click "Action" -> "Digital Output".

Please be aware that the outputs can only be switched on when the robot is enabled!

Caution.pngThe outputs must not drive more then 500 mA, also not at startup! Avoid higher currents, e.g. caused by the inrush current of capacitors! Use a secondary relay in this case to prevent damage to the DIO module.

Here an example on How to operate a gripper using CPRog and the Modular Control Electronics

How to use the inputs

Check status of Digital Input in an if-statement

The digital inputs can be used e.g. in if-then-else statements.

The picture on the right side shows a simple example: The first input of the first DIO module (DIn21) is checked. If it is true than the first output of the first DIO module (DOut21) is switched on; otherwise it is switched off.

Additional IO Modules

If not ordered otherwise each robot control cabinet comes with one digital IO module. The following guides explain how you can add up to 2 additional modules: