Hello Guest it is April 19, 2024, 07:10:54 AM

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 - GerdS

Pages: 1 2 3 4 5 »
1
Mach4 General Discussion / Re: Macros for lathe spindle range change
« on: August 28, 2017, 04:53:24 PM »
Just read your post.

The macro below does this job for me.
I have defined the spindle range (6 gears) in solidcam and the post pocessor call the macro on tool change.

M101 P <Range>

Hope that helps.

function M101(hVars)
   local inst = mc.mcGetInstance()
   local CurrentSpindleRange = mc.mcSpindleGetCurrentRange(inst)
   local NextSpindleRange = mc.mcCntlGetLocalVar(inst, hVars, mc.SV_P)
   
   mc.mcCntlSetLastError(inst, "Sets spindle range to " ..NextSpindleRange)
   if CurrentSpindleRange ~= NextSpindleRange then
      wx.wxMessageBox("Change Gear to " ..NextSpindleRange, "Gear box")
      rc = mc.mcSpindleSetRange(inst, NextSpindleRange)
   end
end

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

2
Just updated to Plugin ver. 3418 (20.08.2017). Now i get a Message that my connection is to slow.
But my remote controler seems to work without problems.
Can i disable this warning message. ?

Windows 7 64
Pokeys 56 U Device
Mach4 3418
Plugin without problems 09.05.2017

3
Mach4 General Discussion / Re: Read out User defined fields from Tool table
« on: February 10, 2017, 08:28:01 AM »
For everybody who did not know, here is the solution.

mcToolGetDataExDbl()
mcToolGetDataExInt()
mcToolGetDataExStr()

local dblVal, rc = mc.mcToolGetDataExDbl(number mInst, number toolnum, string fieldName)
local strlVal, rc = mc.mcToolGetDataExStr(number mInst, number toolnum, string fieldName)

You can find this and many more undocumented functions it in the autocomplete list in the LUA Editor.

Thanks to Brett from the Tech support staff for his help.

An example i did is attached.

4
Mach4 General Discussion / Read out User defined fields from Tool table
« on: February 05, 2017, 01:58:35 PM »
Hello, is there an easy way to read out User defined fields from the Tool table.
I already played with mcToolGetData and the UsrField.... values from the tool table.
The API documented types from "mcToolGetData", have the same name like in the tooltable.tls. For example:FieldType1=MTOOL_MILL_HEIGHT:Float(-1,4)
Tryed to use my defined name, but no luck.

Thanks
Gerd

5
PoKeys / Re: Analog Device for Feed Rate Override on Pokeys57CNC
« on: November 21, 2016, 03:18:56 PM »
Suitable remote-controller for Mach4 are still rare right now.
I did my own one, but with Encoders instead of Potentiometer to adjust the Spindle, Feed and Jog Speed Override.
The Controller Board is an additional Ethernet Pokeys board beside my main PokeysCNC controller.
It work quite good, but was a lot of development effort with the PCB and all the LUA code.

6
PoKeys / Re: Problems to use Mach4 Outputs.
« on: November 12, 2016, 11:08:11 AM »
After the last Update Works now.

7
Hello Denis,
i also had this problems. It looks like there is a problem ore a new behavior of the mcCntlGcodeExecuteWait() function.
Try to use mcCntlGcodeExecute() instead of mcCntlGcodeExecuteWait() when ever possible.
I used the whole day yesterday  to debug an fix most of problems after update to newest mach4 version.
Now it works so far.

8
PoKeys / Re: Problems to use Mach4 Outputs.
« 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.

9
PoKeys / 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.

10
PoKeys / Re: Motion step Overflow when i use two MPG's at same time
« on: September 05, 2016, 04:15:49 PM »
Hello Pokeys Team.
is there any News about the Motion step Overflow poblem.
Is still not working. Fast turning the Wheels Ok, but not slow.

Gerd

Pages: 1 2 3 4 5 »