LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I design software to test multiple devices simultaneously and indpendently?

I have a fixture for burning in up to 10 Controllers. I’ve written a VI to test one of the controllers but I’m not sure what approach to take to write the software for burning in up to 10 Controllers independently.

The fixture's computer uses USB/GPIB with a 34970 Agilent Switcher and a junction box to switch CAN communications on and off between the computer via a 8473 USB/CAN converter and any one of the 10 controllers.

Each controller burn-in cycle is 50 hours and I need to be able to burn-in Controllers independently, including being able to start a burn-in for any of the 10 Controllers at any time. Also I need the capability to have any number of Controllers burning in, from 1 to 10 at any time. So for example I might want to start a burn-in for a Controller then 2 hours later start a burn-in on another Controller. Each burn-in would end 50 hours later at which time I might or might not start another Controller in that station while other Controllers are somewhere in their  50 hour cycle.

Also during the 50 hour burn-in every minute or so I would like to connect the CAN, in turn, to each station in use to send and receive CAN commands to acquire data which would be stored into a separate file for each Controller.

In addition to help on the approach to take, I also would like help on how to create ten 50 hour timers, one for each station that would start whenever a controller burn-in starts and end after 50 hours. This is my second large Labview Project.

Thank you for any help.

0 Kudos
Message 1 of 14
(4,042 Views)

Hi Chuck,

 

Does your application require a lot of processing power?  I see two easy options for this: You can replicate this code for each controller, or you can create input/output arrays within your code to address the individual controllers.  You could use an event structure for starting the process.  Then you could adress the corresponding controller and hit the start button.  You would need to know the maximum number of simultaneous processes you would use though, because you would need separate code for each active process.

 

 

Nick Keel 

Applications Engineering 

National Instruments

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 2 of 14
(3,995 Views)
I would create a VI template (or a reentrant subVI) which contains the burn-in process. This would require the appropriate inputs needed to specify which controller as well as any other parameters you need. Your UI would be the master application and when a user specifies one or more burn in processes is to be started the master application would dynamically start the individual processes. If you add queues or notifiers to your system you could pass status information between the master and slave processes. If you need to coordinate your processes with a single hardware resource you could write a dedicated process for that task and have the individual processes queue up the task with the hardware resource process.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 14
(3,983 Views)

Nick,

 

Not a lot of processing power is required. When you say replicate the code I'm guessing that you mean parallel loops. If I use parallel loops how do I control which controller's CAN is communicating with the computer. The way the hardware works is that I use GPIB to select which controller is connected to the computer via the CAN bus as described in my original post. Basically I guess, using parallel loops I would need a way to poll each of the loops sequentially during which time I would send and receive the CAN commands that I need to. That's the part that I dont know how to do.

0 Kudos
Message 4 of 14
(3,982 Views)

Mark,

 

Your approach sounds like it might be a bit over my head right now. Is there an example,  possibly in Labview help that might help me understand your suggestion?

 

0 Kudos
Message 5 of 14
(3,978 Views)
There isn't a single example that would illustrate what I was suggesting. You could look at the example "Programmatically Controlling VIs->Dynamically Loading and Calling VIs->Dynamic Load Example.vi" for an example of loading VIs dymanically. If the VI being loaded is dynamic then you will get a separate process each time you call the load. There are plenty of examples under the "Optimizing Applications->Synchronizing Tasks" that will illustrate using queues, semaphores or notifiers.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 6 of 14
(3,971 Views)

I'm going to go through the examples that you suggested. What is the best way to create a continuous 50 hour clock for each controller in this application? Is the wait function best for this? Also will the approach you're suggesting allow me to independently start and stop each Controller at anytime while running up to 10 controllers simultaneously?

 

Thanks for all your help.

0 Kudos
Message 7 of 14
(3,958 Views)
I would not use the Wait function to determine if 50 hours has been reached. I would recommend using a queued state machine for your controller processes. The queue messages would not only contain the internal states for your state machine but would also be used for your master application to pass messages to the process such as the stop or abort message. If your state machine will be idle most of the time you could use a simply timeout on the Dequeue node. When you timeout without a message you could check the elapsed time. If you look at the car wash example they have a modified version of the Elapsed TIme express VI that would allow you to pause the timer. At any rate the Elasped Timed Express VI uses the system time to determine when the timer has expired. You would need some type of simple wait or timer in your state machine. Here you could use the simple Wait VI. You can't use a single wait VI to wait for the entire time because you will not have a way to abort the task.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 8 of 14
(3,956 Views)

I've decided to use a Producer-Consumer architecture for this project, but it is my first experience with one and I'm having a problem.

 

To operate the program as I have so far:

1. Select an active device button (1 of 10)

2. Select "Start Burn In"

3. (May repeat process for any or all of the active device buttons - all 10 can be active at once)

4. To stop burn in for any device select "Stop Burn In" for the selected active device button.

 

The way I have it shown in 1.VI it does what I expect. But when I try to add code in the "TimeCheck" case of the Producer loop things do not work.

This can be shown by removing the disabled loop in "TimeCheck".

 

The intent of data in the "TimeCheck" case is to run continuously for all loaded devices as individual devices are started and stopped, or stop automatically after 48 hours.

 

As an alternate approach, I also tried putting the code I have in the "TimeCheck" case directly into the "TimeOut" event, but I couldnt get that to work either. Notice in 2.VI I tried just putting a while loop into the "TimeOut" event and it doesn't execute.

 

Any help is greatly appreciated.

Download All
0 Kudos
Message 9 of 14
(3,730 Views)

Hello,

 

Where does the code hang with the TimeCheck portion? It is a little unclear by what you mean by things do not work with this portion - what specifically happens? What about putting the time check in its own loop to run in parallel?

 

-Zach

 

0 Kudos
Message 10 of 14
(3,668 Views)