Hello Guest it is April 23, 2024, 05:43:22 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wildu

Pages: 1
1
General Mach Discussion / Re: Read external input
« on: August 14, 2017, 11:12:41 PM »
Hello joeaverage
I did the tests as you recommended but I did not work

All the examples that I saw in internet speak of the "Signal Script" but not an M code.

Does anyone know if it is possible to consult the state of an external input from an M code?

I try to create a M code (example M110) and call it from the G code terminal or from MDI terminal, is it possible?

Thanks for the help...

2
General Mach Discussion / Re: Read external input
« on: August 05, 2017, 08:12:12 PM »
Thanks for your reply...

When I have a result I will be commenting

3
Mach4 Toolbox / Read external input
« on: August 05, 2017, 07:42:56 PM »


Hello everyone, I'm new working with Mach 4 and I have the following problem:

I made a M Code (M110) to read an external input and depending on its state show a text. The problem is that running the M110 from the MDI does not read the input and I do not know if I have to activate something or I have to do it another way.

Thanks for the help...

Test code:

function m110()

   local inst = mc.mcGetInstance()
   hReg = mc.mcIoGetHandle(inst, mc.ISIG_INPUT1)
   
   if hReg == 1 then
        wx.wxMessageBox("External input activated!")
    else
        wx.wxMessageBox("External input disabled!")
    end
end

if (mc.mcInEditor() == 1) then
 m110()
end

4
General Mach Discussion / Read external input
« on: August 04, 2017, 11:04:30 PM »
Hello everyone, I'm new working with Mach 4 and I have the following problem:

I made a M Code (M110) to read an external input and depending on its state show a text. The problem is that running the M110 from the MDI does not read the input and I do not know if I have to activate something or I have to do it another way.

Thanks for the help...

Test code:

function m110()

   local inst = mc.mcGetInstance()
   hReg = mc.mcIoGetHandle(inst, mc.ISIG_INPUT1)
   
   if hReg == 1 then
        wx.wxMessageBox("External input activated!")
    else
        wx.wxMessageBox("External input disabled!")
    end
end

if (mc.mcInEditor() == 1) then
 m110()
end






Pages: 1