Skip to main content
Submitted by dshotka on Tue, 06/07/2016 - 14:44

Hi, I'm new to programming with Galil. I understand there is a way to use interrupts but now sure how to use them.

I'm trying to write an ISR to stop the motor if the load cell response gets close to the limit of the load cell. Trying to write it such that the load cell never gets overloaded regardless of what other software is running.

Thanks for the help..

Comments 3

AndrewS on 08/30/2016 - 10:53

Hi Danny,
There are different ways to solve this problem depending on what you are using as an input and where you want to have the stop routine.

If this is a true limit on the range of motion, you can use our dedicated limit switches and catch the error with #LIMSWI

Additionally, if you have a standard digital input with #ININT, or if you are monitoring a parameter, you can have a thread that monitors a parameter in a tight loop.

If you need to have an interrupt sent to a host PC, you can use the EI or UI commands to send an interrupt to the host PC and our API libraries (current generation is gclib) can easily handle the interrupt.

Regards,
Andrew

moritzwalter on 09/21/2017 - 13:46

Hi!

I'm looking for documentation on User Interrupts, which seems to be a very promising feature. The command reference for the DMC-41x3 on the UI command notes that

"EI,,h must be set to a valid UDP port (set by the host, not the DMC code, is recommended)"

What does that mean? From the EI documentations description I can only extract that argument n_3 is a "Preconfigured UDP handle for interrupt transmission" (-1 disabled, 0-7 indicate Handles A-H, respectively). I would therefore assume, that a User Interrupt, e.g. would be set up like this:

EI ,,3

and triggered like this:

UI 3

But that does not seem to be the case. Can someone point me in the right direction or towards additional documentation?

Thanks,
Moritz

andriys on 10/11/2017 - 16:21

Hello moritzwalter,
All 3 arguments must be used when configuring EI command in order to use user interrupt feature.
User manual for DMC-18x6 controller has a section on "Controller Event Interrupts and User Interrupts", you can find it Chapter 4 Software Tools and Communications on page 52.
If you have any other questions regarding the DMC-41x3 or other Galil products, please email support@galilmc.com or call (916) 626-0101 for immediate support.
-Andriy Stasyuk