GlobalGet and var Name

Discussions and file drops for Auggie
MaynardC
Old Timer
Posts: 35
Joined: Wed Feb 27, 2013 4:28 am

Re: GlobalGet and var Name

Post by MaynardC »

  As to the FreeAxis, they work any of them can be speed or postion based, you canot switch their mode while moving them.
So set them once and dont change them unless they are stopped. Mode 0 is position, mode 1 is speed. When in speed
any speed set is in units/min .  Any not in speed mode, are considere d to be in position mode. Any speed axis is ignored
for a FreeFeedT o move. I will be adding a vector3 based call for getting the x,y,z of the free axis in one call.
Is it possible to get the position of a Free speed axis?
Auggie is getting quite stable :) Rarely crashes (usually around not being connected to pokeys, when it thinks it should). Amazed at the progress every time you surface.

Thanks for the effort
Maynard
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

Hi Maynard:

  Sorry about that , I remember I promised you a method, Ill look at that this morning.
As you can imagine, Im at that stage where Auggie is spreading capability in multiple
directions, so Im constantly getting hijacked as I find bugs ( or get them reported) that impact performance in
one direction or another.
    The next major step is the Augmentation facility for controlling outputs in the same time stream
as the step output. I wont start that till I clear up the many items on my list to make it stable and easier
to use.

  Stability is quickly getting there, the ones I see are usually related to the network losses, as
if the pokeys disappears, some of the pointers go bad, and I haven't tracked that down yet.

Ill see about adding a method today to store the speed axis location before I zero it. I zero it,
so that the other axis's see a zero in a speed slot , that way Cartesian coordinates work fine
while speed axis are in operation..
MaynardC
Old Timer
Posts: 35
Joined: Wed Feb 27, 2013 4:28 am

Re: GlobalGet and var Name

Post by MaynardC »

Would it be difficult or suitable to add a method to get the steps directly off Pokeys as part of the Motion() library.

Maynard
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

Maynard:

  For a secondary pokeys I could add that, but the primary pokeys is under buffered control, this means
it runs a motion loop every 5ms or so that keeps it refreshed. It means everything I do in there, I pay a small
penalty for in time.. so I tend to keep it clean.
  Now, every few ms it updates the indexes anyway, but zeros the speed one. What Ive done is create a shadow
copy called TruePositions that keep strack of the real indexes in realtime. Im adding an Engine.GetTruePos and a Engine.GetAxisPos to the code, so you can pull any of the 8 coordinates in either mode.


Art
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

Maynard:

This is now online, if you redownload you can use the command,

a = Engine.GetTruePos(1); for x Axis for example.

This returns work coordinates, and doesnt matter if its a speed axis or not..

a = Engine.GetCurPos(1) ; will return the work coordinates, but zero if its a speed axis..

etc.

Thx , hope it helps,
Art
MaynardC
Old Timer
Posts: 35
Joined: Wed Feb 27, 2013 4:28 am

Re: GlobalGet and var Name

Post by MaynardC »

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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

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
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

Maynard:

I just uploaded a new version, Id be interested in knowing if it clears up your problems
with that slider and speeds

Art
MaynardC
Old Timer
Posts: 35
Joined: Wed Feb 27, 2013 4:28 am

Re: GlobalGet and var Name

Post by MaynardC »

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

User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

M:

Use

Engine.SetFreePos( a,b,c,d );


Art
MaynardC
Old Timer
Posts: 35
Joined: Wed Feb 27, 2013 4:28 am

Re: GlobalGet and var Name

Post by MaynardC »

Because I am in speed mode, found I had to switch to Pos mode for it to work.

Code: Select all

            Engine.FreeSetAxisType(this.axis,0);
            Engine.SetFreePos(null,0);
            Engine.FreeSetAxisType(this.axis,1);
Thanks for getting this working
Maynard
Last edited by Anonymous on Fri Jan 29, 2016 4:00 am, edited 1 time in total.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: GlobalGet and var Name

Post by ArtF »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 75 guests