10-03-2008 04:41 AM
Hi all,
Im building a VI to automate a signal-reading from different vectors by rotating the sender of the signal. it works like this:
1. The interface print receives a ready signal and procedes to the starting position.
2. When the rotor is ready, the interface sends my VI a signal to start the series of measurements.
3. When the measurements are finished, my VI sends a signal to the interface which in turn sends a signal to the rotor to procede to the next position
4. repeat from step 2 until the final position is reached, in which case the interface sends a "done" signal
I'm using a RS232 connection (using the "instrument I/O assistant") and i worked out how to send and receive the information required, but the question is:
How can i get my program to work when I get the ready signal, because the program runs even when nothing is received?
And how do i get my program to send the required information when my measurements are done?
please help me 🙂
Ho
10-03-2008 04:48 AM
Your problem sounds like the definition of a state machine architecture 🙂
There are some examples in the example finder.
10-06-2008 01:19 AM
Hello Ho,
Thank you for your post on our webforum. I think it is best to start with a example; basic and advanced serial write and read examples are installed with NI Visa. This is a good starting point.
The settings with those VI's are depending on your hardware you are trying to control. I think in what you described the basic Visa VI's are a better solution; only one VISA session will be used with writing and reading. With I/O assistant it is all in once; for each action a new Visa session will be created.
I hope this will help you further,
Best regards,
10-06-2008 08:44 AM
The basic serial communication examples will help you to understand how to communicate with the instrument. You can try out one command at a time.
When implementing your complete solution you should use a State Machine architecture. Look for examples on the forum. There should be some that include serial communication.
R