LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binding Shared Variable to Source

Dear all,
 
I'm currently working on a project that requires the use of shared variables. The shared variables will be network published and programmatically created using properties nodes. However I encounter one error and one problem in the process of doing so.
 
1) I programmatically bind the shared variable directly to the fieldpoint channel (data item) by writing the URL \\10.0.0.1\FP\1AIO\00 when i create the shared variable. The shared variable can be created successfully but when i deploy it, it generates an error which seems to tell me "it is out of range". Can anyone help me to rectify this problem?
 
2) The 2nd question will be, as my fieldpoint is connected to a DHCP server. At the start when i create the shared variable programmatically, i could bind the shared variable directly to the data item by writing the URL to its property. However, during the process of deployment, the dynamic IP address assigned to my fieldpoint may change . How can I ensure that the shared variable continue to bind to the right fieldpoint channels respectively? even though the IP address changes?
- Or is there any method that I could view all the network data items in a table? a list? or an array? so that I can link them to the URL.
I tried using the data socket URL.vi, I can only select the data item one by one.. this will be tedious for 100 or 200 I/O points..
 
 
Will greatly appreciate for any advice and help. Thanks in advance.
0 Kudos
Message 1 of 9
(7,232 Views)

HWJ:

In general you get an "out of range" error message when the input signals you are trying to read with your module are outside of the specified ranges of your channels. The supported ranges should be listed in the operating instructions of your FieldPoint module. Regarding trying to change the URL of your shared variables programmatically, you could use the LabVIEW DSC module to achieve this, as well as manage all your shared variables. I will also look at the possibility of implementing this without the use of the DSC module.

Regards,

Rudi N.

0 Kudos
Message 2 of 9
(7,207 Views)
Thanks very much for your help. As dynamic IP connection is our focus, so I really need to resolve this.
You can also advice me through using DSC. I have the DSC toolkit as well. Thanks very much
 
 
0 Kudos
Message 3 of 9
(7,190 Views)
Try this.
 
Give your fieldpoint controller a computer name through MAX.  Then instead of referencing it by 10.0.0.1 in the URL's of the shared variables reference it by computer name.  So  \\MyFPmachine\FP\1AIO\00 instead of  \\10.0.0.1\FP\1AIO\00.
 
Dynamic IP's can definitely cause headaches, and it would be best to use static IP's if possible, but doing this method should help.  It seemed to work for me.  I found when you browse for the channel in LV, it wants to give it the IP address by default, but it was possible to edit the string and paste in the computer name.

Message Edited by Ravens Fan on 01-10-2007 11:01 AM

0 Kudos
Message 4 of 9
(7,182 Views)

HWJ:

Ravens made a great suggestion. You could also Programmatically bind Shared Variables using the LabVIEW DSC module.I hope this helps and do not hesitate to post again if we can be of any help.

Regards,

Rudi N.

0 Kudos
Message 5 of 9
(7,152 Views)
I have tried putting in the "fieldpoint name" rather than ip in the network path, the library containing the shared variable could be deployed without errors. however, when i run the vi containing it, an error occurs "not connected to the server", any idea what causes this?
 
Back to using the ip address in the network path, if i key in manually, i will get an error. However, if i go through the procedure of browse and select the data item, it works perfectly. The reason why i do it manually is that i simulate it to be the same as when i insert the address during the creation of the shared variable programatically to ensure that it could work. Any reasons for this?
 
thanks for the suggestions so far.
0 Kudos
Message 6 of 9
(7,141 Views)
Try to ping the fieldpoint name from the command prompt so that you can be sure the computer name can be resolved to the network address.
0 Kudos
Message 7 of 9
(7,062 Views)
HWJ,

Are you still having problems with this?
Doug M
Applications Engineer
National Instruments
For those unfamiliar with NBC's The Office, my icon is NOT a picture of me 🙂
0 Kudos
Message 8 of 9
(7,049 Views)
Sorry for the late reply. Yes, I had cleared my problems with some technical support from NI (ASEAN) engineers. Thanks. 😃
0 Kudos
Message 9 of 9
(6,989 Views)