08-06-2010 10:49 AM
Hi Pazmush,
first: your attachment is not a "All in one" - it lacks some subVIs...
Then: I doubt the InstrumentIO-Assistant will work this way - atleast I never used it this way (well, in fact i never used it before...).
When you want such a strict order of operations you should use a state machine working those steps in the correct order. You don't need an event structure to coordinate a strictly ordered state machine...
In the attachment you can see the tremendious effect of the "brush" tool aka "Automatic clean-up tool" of LV2009...
08-09-2010 06:52 AM
isn't an event structure in a while loop a state machine?
08-09-2010 10:42 AM
Hi Pazmush,
Have you considered using this driver instead of using manual instrument control? Post back if you have questions
Regards,
08-09-2010 11:53 AM
One common way to implement a state machine is to use a case structure in a while loop. It is not impossible to use an event structure as part of a state machine, but it does not make good use of the capabilities of either the event structure or the state machine and may lead to a lot of complications.
The primary use of the event structure is to respond to user inputs on the front panel. The change from one state to the next in a state machine is dependent on the current state and data available within that state. That data can certainly include user input, but in many cases does not.
The Producer/Consumer architecture is probably a better way to provide user inputs to a state machine. Put the event structure in the producer loop and the state machine in the consumer loop. Transfer commands from the Producer to the Consumer via a queue. The value dequeued in the consumer becomes part of the data available to the state machine to make its next state decision.
Lynn
09-22-2010 02:26 PM - edited 09-22-2010 02:27 PM
Hi Folks,
Here it goes what I have got so far regarding the communication between HP4145b and Agillent GPIB:
When I first started using the HP4145b_example.vi that I downloaded from NI I was unable to use it just like Jin aforementioned. To get it working properly all I have done is to replace the GPIB VIs by VISA VIs (basically the Write and Read VIs). Doing that I am now able to communicate with HP4145b. Note that all other HP4145b library files MUST be changed accordingly.
However, I am still experiencing some issue regarding the reading process. When I run the program I canNOT acquire the data from HP4145b. On the other hand, when I set my Labview program to run on Debug Mode, which runs in such a slow motion way, I acquire the data properly. So, I figured out, as many people around have discussed, that a delay is needed before the Reading in order to have HP4145b communicating properly. HOWEVER, even setting a huge of delay such as over 20 secs I cannot acquire the data.
Any idea about how to sort out that problem?
I even used the Status Byte VISA VI in order to get a signal from device before reading its data but this signal never arrives. So I imagine that the issue is around here. Note that Variable Settings, Set Up enviroments and Meas and Disp Settings work properly. The only thing is not working is data acquiring process.
Any help is welcome!
Thanks in advance,
09-23-2010 03:17 PM
Is your VISA Read VI throwing any errors, or are you simply not reading any data?
- Greg J
09-23-2010 03:30 PM
Hi Greg,
VI is not showing any errors. I was just unable to read any data. But last night I could fix the issue. What i have done was to add a delay not only before Read VISA VI but also before Write VISa VI. I set a time such as 1 sec for each and now I can acquire the data.
Thanks anyway,
Best,
Goc