Script Bug

Discussions and file drops for Auggie
Post Reply
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Script Bug

Post by DanL »

Hi I am playing with a LED on screen.

If i copy and past this

led = Led("Main_LED_0");
led.SetStateMask(1);
sleep(13);
led.SetStateMask(0);  //this makes the LED turn off, then on again in 3 seconds.

The LED will not work at all.

If delete this ("Main_LED_0"); and use shift right click to places the LED name it will work.

I think the copy and past may be a part of the problems I am Having and why some things will work where I typed them in then wont work where I pasted them, the script is running when this happens just not showing anything on screen.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Script Bug

Post by ArtF »

Hi Dan:

>>sleep(13);
>>led.SetStateMask(0);  //this makes the LED turn off, then on again in 3 seconds.
>>The LED will not work at all.

  That is strange. I cant seem to repeat it here.. I wonder what the difference is. Also, the led should
cycle should be 13 seconds if its working right. (Ill assume thats a typo? ). Ill see what
I can see and run a few tests.

Thx
Art


DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Script Bug

Post by DanL »

yep 13 seconds I increased it so i could time it easier and it's on.

Straight out pasting of this just failed every time I did it.

led = Led("Main_LED_ 0");
led.SetSt ateMask(1);
sleep(13);
led.SetSt ateMask(0);

Setting a number to the led and changing just the number in the code it would fail until I use shift right click for the dro address, if I coped and pasted it again it would fail.

I tried it a few time trying to work out what part of the code was failing, Mach4 was doing the same thing.
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Script Bug

Post by DanL »

Found another one I added a bit of code into the spindle on and spindle off, I could not get it to work at all yesterday I new it should work, but it just would not work, did all the normal stuff restart Auggie the computer all that, nothing worked.
It just led.setstatemask (1) in spindle on and led.setstatemask (0) in spindle off with the call to the led above it as well.

turned Auggie on this morning and it working cool test it, it did not work then it did.

What I found is if the the buffer and the screen prints are up to date it will work, as in nothing new running all print in the toolpath window up to date it will work as it should.

If there are prints still scrolling in the toolpath window it wont work to it is uptodate.

It may not be Auggie being slow, The computer I am useing I think is about to die so it could be the computer. triple check before posting I can reproduce it every time.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Script Bug

Post by ArtF »

Dan:

Thx, Ill check that out. It may be I need a screen refresh or something at that point.

Art
DanL
Old Timer
Posts: 362
Joined: Wed Sep 10, 2014 1:35 pm

Re: Script Bug

Post by DanL »

Being able to add a bit of code here and there without haveing to go to great lengths writing code, It makes Auggie quite easy to use.

The only thing left now is tool hight, that can weight to i learn a lot more.

I wont to do a screen set for a filament winder, I know I don't need to I can just use the Arduino code I have now but why not.
User avatar
ArtF
Global Moderator
Global Moderator
Posts: 4591
Joined: Sun Sep 05, 2010 6:14 am
Contact:

Re: Script Bug

Post by ArtF »

I always used a coil winder as a mental model when I designed the screens and the scripting interfaces..
Should be quite simple in most respects, let me know how it works out..

Art
Post Reply

Who is online

Users browsing this forum: No registered users and 51 guests