LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OPC example to control instrument

Hi,

 

I have an HV power supply from ISEG for which I need to write a VI to be able to control and monitor each individual channel (32 in total). The communication happens with an OPC server and I should point out that we do not have the LabVIEW DSC module .

 

So far, I have managed to talk with the instrument and bind the controls and indicators on my VI to one HV channel. I also made a VI which programactically changes the URL to bind the indicators to a different channel, when executed. So I guess I can do all I need. However, the overall code is sloppy and not very flexible so I am looking for an example of how to write a nice piece of code.

 

Ideally, what I want is a front panel with a quick overview of all the channels (status, on/off, current voltage) and some additional panels which can be opened with a button to view more details for each channel. I realize this request is rather vague but any help and suggestion (even in terms of "look chapter X of book Y") would be greatly appreciated.

 

As an additional question, I am still a bit confused about the data binding for controls. Sometimes you can have a LabVIEW control which acts as both reader and writer to the corresponding OPC value and this makes me feel a bit unease. What is the "good etiquette" for using front panel elements and data binding?

 

Cheers,

Paolo

0 Kudos
Message 1 of 3
(2,494 Views)

Hi Paolo,

 

are you using datasocket in order to communicate with OPC?

 

Datasocket is an alternative communication method withou using DSC Module.

 

This is a good tutorial that will help you. Here instead you can find how connect LabVIEW to OPC with datasocket.

 

Best Regards

Cla_CUP

0 Kudos
Message 2 of 3
(2,467 Views)

Hi Cla_Cup,

 

thanks for your reply.

As I wrote, I can communicate with the server. I use both datasockets and control data binding. However, my code looks really really bad and I was hoping to find some style guide on how to setup an OPC VI.

Thanks for the links.

 

Paolo

0 Kudos
Message 3 of 3
(2,447 Views)