I/O Signals
bareftrz
✭
Hello,
I am relatively new to Rapid programming and have problem I am not sure how to write the code for.
I am trying to setup a rotary table that I need to monitor the RPM's before motion occurs. I will get a DI signal when the RPM's are correct but I need to know how to write an Interrupt to prevent motion before the condition is met.
The table has proximity sensors that I receive DI signals from when the rotary table has completed revolutions. I will need to start at the zero degree table position so I will get a DI signal then.
I have a couple of questions I need help with.
Could I just use the WAITDI command until the signals are received?
Can I read the DI signal and when it equals 1, write the value to a num variable so I can count total revolutions?
I am planning on using a WHILE command to evaluate when the correct number of revolutions has been completed.
I am not really sure if this is the right approach or not, but I need some advice if other methods would work better.
Any code examples provided would be greatly appreciated.
Thanks,
Ted
0
Comments
-
May be something like this:
WaitDi MySignal,1;
Reg1 := Reg1+1;
WaitDi MySignal,0;
/Jorge
Jorge Turiel0 -
That is similiar to what I did. I used a WaitTime instead of WaitDI MySignal,0;
I like your solution better to wait until the DI signal = 0 rather than assigning a specific time period.Thanks,0
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