Thanks Art,
I think Engine.GetCurPos(1) function should be Engine.GetAxisPos(1). Engine.GetTruePos(6) works as expected. I tried attaching the speed to a slider, and got very choppy behavior, with it randomly stopping on some settings. After a bit of playing I discovered I'm getting some strange behavior with FreeSetSpeed, which calls Engine.FreeSetConstant( axis, Speed ). If I try changing the speed with "Engine.FreeSetConstant( axis, Speed )" while the motor is running, the motor will toggle between stopped and the set speed on each call to the function. This also resets the Engine.GetTruePos(6) value.
Also, I'm trying to build a simple screen with as few controls as possible. I tried just adding and EStop button(with VarName set to EStop), but I get an error(7871) followed by a crash. Do you know if there is some minimum controls I need to make it functional. If it's not a simple answer, don't worry. I'm not using much of the stock screen,and trying to clean up the clutter.
Maynard
GlobalGet and var Name
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: GlobalGet and var Name
HI Maynard:
>> Do you know if there is some minimum controls I need to make it functiona l. If it's
I dont. Ive been adding and building to a purpose, and fixing as I go. In the context of moving motors,
I think it needs a Gcode window.. and Im not too sure it needs much else.
When I get a bit further, Ill try to reduce the screen and fix whatever hooks can cause trouble.
Ill loo at the speed setting, I know you cant change an axis type without stopping all axis, but
I may be able to smooth that speed change out so the undesirable circumstance go away..
Art
>> Do you know if there is some minimum controls I need to make it functiona l. If it's
I dont. Ive been adding and building to a purpose, and fixing as I go. In the context of moving motors,
I think it needs a Gcode window.. and Im not too sure it needs much else.
When I get a bit further, Ill try to reduce the screen and fix whatever hooks can cause trouble.
Ill loo at the speed setting, I know you cant change an axis type without stopping all axis, but
I may be able to smooth that speed change out so the undesirable circumstance go away..
Art
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: GlobalGet and var Name
Maynard:
I just uploaded a new version, Id be interested in knowing if it clears up your problems
with that slider and speeds
Art
I just uploaded a new version, Id be interested in knowing if it clears up your problems
with that slider and speeds
Art
-
MaynardC
- Site Admin
- Posts: 35
- Joined: Wed Feb 27, 2013 3:28 pm
Re: GlobalGet and var Name
Works like a charm!! As I change the slider, it ramps up and down smooth as can be. THANKS but, one other question.
The GetTruePos now doesn't reset ,as I would expect, but how do I set it. Something like Engine.SetTruePos(axis, pos)
Thanks again
Maynard
The GetTruePos now doesn't reset ,as I would expect, but how do I set it. Something like Engine.SetTruePos(axis, pos)
Thanks again
Maynard
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: GlobalGet and var Name
M:
Use
Engine.SetFreePos( a,b,c,d );
Art
Use
Engine.SetFreePos( a,b,c,d );
Art
-
MaynardC
- Site Admin
- Posts: 35
- Joined: Wed Feb 27, 2013 3:28 pm
Re: GlobalGet and var Name
Because I am in speed mode, found I had to switch to Pos mode for it to work.
Thanks for getting this working
Maynard
Code: Select all
Engine.FreeSetAxisType(this.axis,0);
Engine.SetFreePos(null,0);
Engine.FreeSetAxisType(this.axis,1);
Maynard
Last edited by Anonymous on Fri Jan 29, 2016 3:00 pm, edited 1 time in total.
-
ArtF
- Global Moderator

- Posts: 4557
- Joined: Sun Sep 05, 2010 5:14 pm
- Contact:
Re: GlobalGet and var Name
Thanks for the test, and for that tidbit, I wasnt aware the pos could only be set in pos mode.. but I see why. If its a problem I can separate the calls so it can be done on the fly..
To make a controller takes a village, thx for joining in.
Art
To make a controller takes a village, thx for joining in.
Art