From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket Select URL.vi

I have an application where I would like to give the user the option to select multiple OPC tags. I am using the DataSocket Select URL.vi

This VI will by default only allow the user to select one URL, but I would like to be able to select a URL with subgroups and multiple tags.                                                                             

 

Anyone knows a workaround using this VI or another way to select multiple OPC tags?

 

 

0 Kudos
Message 1 of 19
(3,476 Views)

Hi, 

 

It looks like the following example could get you started:

 

https://forums.ni.com/t5/Example-Programs/Programmatically-Select-URL-and-Read-Multiple-DataSockets/...

 

Does this help?

Best,
Daniel Sjostrom
Applications Engineer | National Instruments
0 Kudos
Message 2 of 19
(3,429 Views)

Hi Daniel,

thanks for the reply, but it seems this example requires the user to select each tag one by one. What we would like to achieve is that the user can just select a path and then the program will be able to detect the tags in the path.

0 Kudos
Message 3 of 19
(3,425 Views)

Hi again Rasmus,

 

I see. I am not that well versed in this particular subject, but it looks like you might be interested in "Getting the OPC Server Tag List" in the following white paper: http://www.ni.com/example/31341/en/

 

An example built on this can be found on:

 

https://forums.ni.com/t5/LabVIEW/OPC-Can-I-read-in-a-list-of-all-available-tag-names/m-p/1455454#M55...

 

You would then dynamically iterate through the tag list as an input to DS open. 

 

Let me know if this helps!

 

 

Best,
Daniel Sjostrom
Applications Engineer | National Instruments
0 Kudos
Message 4 of 19
(3,415 Views)

Thanks Daniel,

 

It seems like it could be a solution, but it looks like it requires the DSC module to work. Then development license fee would be ok, but we have 50-100 distributions of our application, so the runtime license fee makes this a less attractive solution.

0 Kudos
Message 5 of 19
(3,411 Views)

Hi Rasmus,

 

Why do you think it requires the DSC module? I can run the VI (Get Tag List) with the DSC module deactivated.

Best,
Daniel Sjostrom
Applications Engineer | National Instruments
0 Kudos
Message 6 of 19
(3,407 Views)

Hi Daniel,

 

It says in the white paper:

Discovering and Selecting the Machine

The discovery and selection of a networked machine is accomplished using a VI named opc_BrowseMachine.  This VI is installed with the LabVIEW DSC Module and is therefore locked (password protected).  It is not on the functions palette and therefore could change without notice when upgrading LabVIEW.

When I run the example on my laptop (without DSC) it does not find the NI demo opc, but it does with the datasocket select URL.vi, see pictures.

 

Download All
0 Kudos
Message 7 of 19
(3,391 Views)

Hi Rasmus,

 

I see. I have not been able to come up with any clever way of doing it without the DSC module. Have you made any progress?

 

In the meanwhile, I have posted the issue internally, and hopefully, someone more experienced can help us out. Will keep you posted.

 

Best,
Daniel Sjostrom
Applications Engineer | National Instruments
0 Kudos
Message 8 of 19
(3,363 Views)

Hi Daniel,

 

Ok thanks, looking forward to hear if they have some input.

 

I have not been able to come up with a solution. I'm looking at 3rd party solutions, but haven't found one yet that will integrate easily in VUDAQ.

0 Kudos
Message 9 of 19
(3,358 Views)

Hi again Rasmus,

 

How is it going for you? I am afraid I have not heard back about any other solutions. It looks like the DSC module is required, at least according to the white paper. Note, however, that although I could run the Get Tag List VI, I did not see the NI demo OPC either. 

Best,
Daniel Sjostrom
Applications Engineer | National Instruments
0 Kudos
Message 10 of 19
(3,299 Views)