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.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 338 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 832 RAPID Programming
- 14 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings