IO problem
djperala
✭
hello
i am trying to write a quick bit of RAPID.
i have do1, do2 and do3.
depending on the state of all three i have 8 options.
do1, do2, do3 off
do1 on do2 do3 off
so on so on
does anyone know how to write if statements testing the value of an IO signal?
please any code would be greatly appreciated.
0
Comments
-
HiYou can use for example IF-statement. For inputs you can use it like this:IF di1=1 THEN!This will be executed if the signal value is 1ENDIFFor output testing you need to use DOutput-function, like this:IF DOutput(do1)=1 THEN!This will be executed if the signal value is 1ENDIFWhen you wrote about different states of the three output, you might be also interested to find out about group signals. You can define your three digital output signals as one group output and that way you can simplify your RAPID code. Then you can use instruction SetGO to set value for the group output. This way you don't have to manually set or reset all the digital signals. For example like this:SetGO go1, 5;-Osku0
-
thank you for the help.worked perfectly0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings