Hello Guest it is March 29, 2024, 10:57:22 AM

Author Topic: Problems to use Mach4 Outputs.  (Read 4472 times)

0 Members and 1 Guest are viewing this topic.

Offline GerdS

*
  •  42 42
    • View Profile
Problems to use Mach4 Outputs.
« on: October 03, 2016, 06:03:11 AM »
I'm just about to build a remote controller for my Lathe.

To indicate the 100% level, e.g, for the FRO, i want to use a LED.
I have a code like this.

        if CurrentFRO == 100 then
      local hReg = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
      local Ret = mc.mcSignalSetState(hReg, true)
      mc.mcCntlSetLastError(inst, "is 100 " ..CurrentFRO)
   else
      local hReg = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
      Ret = mc.mcSignalSetState(hReg, false)
      mc.mcCntlSetLastError(inst, "not 100 " ..CurrentFRO)
   end


I asigned the Output0 to PokeysDeviceBla, Pin30 in the Mach4 Output Signals Tab.
But the LED will not lit up when the FRO is 100%.

The strange thing is, the Output is not listed in the Pokeys Plugin settings mapping Tab. But all the Inputs i used.
Is there a additional step needed to use the Outputs.?

All other functions like the Encoder to controll the FRO, SRO, Jograte and all Buttons working like expected.
Also when i play with the Pokeys software, the LED is working.

Offline GerdS

*
  •  42 42
    • View Profile
Re: Problems to use Mach4 Outputs.
« Reply #1 on: October 05, 2016, 01:42:45 PM »
I got lit up the LED now.
In my case i had to change, in the Mach4 Pokeys plugin > Pin function Tab, to Digital Output.
But i can not invert the Pin here. It always revert to red X.
When i force the invert Pin in the the Pokeys Configuration Software, the LED lit at 100%.
But the Mach4 settings always override the settings again.
So it looks like there is a problem to path trough the settings from the Mach4 settings.

Offline NeoTO

*
  •  504 504
    • View Profile
    • PoLabs
Re: Problems to use Mach4 Outputs.
« Reply #2 on: October 23, 2016, 01:28:05 AM »
Do not use PoKeys configuration software for setup with Mach3 or Mach4! The plugin will configure everything (except for PoNET devices discovery that must be done in PoKeys software).

In Mach4, use Mach's Input/Output mapping dialog, where the signal can be selected as ActiveLow. We will check why the Invert option in the pin configuration is not working.
www.poscope.com home of PoKeys USB HID, IO, USB, Ethernet controler and PoScope USB PC oscilloscope

Offline GerdS

*
  •  42 42
    • View Profile
Re: Problems to use Mach4 Outputs.
« Reply #3 on: November 12, 2016, 11:08:11 AM »
After the last Update Works now.