Hello Guest it is March 19, 2024, 06:42:35 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 - jevs

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »
81
Another note to solve:

If the axis selector knob is on the off position it breaks the code since none of the ones it is looking for is on. Having it in the off position activates pin 43

I will have to see if I can figure out how to make it disable the jog + and - buttons if it is in this position and not break the code for the other positions.

82
Missed my editing time window for above....I was going to mention...

I do have an off position on the Axis Selector of control panel. If that is useful for anything...

It looks like I can change this and it will put it back to 100% jog rate for the incrementals when you go there....not sure if this how it should be or not.
I still have to get the feedrate override selector going too....
Code: [Select]
function setJogInc(inc)
local rc, axisNum
local inst = mc.mcGetInstance()
--For each axis set the incremental value and jog type to inc
for axisNum=0,5,1 do -- X = 0, Y = 1, Z = 2
rc = mc.mcJogSetRate(inst, axisNum, 100)
rc = mc.mcJogSetInc(inst, axisNum, inc)
rc = mc.mcJogSetType(inst, axisNum, mc.MC_JOG_TYPE_INC)
end
end

Is Step jog usually done at 100% and slowed down with Feedrate Override (if you wanted to slow it down)? I do not have experience with other CNC mills. Maybe other mills only have switches for control and not duplicate "on screen" options?

83
SwiftyJ,
Got it all loaded in. I get an "Error starting continuous jog" when booting up Mach4, but ignore it and continue....

With that said, this is kind of working and certainly must be a step in a better direction? It is actually completing an incremental move!

However, what I notice is that it is changing the Jog Rate and Incremental Jog Step  on the computer screen. My intentions were for this not to do that and only affect the Jog+ and Jog- physical buttons on the control panel. Otherwise you always end up on 2% Continuous jog. You have to cycle through those Continuous Jog positions on the switch to get back to the step jog settings and the last one hit is 2%.

This opens up a lot more for me to think about though. If you have any ideas to make it only affect the control panel and not the "on screen" jogging, please let me know.

I am thinking maybe the jog rate of the screen could be recorded before any of this happens somehow and put back when all the continuous jog inputs are at 0? so that the step jogs default back to whatever is on the screen when you go to those positions?

Again, thanks for taking the time to help me with this! In the mean time I will drink more coffee and brainstorm how to solve the above issues....getting there though...!


84
SwiftyJ, apparenlty my last post went in after yours LOL. I tried a bunch more stuff since then to no avail :(

It looks like you have been busy with what you did. I thank you a bunch for doing all of that!

I am about to give yours a try and say a little prayer and maybe sacrifice a chicken to the Lua gods or something in hopes that it works :) I will report back!

85
Several more hours  wasted with 0 learned and 0 accomplished....tried all of this and nothing works....

Code: [Select]
--FIGURED IT WOULDNT WORK, BUT TRYING ANYTHING
--DOES NOT WORK> CONTINUOUS MODE JOG+ PRESS AND RELEASED WILL NOT STOP RUNNING
--INC JOG WORKS
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
local inc, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
local cont, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
local jogcont = mc.mcSignalGetState(cont)

if(state == 1) then
CPJogPlus()
elseif (jogcont == 0) then
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,

--DOES NOT WORK
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
local inc, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
local cont, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
local jogcont = mc.mcSignalGetState(cont)

if(state == 1) then
CPJogPlus()
elseif (jogcont == 0) then
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,
--Control Panel Jogging +
function CPJogPlus()
local in44, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT44)
local axSelX = mc.mcSignalGetState (in44)
local in45, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT45)
local axSelY = mc.mcSignalGetState (in45)
local in46, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT46)
local axSelZ = mc.mcSignalGetState (in46)
local in47, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT47)
local axSel4 = mc.mcSignalGetState (in47)
local in48, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT48)
local axSel5 = mc.mcSignalGetState (in48)
local in49, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT49)
local axSel6 = mc.mcSignalGetState (in49)
local in19, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT19)
local jogSel1 = mc.mcSignalGetState (in19)
local in20, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT20)
local jogSelx1 = mc.mcSignalGetState (in20)
local in21, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT21)
local jogSelx01 = mc.mcSignalGetState (in21)
local in22, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT22)
local jogSelx001 = mc.mcSignalGetState (in22)
local in23, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT23)
local jogSelx0001 = mc.mcSignalGetState (in23)
local in24, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT24)
local contJog2 = mc.mcSignalGetState (in24)
local in25, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT25)
local contJog5 = mc.mcSignalGetState (in25)
local in26, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT26)
local contJog10 = mc.mcSignalGetState (in26)
local in27, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT27)
local contJog25 = mc.mcSignalGetState (in27)
local in28, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT28)
local contJog50 = mc.mcSignalGetState (in28)
local in29, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT29)
local contJog75 = mc.mcSignalGetState (in29)
local in30, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT30)
local contJog100 = mc.mcSignalGetState (in30)
--get current jog set type and settings here if needed
if axSelX == 1 and jogSel1 == 1 then
local Inc, rc = mc.mcSignalGetHandle (inst, mc.OSIG_JOG_INC)
jogInc = mc.mcSignalGetState (Inc)
rc = mc.mcJogIncStart(inst,0,1)
mc.mcSignalSetState (Inc,1)
elseif axSelX == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,0,.1)
elseif axSelX == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,0,.01)
elseif axSelX == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,0,.001)
elseif axSelX == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart(inst,0,.0001)
elseif axSelY == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,1,1)
elseif axSelY == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,1,.1)
elseif axSelY == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,1,.01)
elseif axSelY == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,1,.001)
elseif axSelY == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart (inst,1,.0001)
elseif axSelZ == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,2,1)
elseif axSelZ == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,2,.1)
elseif axSelZ == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,2,.01)
elseif axSelZ == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,2,.001)
elseif axSelZ == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart(inst,2,.0001)
elseif axSelX == 1 and contJog2 == 1 then
rc = mc.mcJogSetRate(inst,0,2)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog5 == 1 then
rc = mc.mcJogSetRate(inst,0,5)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog10 == 1 then
rc = mc.mcJogSetRate(inst,0,10)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog25 == 1 then
rc = mc.mcJogSetRate(inst,0,25)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog50 == 1 then
rc = mc.mcJogSetRate(inst,0,50)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog75 == 1 then
rc = mc.mcJogSetRate(inst,0,75)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog100 == 1 then
rc = mc.mcJogSetRate(inst,0,100)
rc = mc.mcJogVelocityStart(inst,0,1)
end
    local cont = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
    local jogcont = mc.mcSignalGetState(cont)
    local inc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
    local joginc = mc.mcSignalGetState(inc)
    local mpg = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_MPG);
    local jogmpg = mc.mcSignalGetState(mpg)
   
    if (jogcont == 1) then
        mc.mcSignalSetState(cont, 0)
        mc.mcSignalSetState(inc, 1)
        mc.mcSignalSetState(mpg, 0)       
    else
        mc.mcSignalSetState(cont, 1)
        mc.mcSignalSetState(inc, 0)
        mc.mcSignalSetState(mpg, 0)
    end
end

--ADDED A WAIT IN THE FUNCTION FOR ONE OF THE INCREMENTAL JOGS TO TEST
--WHO KNOWS IF SYNTAX IS CORRECT DUE TO BAD API MANUAL
  --GIVES AN ERROR, SO I GUESS THE CRAPPY MANUAL STRIKES AGAIN
    -- LUA:Error while running chunk
c:\Mach4Hobby\ScreenScript.Lua:575:Expected a 'number'for parameter 2, but got a 'nil'
Function called \: 'mcSignalHandleWait(number,nil,number)'
01.mcSignalHandleWait(number,number,number)
stack trackback:
[C]: in function 'mc.mcSignalHandleWait'
C:\Mach4Hobby\ScreenScript.lua:575:in function 'CPJogPlus'
C:\Mach4Hobby\ScreenScript.lua:114:in field '?'
C:\Mach4Hobby\ScreenScript.lua:858:in function 'Mach_Signal_Script'

-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
if(state == 1) then
CPJogPlus()
else
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,
--Control Panel Jogging +
function CPJogPlus()
local in44, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT44)
local axSelX = mc.mcSignalGetState (in44)
local in45, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT45)
local axSelY = mc.mcSignalGetState (in45)
local in46, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT46)
local axSelZ = mc.mcSignalGetState (in46)
local in47, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT47)
local axSel4 = mc.mcSignalGetState (in47)
local in48, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT48)
local axSel5 = mc.mcSignalGetState (in48)
local in49, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT49)
local axSel6 = mc.mcSignalGetState (in49)
local in19, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT19)
local jogSel1 = mc.mcSignalGetState (in19)
local in20, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT20)
local jogSelx1 = mc.mcSignalGetState (in20)
local in21, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT21)
local jogSelx01 = mc.mcSignalGetState (in21)
local in22, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT22)
local jogSelx001 = mc.mcSignalGetState (in22)
local in23, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT23)
local jogSelx0001 = mc.mcSignalGetState (in23)
local in24, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT24)
local contJog2 = mc.mcSignalGetState (in24)
local in25, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT25)
local contJog5 = mc.mcSignalGetState (in25)
local in26, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT26)
local contJog10 = mc.mcSignalGetState (in26)
local in27, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT27)
local contJog25 = mc.mcSignalGetState (in27)
local in28, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT28)
local contJog50 = mc.mcSignalGetState (in28)
local in29, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT29)
local contJog75 = mc.mcSignalGetState (in29)
local in30, rc = mc.mcSignalGetHandle (inst, mc.ISIG_INPUT30)
local contJog100 = mc.mcSignalGetState (in30)
--get current jog set type and settings here if needed
if axSelX == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,0,1)
rc = mc.mcSignalHandleWait (mc.OSIG_JOG_INC,WAIT_MODE_LOW,10)
elseif axSelX == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,0,.1)
elseif axSelX == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,0,.01)
elseif axSelX == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,0,.001)
elseif axSelX == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart(inst,0,.0001)
elseif axSelY == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,1,1)
elseif axSelY == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,1,.1)
elseif axSelY == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,1,.01)
elseif axSelY == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,1,.001)
elseif axSelY == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart (inst,1,.0001)
elseif axSelZ == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,2,1)
elseif axSelZ == 1 and jogSelx1 == 1 then
rc = mc.mcJogIncStart(inst,2,.1)
elseif axSelZ == 1 and jogSelx01 == 1 then
rc = mc.mcJogIncStart(inst,2,.01)
elseif axSelZ == 1 and jogSelx001 == 1 then
rc = mc.mcJogIncStart(inst,2,.001)
elseif axSelZ == 1 and jogSelx0001 == 1 then
rc = mc.mcJogIncStart(inst,2,.0001)
elseif axSelX == 1 and contJog2 == 1 then
rc = mc.mcJogSetRate(inst,0,2)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog5 == 1 then
rc = mc.mcJogSetRate(inst,0,5)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog10 == 1 then
rc = mc.mcJogSetRate(inst,0,10)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog25 == 1 then
rc = mc.mcJogSetRate(inst,0,25)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog50 == 1 then
rc = mc.mcJogSetRate(inst,0,50)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog75 == 1 then
rc = mc.mcJogSetRate(inst,0,75)
rc = mc.mcJogVelocityStart(inst,0,1)
elseif axSelX == 1 and contJog100 == 1 then
rc = mc.mcJogSetRate(inst,0,100)
rc = mc.mcJogVelocityStart(inst,0,1)
end
end

--DID THE ABOVE AGAIN, but CHANGED THIS LINE from:
rc = mc.mcSignalHandleWait (mc.OSIG_JOG_INC,WAIT_MODE_LOW,10)
--TO
rc = mc.mcSignalHandleWait (mc.OSIG_JOG_INC,0,10):
--Thanks crap manual
--This completely crashes Mach and generates a report to send when you press the Jog+ button


---Changed
rc = mc.mcSignalHandleWait (mc.OSIG_JOG_INC,0,10)
--TO
rc = mc.mcSignalWait (inst,mc.OSIG_JOG_CONT,10 )
--THIS APPEARS TO DO NOTHING, IT DOES NOT WAIT FOR S#|T, IT JUST STOPS MOVING AS SOON AS YOU LET GO OF THE BUTTON


--USED THE WRONG CODE ABOVE ON ACCIDEING "CONT" instead of "INC"
---Changed
rc = mc.mcSignalWait (inst,mc.OSIG_JOG_CONT,10 )
--TO
rc = mc.mcSignalWait (inst,mc.OSIG_JOG_INC,10 )
--THIS GIVE AN ERROR, THINK IT WANTS THE VALUE OF WHAT IT SHOULD BE WAITING FOR

--CHANGED THIS
rc = mc.mcSignalWait (inst,mc.OSIG_JOG_INC,10 )
--TO
rc = mc.mcSignalWait (inst,mc.OSIG_JOG_INC,0,10 )
--THIS STILL DOES NOT WAIT FOR ANYTHING. USELESS! STILL JUST STOPS MOVING IF YOU LET GO OF THE BUTTON
--I DO FIND THAT IT SEEMS LIKE SOME CHANGES DO NOT WORK RIGHT UNLESS YOU EXIT MACH COMPLETELY ARE REOPEN, I HOPE THIS IS
--NOT MAKING ME SKIP OVER SOMETHING THAT MIGHT WORK>>>


--ADDED TO GET THE VALUE OF mc.OSIG_JOG_INC location and try to use that variable instead of directly using it
---CHANGED CODE TO THIS:
local crap, rc = mc.mcSignalGetHandle (inst, mc.OSIG_JOG_INC)
if axSelX == 1 and jogSel1 == 1 then
rc = mc.mcJogIncStart(inst,0,1)
local FinCrapola = mc.mcSignalGetState (crap)
rc = mc.mcSignalWait (inst,FinCrapola,0,10)
--AGAIN THIS DOES NOTHING AND DOES NOT WAIT FOR ANYTHING

86
So far today just bashing my head against the wall and wasting time.....none of this works in case you want to know....I have tried a lot of other things, but now I am starting to record all the tries. I just need it to do something so simple, but it refuses......
Code: [Select]
--DOES NOT WORK> CONTINUOUS MODE JOG+ PRESS AND RELEASED WILL NOT STOP RUNNING
--INC JOG WORKS
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
if( state == 1) then
CPJogPlus()
end
if( state == 0) then
local inc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
if (joginc == 1) then
--Do nothing
else
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end
end,

--DOES NOT WORK> CONTINUOUS MODE JOG+ PRESS AND RELEASED WILL NOT STOP RUNNING
--INC JOG WORKS
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
local inc, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
local cont, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
local jogcont = mc.mcSignalGetState(cont)

if( state == 1) then
CPJogPlus()
elseif ( joginc == 1) then
else
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,

--DOES NOT WORK> INCREMENTAL JOG WILL NOT FINISH IF JOG+ BUTTON IS RELEASE BEFORE IT GETS THERE
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
local inc, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
local cont, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
local jogcont = mc.mcSignalGetState(cont)

if( state == 1) then
CPJogPlus()
elseif ( jogcont == 1) then
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,

--DOES NOT WORK> CONTINUOUS MODE JOG+ PRESS AND RELEASED WILL NOT STOP RUNNING
--INC JOG WORKS
-- Add Pokeys Input 51 to Mach4 Input 51 for +Jog on Control Panel
[mc.ISIG_INPUT51] = function (state)
local inc, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_INC);
local joginc = mc.mcSignalGetState(inc)
local cont, rc = mc.mcSignalGetHandle(inst, mc.OSIG_JOG_CONT);
local jogcont = mc.mcSignalGetState(cont)

if(state == 1) then
CPJogPlus()
elseif (joginc == 1) then
elseif (joginc == 0) then
rc=mc.mcJogVelocityStop(inst,0)
rc=mc.mcJogVelocityStop(inst,1)
rc=mc.mcJogVelocityStop(inst,2)
end
end,

I have no way to know if these variables are even working other than it will compile...you cannot run debug and get any answers (or at least I don't know the secret)

87
Absolutely. If I can get past this part today I will feel like I had some great success.
The code needs to get even longer this and has gotten longer as I am adding to it, but It is broke right now due to the issue I am having. I did not add in the Y and Z for continuous yet.
Here are the pokeys inputs being used and a couple pictures of the actual control panel and pendant hooked into it. Everything is working fine electrically, I am just stuck on the coding. Even the switches and buttons do what they are supposed to, it just will not complete an incremental move unless you hold down the button until it finishes.
I had to convert this Machmotion panel from pokeys55 to pokeys57E, but I mapped everything out and it is working the same as it did on Mach3 with the old pokeys55 now. The pokeys plugin does not support the old pokeys.
The pokeys pendant settings do not really have what I need in there, so I was not planning to use that either I suppose. They don't even have a .0001 incremental option in the list for example. I did briefly try the mpg with that and it did move.

88
I have tried every way i could think of to do that and so far nothing works. If you know how to do it please post some code.

89
.....or way to make the mcJogVelocityStop code needed to stop a continuous jog not kill an incremental move that has not finished getting where it is going?

I wasted another day of my time trying to figure this out. I cannot get the dumb thing to wait for an incremental move to finish before going on no matter what I try.

Unfortunately there has to be code in there to stop a continuous move when you release the button if it is in continuous mode or it will just keep going until it hits the limit after you release the button. This same code kills an incremental move if you let go of the button before it gets to the commanded distance.

The documentation is so crappy and has no info for how output signals work. I have no idea if OSIG_JOG_INC or OSIG_JOG_CONT is 1 only when the axis is moving or only when its toggled into this mode or if it even uses ones and zeros. I don't know if I can use these as values, or if these are just locations you have to call out then assign a variable to.

I have tried what I can think of with it and so far no luck. I also have no idea if these are just 1,0 or they are a location that has to be called out, then assign the location value to a variable.

I may not even be on the right path of the right way to do this. There are no examples I can find and the API manual is too poor to figure it out easily.

You cannot run the debugger on the screen script. It just skips over anything in the siglib even if you have the button held down. This means a million times of entering and exiting these screens trying stuff.

I cannot get mcSignalWait to work with anything I conjure up. The same goes for mcSignalHandleWait.

The manual is such a piece of crap. The examples have no syntax that works the way it is written. There is no explanation that some things called out are a variable that you can assign whatever text you want. For example hSig. Where does it tell you that you don't actually have to use hSig.....or do you? Is WAIT_MODE_LOW a real thing to use in the command, or is this just the way they decided to say 0 should go there. Aggravating.

Every little simple thing takes hours and hours of trial and error to get syntax and things right due to the horrible documentation.

Anyway, I am deleting the rest of my rant. I am getting so frustrated because I can see now I will have another entire weekend spent and this thing still will not be done. If you knew how to do this already and knew the correct syntax etc, I think I got about 30 minutes of work done in 30 hours..... Every function takes a week worth of precious free time to get working. Unless you are lucky enough to get an answer here, your sunk.....

90
I am using pokeys for these inputs. The latency is not a problem. It all works fine with no noticable lag or wait. The problem is that when i added the functions for continuous jogging at different rates.
 When you turn it  on in the way I have it, it also has to know to stop when you let go of the button. The jog incremental does not need this.
So what happens now is that I added the lines to stop constant velocoty moves when you let go of the button. However this will also stop an incremental jog that has not completed its distance.
At first I was confused because I thought it was just the x1 and x.1 settings. However the others just seemed to work because they finished before i let go of the button.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 »