Page 75 of 78

Re: reading Pokeys pins

Posted: Thu Nov 14, 2019 3:03 pm
by gburk
Art

xx = Engine.GetAxisPos(3); this seems to return a random number if the Z axis is set to 0.
if i set the Z to .5 it will return the correct value, just seems to return a bad number at or around 0.
the x (1) and y (2) are fine they will return a 0 correct number..

GlobalGet Axis3 works corrent returns a 0

Sorry figured it out had to convert ToInt now works...

Thanks gary

Re: reading Pokeys pins

Posted: Sat Nov 16, 2019 9:33 am
by ArtF
Gary:

Sounds like things are working mostly well. Sorry Ive been only
intermittently. Im testing some code for clubfoot escapements, once Im
finished up Ill look in Auggies direction again as I have some things
Id like to flesh out.

Art

Re: reading Pokeys pins

Posted: Sat Nov 16, 2019 12:18 pm
by gburk
Art

No problem thanks for you work and a lot of help..

I'm hoping that removing the latest print statements may help with not having to slow down feed rates for the smaller holes..

Gary

Re: reading Pokeys pins

Posted: Mon Nov 18, 2019 1:17 pm
by gburk
Art

Having some trouble with dowhile and while loops

maybe i 'm just confused go figure..

Anyway can you call a function from the while loop, and in the function you are call have a while loop also?
And if i call the function is there a way not to reset the variable's each time its called..
say i have a loop counter in the second function, i don't want to reset the counter every time i call that function, there may be 3 or 4 values i don't want to reset..

there is no way to a goto, or use a sub in a script right..

Gary

Re: reading Pokeys pins

Posted: Tue Nov 19, 2019 8:22 am
by ArtF
Hi Gary:

>>Anyway can you call a function from the while loop, and in the function you are call have a while loop also?

  yes. shouldn't be an issue.

>>And if i call the function is there a way not to reset the variable's each time its called..
say i have a loop counter in the second function, i don't want to reset the counter every time
i call that function, there may be 3 or 4 values i don't want to reset..

  Unless their global var's they will reset. You could use global vars and
have a reset routine as well, but there is no real support for static I dont think.

>>there is no way to a goto, or use a sub in a script right..

  No, other than conditional breaks , there isnt much for loop control. Best you can do is clever design of
scripts called that use globals with other scripts to set them to defaults.

Art



Re: reading Pokeys pins

Posted: Tue Nov 19, 2019 10:19 am
by gburk
Thanks Art

I thought global's would be the only way but just in case i figure i'd ask..., if you don't ask no matter how dumb it may sound you will never know..

Gary

Re: reading Pokeys pins

Posted: Sun Nov 24, 2019 2:59 am
by gburk
Art

Been working with the % bar.
Is there a way that every time the bar is moved, slide up down to call a function?

It has a var name, but if i create a function with that var name, its not called to that global function.
I know how to get the value from the slider i just wanted to do some stuff every time it's moved..

Gary

Re: reading Pokeys pins

Posted: Tue Nov 26, 2019 8:33 am
by ArtF
Gary:

  Ill check. As I recall as long as a function is named it will be called when the slider changes,
but I may have turned that off for traffic control.. too many calls.. I'll check and see.

Art

Re: reading Pokeys pins

Posted: Wed Nov 27, 2019 5:22 am
by gburk
Thanks art

Was hoping i'd catch you before you made the change to enable Reading %bar, if you could remove the prints you added for the feed rates.
Wanted to see if that had any effect on having to use  slower feed rate's when probing smaller holes..

Gary 

Re: reading Pokeys pins

Posted: Thu Nov 28, 2019 1:18 am
by ArtF
Gary:

Ill do that as well..
Probably by end of weekend..

Art

Re: reading Pokeys pins

Posted: Thu Nov 28, 2019 9:37 am
by ArtF
Gary:

Found a rather serious error in the messaging flow for the control scripts.
I think I have it fixed, still testing, be out this weekend I suspect.

Thx
Art

Re: reading Pokeys pins

Posted: Thu Nov 28, 2019 3:45 pm
by gburk
Art

Thanks when ever you get time, I'm trying to get my scripts a little more organized before i post them there all over the place. also hopefully a short video for each one i'm really not good at video's..


Gary 

Re: reading Pokeys pins

Posted: Sun Dec 01, 2019 12:40 pm
by ArtF
Gary:

  I think its working now. The slider should give a message at most 10 times a second when moving.
I will post it tomorrow. There was a serious error in its messaging queue. This may also affect buttons
and some other controls, but I cant see any effect as yet. So Ill put it out tomorrow and we'll see how
it works.

Thx
Art

Re: reading Pokeys pins

Posted: Sun Dec 01, 2019 2:44 pm
by gburk
Art

Will give it a run, if there's a problem I always seem to run into it.. and will let you know..

Gary

Re: reading Pokeys pins

Posted: Mon Dec 02, 2019 2:07 am
by ArtF
Gary:

  New version is online now. It should give proper calls to scripts when controls are changed.

Art