RobotStudio event

Trap Routine

Hello.

I would like to make a trap routine in my program. I will have a pulse generator and every pulse should call out the TRAP routine, for example it can be

TRAP
i=i+1;
RETURN;
ENTRAP

So, which is actually the highest possible frequency of reacting to TRAP routine, or to count pulses? Does it depend on the I/O card that I am using?

Thank you very much for your help

Comments

  • I don't think that is going to work very well, if you have anything more than a few Hz. I would think that the constant interrupts would either a) overrun the interrupt queue or b) affect motion control, or both. What are you trying to control or monitor? Can you convert the pulses to analog and then set up ranges where you would trigger? There is support for analog signal interrupts built-in to RAPID.
    Russell Drown
  • Hello
    Thank you very much for your reply. Well, I have an incremental encoder, that gives 360 pulses per revolution, the movement is very slow, so maybe 1 revolution per second. This is the precision that I need. So, I was thinking, whether it is possible to use an I/O card and count the pulses and calculate the speed with trap routine. I was wondering, if it would be possible without installing an additional encoder unit to IRC5.
    Thank you very much in advance.