PDA

View Full Version : Disable/Enable device - doesn't work in one macro. Why?



levyshay
October 13th, 2002, 12:55 PM
When I run macro by pressing pilot button - it's seams working, but it doesn't work... All information on status bar are OK - Device active, but Girder doesn't recive any more. :-? I have to manually press F9 two times to descativate/activate the plugin.
When I test command step by step - all is working OK. :o
Why?

Well this is something happens to me alot that while debugging the program works, but when you run it it's not.

I think windows needs a little wait before switching programs using the comport.

Just try putting wait's there and see...

Shay Levy.

levyshay
October 13th, 2002, 12:55 PM
I have 3 command in macro (MultiGroup):
1. Disable device 7 (Igror Plugin)
2. Execute external program wich using the same port as Igor Plugin
3. Enable device 7

I've just read your post again, there is something I didn't noticed.

After Step 2, How do you make sure that step 3 wouldn't be executed?
Cause girder proccessing a multigroup would just run steps 1-3 one after one, but it can be that it calls step 2, The program starts loading, while girder is already doing step 3, And then the port is locked.

Anyway, I've tried doing the same multigroup you did, and it works just fine, but my device isn't serial based, so my conclusion isn't 100%.

Hope I helped.
Shay Levy.

vynce
October 13th, 2002, 12:55 PM
You could try putting some waits in between your commands.

Just an idea...

sgrzys
October 13th, 2002, 12:55 PM
I have 3 command in macro (MultiGroup):
1. Disable device 7 (Igror Plugin)
2. Execute external program wich using the same port as Igor Plugin
3. Enable device 7

When I run macro by pressing pilot button - it's seams working, but it doesn't work... All information on status bar are OK - Device active, but Girder doesn't recive any more. :-? I have to manually press F9 two times to descativate/activate the plugin.
When I test command step by step - all is working OK. :o
Why?

sgrzys
October 13th, 2002, 12:55 PM
Good idea, but it doesn't work too. (wait 1500ms before Enable Device).

It doesn't work without executing the program (without point 2), too.
Did enyone try to do it? (Disabe and Enable Device in one macro, wich is activated by pilot on the same device)

I would like to execute the program by pressing pilot button. I need to use the same port as Girder. Please help me...

sgrzys
October 13th, 2002, 12:55 PM
But I'm shure that the port isn't locked. The application stop working after about 0,5s. When the port is used by another application, function Enable device, gave error: Couldn't open port COM2, or something like that.
3th step gave me comunicat on status bar "Input Device Enabled", but the device doesn't work :(

sgrzys
October 13th, 2002, 12:55 PM
OK. It's working in ver.3.2.2. :lol: