Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How should I use a event-driven mechanism to realize a I-V measurement initialization?

My voltage output has 4 ranges as 200mV,2V,20V and 1000V.Each time When the voltage range is changed,I use a event handler to alter the upper limit  value of both start point and end point for I-V measurement input.After the application is launched,I set the default start point and end point as 0.1V and 1V respectively.But if the application is ended with the voltage range set to be 200mV,when the application is launched again,the upper limit for input is 200mV and the end point can not be set as 1V before the voltage range has been changed.But the event structure which offer the handler for voltage change can only be entered after all the initialization changes has been made,so end point will be 200mV after initialization completed,not 1V.How can I solve this problem?Can I use the existed event to realize application startup initializtion,or should I give addtional code for this purpose?
 
Thanks for help.
0 Kudos
Message 1 of 5
(3,524 Views)
Pansy,

assuming you have a control that sets your limit range and you use a value_changed event, you can set a default value for that control. Use a property node named Value_signaling. This one fires the very same event as if you would have set this control manually.
HTH   and Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 2 of 5
(3,509 Views)

Thanks for helping me.

Because I have to set default value for two control,control A evaluation is depended on the event completion of control B.But if I place the value initialzation before the event structure,the event for control B can not be executed during the initialization process.How should I do?

What I want is as follows:step 1:initalization,step 2:event structure

control B evaluation------event for control B------control A evaluation-------event structure

Whether the event for control B can only be executed after control A evaluation in labview?

Ps:I dont know if I have mentioned my question clearly.Thanks anyway for help.

0 Kudos
Message 3 of 5
(3,491 Views)
Pansy,

seems there's a whole app in your mind 😉
Try to study those templates as provided by LabVIEW (at least since 7.1):
* Producer/Consumer design pattern with events
* queued message handler   or
* standard state machine
Review those templates, search for examples and afterwards ask more detailled Qs.

I for myself would try to start with the Producer/Consumer pattern and send commands to the consumer loop, based on the actual state of the application and on user actions.

HTH    and
Greetings from Germany!<br>-- <br>Uwe
0 Kudos
Message 4 of 5
(3,483 Views)

Thanks you Proven.:)

Yes,I am developing a semiconductor measurement system.Because I used to use other language to make events-driven mechanism and it's quite simple.The events-driven mechanism for labview seems to be a little different.I have just upgrade my labiew version for 7.0 to 8.0.Now I can carefully study those templates.

Thanks for your advice.:)

0 Kudos
Message 5 of 5
(3,466 Views)