Forgive my ignorance but what publishes the 'All' item from the fieldpoint module? Is this an embedded vi that needs to run on the FP, or some app that runs on the pc to publish the data, or can it be setup with some sort of configuration? I've been trying to access it with this particular URL - ' dstp://localhost/National Instruments.OPCFieldPoint/reactor_1\thermocouples\All'.
Yes, I'm still having problems. First the address mentioned only works if I have a datasocket server running (which I expected). But the URL is not published when the FP is connected to the datasocket. My application then becomes the one that publishes the address. In other words the address is created when I connect, not when the FP is connected. You mentioned the FP server publishes the OPC data, should I be connecting to the OPC protocol with something like this - 'opc://localhost/National Instruments.OPCFieldPoint/reactor_1\thermocouples\All'? If so this does not work it just returns the same value that MAX displays - a single float value that corresponds to the first TC value, not an array of floats for each of the TC values.
Communication is working fine between the PC and FP, MAX is able to read and write values, my app can read various OPC variables and and RT app that I have running down on the FP that publishes its own variables is reading and writing those variables.
I get a 'Specified cast is not valid' exception. I've modified the reader sample applications DataSocketUpdated event handler to be:
System.Diagnostics.Debug.WriteLine("e.Data.Value type is " + e.Data.Value.GetType().Name);
vals = (double)e.Data.Value;
System.Diagnostics.Debug.WriteLine("Size of array is " + vals.Length.ToString());
catch (Exception ex)
I was hoping to get the following output:
e.Data.Value type is double
Size of array is 8
But instead I get
e.Data.Value type is Single
Specified cast is not valid.
I'm using this URL -
Is there someone I can contact directly to figure this out?