LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Way to code LabView to allow hardware abtraction?

Is there a way to code LabView to allow abstraction from hardware?  For example, I continuously have to modify code to accommodate new devices that are similar but have register address changes, or perform the same function, e.g. RAM load, but the instruction set is slight different.  Is there a way to have LabView go and fetch the hardware specific details from a file or such, with the code remaining the same please?

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

Here's an article about HALs (hardware abstraction layers).

http://zone.ni.com/devzone/cda/epd/p/id/6307

 

LVOOP will probably be the best method for implementing a HAL.

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

I agree, LVOOP does provide a neat soloution, but there are alternatives to consider.  You could use the Call By Reference node which allows you to programatically select the subVI which will be executed. Or, write your instrument driver as a state machine in a sepperate VI and use Queues to communicate with your main VI.  As long as the queue data remains the same, the instrument vi can be completely different.  Launch the instrument VI using VI Server, then you can specify the VI that will be run at the start of your application depending on the instrument connected. (search Daemon Architecture).

 

Michael.

Message 3 of 4
(2,627 Views)

@RiversDaddy wrote:

I agree, LVOOP does provide a neat soloution, but there are alternatives to consider.  You could use the Call By Reference node which allows you to programatically select the subVI which will be executed. Or, write your instrument driver as a state machine in a sepperate VI and use Queues to communicate with your main VI.  As long as the queue data remains the same, the instrument vi can be completely different.  Launch the instrument VI using VI Server, then you can specify the VI that will be run at the start of your application depending on the instrument connected. (search Daemon Architecture).

 

Michael.


Agreed!

 

LVOOP has a learning curve added on top of what is required to use the VI server approach.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,582 Views)