LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview architecture problem

I am currently using Labview 8.2 to develope a data acquisition system. The server will continously collecting sampling data from sensors and for each sampling data, it will do some data processings and send the results to a client. The client will send the commands to the server. The server will send the corresponding data back to the client after data compression. The client will decompress the data after receiving them and show in the graph charts.

My question is whether I need the realtime module which is missing in our school labview version. Most probably,  I know  I  need it  since I have to use FIFOs to store the collected data. Is there a way to get round from it? Another question is how to seperate tasks in the time-critical loops (determinte) or intermediate piority loops (non-determinte)? Should I only put the data acquistion in the time-critical loop and put the others in the intermediate pirority loops?

Any suggestions are welcome. Thanks in advance.



0 Kudos
Message 1 of 6
(3,322 Views)
The question of real time versus OS-brokered hardware control is answered typically by your need to control the timing aspect of your various processes. In my experience with NI products, the hardware has sufficient timing control to allow one to use regular OS-brokered control, e.g. LV 8.2 running on a desktop machine running XP.

LV real time is a complication above and beyond the usual need. Make sure that the timing requirements (based on sample rate and response time requirements) force you out of normal control before targeting a real time platform with your application.

Regarding the structure of your code, I think you have the right idea. Generally, you want the data acquisition loop running in a quasi-deterministic fashion (quasi because we start out assuming an ordinary non-real-time operating system) in its own loop. The acq loop could fill shift registers in a functional global (a while loop with uninitialized shift registers forced to execute once for each vi call), which you then access from the event driven loop. The event driven loop would handle button clicks and socket traffic. You would make the data storage in the functional global operate like a FIFO buffer. As always, the number of operations performed in the functional global should be kept to a minimum to insure that the acq loop timing is not adversely affected by the event driven loops.

LabVIEW has some pretty painless ways to share data on a network connection. If your code is part of a course that requires you to build your own client and server, then the structure you indicated seems appropriate. On the other hand, you could let the NI datasocket server broker the data communication and simply publish any indicator's value, accessed through the data operations pull-down menu, allowing any client to access it.

Let me know if you need more detail.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 2 of 6
(3,297 Views)
Thank you very much. I am wondering if  FIFOs can only be found in Real time module.

Thanks again.
0 Kudos
Message 3 of 6
(3,283 Views)
I want to make sure that I understand your application. So I need to ask a few questions.

Are talking about using an actual programmable FIFO buffer on a separate piece of hardware, or can you use your system's RAM for data storage?

What kind of data are you acquiring?

What is the device you are using to acquire data?
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 4 of 6
(3,274 Views)
The desktop equivalent of the FIFO is the queue.  If you don't know how to use queues (or notifiers, semaphores, occurrences, etc.), take an afternoon and learn how to use them.  They are essential for the type of programming you are doing.  Queues can be used for interprocess communication, reference objects, and synchronization.  They are as memory efficient as the LabVIEW architecture allows.  Try queues, you may like them.  They solve a lot of problems.
0 Kudos
Message 5 of 6
(3,242 Views)
This KB explains queues, semaphores, notifiers, and rendezvous a bit more.  Please note the related links and example programs for each type.  Other examples can be found in LabVIEW>>Help>>Find Examples...

Please post back if you require additional information or clarification!
Lorielle P.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,191 Views)