LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Software architecture for multiple device interface

Hi everybody!

 

I'm quite new at LabVIEW and I have a question regarding software architecture.

 

I have to program a software for controlling 3 motorized stage, a camera and a pump. I have separately programmed VI's that control each of them and now I would like to merge them in a single program and I don't know what is the best way to do it.

So far my sub-VIs are made of "event-based" structure that reacts when the users click on pushbuttons. Should I simply put all my sub-VIs (i.e. multiple event structures) in one big while loop? Is it the best way to do it? I've been looking for a while for references about that but I couldn't find any relevant ones and I would really appreciate your help. Also if you know good references please share them to me.

Many thanks!

 

Bests,

Julien

0 Kudos
Message 1 of 4
(2,345 Views)

Hi Julien,

 

I would go with a Stream-based approach implementing a class hierarchy based on InputStream and OutputStream.

 

When you write to your motors/acutators/AO use a child class of OutputStream

And when you read from AIN/DIN, use an InputStream child.

 

See for example the Java version of the InputStream class hierarchy.

 

classInputStream__inherit__graph.png

 

Br,

 

/Roger

 

0 Kudos
Message 2 of 4
(2,338 Views)

Hi Robert,

 

Thanks a lot for your answer. Could you however develop a bit your because I'm fairly familiar with OOP in Labview but I'm having trouble to find how I should start and what Stream-based approach is.

 

If you could give me more details or send me a link to references about it it would be awesome.

 

Thanks again.

 

Cheers,

Julien

0 Kudos
Message 3 of 4
(2,307 Views)


If you could give me more details or send me a link to references about it it would be awesome.

 

 


Sure, have a look at the attachement and see if it could be extended for your use?

It is a fairly simple implementation. I use it for reading for a number of different InputStream devices, such as FPGA DMA FIFO's, sockets, files, etc..

 

Br,

 

/Roger

 

0 Kudos
Message 4 of 4
(2,303 Views)