02-03-2010 04:48 PM
Labview 2009/DSC
I’m having a hard time to create a bound variable to a AB ControlLogix string tag. I’m able to create a variable of a single character but this means I have to have 82 variables per string.Is there a better way to do this. I want to "Data Bind" the tag to a string control to have read and write access.
Thanks
02-04-2010 01:07 PM
JuergenO,
Hello! First of all, the document on our website, Connect LabVIEW to Any PLC Using OPC, is a great resource for applications like yours. If you haven't seen it before I reccomend taking a look at it.
The bound variable that you are creating. What data type is it? Is it a string data type?
02-04-2010 03:11 PM
Hi Ben,
Thanks for responding.
I don't have a problem with the opc server or connecting to the plc. The problem is the Controllogix String data type. The data type is a assembly of String.LEN = Datata type Int32 and String.Data = array of 82 Int8 (String.Data[0] - String.Data[82].
I can create a bound variable by selecting e.g. String.Data[0] which is the first char of my string. But i can't select String.Data and receive a variable with the complete string.
My bound variable is a string data type.
Is there a way to create a bound variable from String.Data?
Thanks
02-05-2010 01:40 PM
JuergenO,
Have you tried to make your Variable have the data type of an Array of Int8? You could then take the whole String.Data into LabVIEW.
02-08-2010 01:27 PM
Is there anything I have to do different for UDT's and array's?
Thanks Juergen
02-09-2010 10:39 AM
JuergenO,
To make a bound variable to a 2D array of strings you'll have to follow the steps in this document:
How Do I Make a 2D Shared Variable?
As far as the UDT's go, it is my understanding that they are for readability purposes and are still a "real" (string, bool, I32, etc) datatype. As long as you know the underlying datatype, I would think you could still talk to it. However, it seems you're saying that a simple UDT (that is really a string, and not 2D) isn't working, but that same string not in a UDT does work. Is this Correct?