Hello Guest it is April 28, 2024, 09:07:51 PM

Author Topic: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant  (Read 1336 times)

0 Members and 1 Guest are viewing this topic.

Offline bcoop

*
  •  61 61
    • View Profile
I am running Mach4 4.2.0.4768 an ESS Smooth Stepper Board and a VistaCNC P2-S4 CNC Control Pendant for Mach4
my axis config is Motor0 = X,  Motor1 = Y primary , Motor2 = Z, Motor3 = Y Slave
the Pendant provides the ability to command to zero all axis' and also to send all axis' to position zero.
If I use the onscreen button to go to working zero, all axis' move to zero position. (works fine)

If I use the Pendant to go to zero, i get a message "Axis 3 commanded while disabled"
All other functions and commands on the pendant are working for me, just not goto zero. 

anyone have any ideas ?
I cant seem to even find where in the screens set the message is coming from.

Any assistance would be greatly appreciated.

Bob
Bob
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #1 on: February 26, 2022, 05:27:38 AM »
Looks like it is trying to command the A axis to zero, which you don't have, hence the message. When the button is pressed does it execute code in the screen load script or is does the plugin do it internally?

Offline bcoop

*
  •  61 61
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #2 on: February 26, 2022, 07:47:30 AM »
thanks for the response,
the on-screen button runs the script, (attached)  which works fine and includes A, so I assume that the Pendant has its own method in the plugin, but no way to verify
Bob

Offline bcoop

*
  •  61 61
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #3 on: March 04, 2022, 08:20:26 AM »
Additional Information

Turned on logging  (log file data attached) 
found that when using GoToWorkZero Screen Button, the following command is issued
API: mcCntlMdiExecute(inst = 0, commands = 'G00 G53 Z0G00 X0 YO G00 Z0') (unknown caller)

When using the VistaCNC P2-S4 Pendant, this command is issued
API: mcCntlGotoZero(inst = 0) (unknown caller)

-----------------------------------------------------------------------------
From the API reference document,

rc = mc.mcCntlGotoZero(number mInst)

Description:
Move the X,Y,A,B,C and then the Z axis to zero of the current fixture offset.
-----------------------------------------------------------------------------
I have A,B,C all disabled, only using X,Y,Z and getting the error message "Axis 3 commanded while disabled"
If I enable Axis A , then I get and error "Axis 4 commanded while disabled"  which makes no sense to me.

it appears that possible something is not quite right in the API, enabling an Axis, causing the "Axis x commanded while disabled" error to occur.

anyone have any thoughts?


Bob

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #4 on: March 04, 2022, 09:03:31 AM »
It looks to me like you need to fix the code.
Go to Operator then Edit Screen.
On the left select the top object in the Screen Tree Manager
Under Properties select the middle icon.
Click on Screen Load Script then click the button with the three"..."
Find function GoToWorkZero()
It should have several options.
Some will be commented out.
Make sure the one you want is not commented out and all the others are commented out.

This might help also.
https://www.machsupport.com/forum/index.php?topic=45397.0


Bill

Offline bcoop

*
  •  61 61
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #5 on: March 04, 2022, 09:06:28 AM »
GotoWorkZero code in the screen load script works fine, its the pendant command that doesnt work correctly mcCntlGotoZero(inst = 0)


This works fine
Function GoToWorkZero()
    mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 \nG00 Z0")--With Z moves
end
« Last Edit: March 04, 2022, 09:11:42 AM by bcoop »
Bob

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #6 on: March 04, 2022, 09:16:25 AM »
I do not use that pendant.
Under Configure / Plugins is there a plugin for it?
It might be in there you can tell it not to use "A"

Offline bcoop

*
  •  61 61
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #7 on: March 04, 2022, 09:20:56 AM »
there is a plugin for it but appears that there is no user configuration, 
scratching head here,   :-\
Bob
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #8 on: March 04, 2022, 09:33:18 AM »
Seems like the API call needs to only command the enabled axes rather than all of them.

Is the error message preventing the machine from moving?

Offline bcoop

*
  •  61 61
    • View Profile
Re: Axis 3 commanded while disabled - VistaCNC P2-S4 CNC Control Pendant
« Reply #9 on: March 04, 2022, 09:56:01 AM »
Correct, no axis' will move just display of the message, and  what is confusing is that if I enable my A-Axis, then the message changes from Axis 3 to Axis 4 commanded while disabled,  its like if the axis is enabled it generates the error, just the opposite of what is expected
Bob