Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

vi to run for visa program certain amount of time

Hi,

 

I'm using a LabView VISA program to control some stepper motor controlers. I can get the stepper motors to move using the attached program, but all i can do is get them to move whilst the mouse button is pressed down.

How do i get the program to run for a certain number of seconds, i.e. for the stepper motor runs for a certain number of seconds in the X Y or Z direction?

 

Thanks very much for any help. I am a newbie to LabView, having learnt it a while back and now coming back to it having forgotten most of it. So this is prob quite a basic Q!

 

Cheers,

Charlie

0 Kudos
Message 1 of 7
(4,557 Views)

You need to make a real state machine with one of the cases (Idle) containing an event structure.  The event structure can then set the next states to be ran, whether it is to just set a single point or run a sequence.

 

This is not quite the trivial project here.  But if you do a good study of the CLD  examples and solutions, you will get some really good ideas.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(4,551 Views)

Thanks crossrulz,

 

Thanks so much for the reply. Can I ask what CLD is? Certified LAbview developer?

I'll go through examples and see how i get along, 

 

Cheers,

Charlie

0 Kudos
Message 3 of 7
(4,513 Views)

CLD = Certified LabVIEW Developer.  You can find the practice exams and any other prep material here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/10647


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(4,502 Views)

Great thanks very much!

Charlie

0 Kudos
Message 5 of 7
(4,499 Views)

Hi again,

 

I've attempted to get one stepper motor running in one direction for 5 seconds - please see the attached edited version of the VI, and the 'Z forward' tab in the RHS event structure (which is the only one I've changed at the moment). This loop added in kind of does move the Z axis 'forward' for 5 seconds, but it does seem to vary in how long it moves. Sometimes it will move the Z axis forward for 5 seconds sometimes 3, sometimes less.

 

Is this the right way to go about trying to move the translation stage in a certain direction for a certain length of time? Any idea why the time varies?
 
Thanks again for your help,
Charlie

 

0 Kudos
Message 6 of 7
(4,425 Views)

Sorry i forgot to add the attachment! Here you go

0 Kudos
Message 7 of 7
(4,424 Views)