09-03-2011 03:55 PM
In my VI, I have two parallel loops communicating to the same DC supply through RS485. The 1st loop will issue command to read the set pont of the DC supply, and the 2nd loop will issue command to set the set point of the DC supply. There is a potential that they will try to commmunication with the DC supply at the same time. If so, would there be a conflict? Or would LabVIEW and VISA be able to handle something like that? If there is a conflict, I was thinking about using a semiphore. Any other ideas?
Solved! Go to Solution.
09-04-2011 03:49 AM
Statemachine with Initialize, read, wait, write, wait, Stop commands looks good to me. I use semaphores when there is a potential of race condition happening on queues.
09-04-2011 08:40 AM
A very simple functional global that handles all the communication with your supply handles this.
A functional glabal can only execute one command at a time and LabVIEW by default schedules the command from the other while after the first command.
functional globals are also called action engines and these mad life in LabVIEW possible before we had objects.
09-04-2011 11:23 AM
FG is what I am going to do. Thanks!
09-04-2011 11:53 PM
Actually, I changed my mind. I ended up using a semaphore instead. As I started to build my action engine, I realized that I had way too many functions that I need to implement. Semaphore is much simpler for my context.
09-05-2011 03:05 PM
Hi
Did you search for a driver for your power supply on instrumentdriver.net
09-05-2011 11:20 PM
A driver doesn't exist for my instrument. However, I have coded all the driver functions that I need. To use the AE approach, I need put all the 10 functions that i coded into the AE (5 functions for the 1st loop and 5 for the 2nd loop). Each function has its own inputs and outputs, so it is a lot work for a one time deal. Making the AE is not hard, but it is a little bit too much work compared to the semaphore approach.
09-06-2011 03:23 AM
09-07-2011 05:20 PM
09-08-2011 12:02 PM
In the write command, you send exact command through serial, right? In this way, the driver can't be used, correct? What did you mean by other vis will create commands and parse results?