Skip to main content
Submitted by bhutani on Thu, 01/01/2015 - 01:30

Hello all,
I am using Galil 4080 controller. I have connected forward and reverse limit switches and it is working fine.
I understand, I can get the feedback from a Galil motion program for Limit switch by MG_LFA etc.

I need to know how to get the feedback of Limit Switch in a C/C++ code.??

Kindly help with an example.

Bhutani

Comments 1

KushalP on 01/04/2017 - 16:33

Hi Bhutani,

The Limit Switches can be queried a couple of different ways in a host application. One way is to use the g.command function and issue a command directly. Where g.commad("MG_LFA") would return the value of the limit switch, you could also issue a 'TS' command. The controller also outputs a data record that is accessible with the g.record() function. This data record packet is sent asynchronously from the controller at a rate that you specify. It contains all of the information on the controller including I/O status, Limits, Position Error, Actual Position etc.

Refer to Chapter 4 of the DMC-40x0 User Manual for a full break down of what is returned in the Data Record.