LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to connect to an OPC Server

Hi all,

I am trying to connect to an OPC Server from within LabView (6.1).
I have used the example vis, but I can only get a variable once when the vi is started. The value is not updating if it is changed on the OPC Server. With an other OPC testclient it is working fine. I put a OPC Logger inside the connection and found the following difference: Labview sent the command READ(), while my testclient sent the command ONDATACHANGE(). Can anyone tell me how to get labView to also send ONDATACHANGE() ?

Thx in advance
0 Kudos
Message 1 of 4
(3,134 Views)
Hello Viper,

"I have used the example vis, but I can only get a variable once when the vi is started."

Which example VI(s) are you using? What's your OPC server?

It's been awhile for me to do it this way, but I just used the LV6.1 'Datasocket OPC' example "Multiple OPC Items Monitor" to connect to a couple of OPC servers I've got running and had cts updates. Or are you using the LabVIEW DSC module?
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 2 of 4
(3,116 Views)
Yes I am using this example. I get cts updates, if I connect to the NationalInstruments.OPCDemo server, but I do not get cts updates if I connect to the OPC Server I need. I found out that I get cts updates from there as well if I connect to this server with LabView and also with a second OPC Client(Factorysoft client), at the same time. It seems to me that the Factory soft client is doing something what tells the server to send the variable on datachange.
0 Kudos
Message 3 of 4
(3,097 Views)
“... I do not get cts updates if I connect to the OPC Server I need. I found out that I get cts updates from there as well if I connect to this server with LabView and also with a second OPC Client(Factorysoft client), at the same time.”

Weird.

I regret that I can’t offer any useful suggestions other than perhaps taking a look at or playing with the configuration of your OPC server. I’ve only connected to OPC servers with Datasocket a few times when debugging/testing LV DSC apps and haven’t had the problem you’re encountering.

Hopefully someone else will pop in with better answers than me.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 4 of 4
(3,058 Views)