Tag type in Intouch Wonderware

matroskin

Member
Join Date
May 2018
Location
Ufa
Posts
2
How can I find out tag type in Intouch?
For example, I'm using indirect analog to connect to some tag.

ind_analog.name = "some_tag";
ind_analog = 1.2;

If the some_tag is an integer type, then the program falls into error.
Is there a way to determine the type of some_tag variable?
 
How can I find out tag type in Intouch?
For example, I'm using indirect analog to connect to some tag.

ind_analog.name = "some_tag";
ind_analog = 1.2;

If the some_tag is an integer type, then the program falls into error.
Is there a way to determine the type of some_tag variable?

Yes. It's called the "Tagname Dictionary". You'll find it under the "Special" tab on the file menu bar. You could also simply double click the tag in order to open the Tagname Dictionary.
 
he means is there a way to determine data type in the sript itself sing some function or property variable etc
 
Will Tag Viewer fit your needs?

What version of Intouch? You could use the Tag Viewer application to view tags from runtime. I have been adding that function to many of our applications for maintenance/troubleshooting functions.
 
he means is there a way to determine data type in the sript itself sing some function or property variable etc

Okay. I'm trying to imagine why I'd want a script that I had written to determine the data type of a tag that I had referenced when I wrote the script.

Thus far, I'm drawing a blank. I'd like to know how such a runtime capability could be useful.
 
he means is there a way to determine data type in the sript itself sing some function or property variable etc

BTW: It is possible to parse all of the dot fields associated with a particular tag within a script. I'm just drawing a blank when it comes to an actual application for this capability in runtime. I'd like to know more about what the OP is trying to accomplish.
 
How can I find out tag type in Intouch?
For example, I'm using indirect analog to connect to some tag.

ind_analog.name = "some_tag";
ind_analog = 1.2;

If the some_tag is an integer type, then the program falls into error.
Is there a way to determine the type of some_tag variable?


in addition to what everyone else has said it probably fails because based on that script your tag would need to be a real because your number has a decimal point.
 
How can I find out tag type in Intouch?
For example, I'm using indirect analog to connect to some tag.

ind_analog.name = "some_tag";
ind_analog = 1.2;

If the some_tag is an integer type, then the program falls into error.
Is there a way to determine the type of some_tag variable?

An IndirectAnalog tag should work with either an Integer or Real data type.


Correct, but you cannot write a value of 1.2 to an integer. would need to be real.

his script would work with an integer tag if it was like this:

ind_analog.name = "some_tag";
ind_analog = 1;
 
Correct, but you cannot write a value of 1.2 to an integer. would need to be real.

his script would work with an integer tag if it was like this:

ind_analog.name = "some_tag";
ind_analog = 1;


We are assuming that "ind_analog" has actually been defined as an IndirectAnalog tag. If not, then nothing will work. If it actually is an IndirectAnalog tag, then there should be no attempt made to directly set it's value in a script. That's not what Indirect tags are for.

The first line makes sense, if one is assigning ind_analog to mimic some_tag, which could be either an Integer or a Real data type. Then, a script (or IO) could set the value of some_tag, and that value would be reflected by ind_analog until such time as ind_analog was assigned to mimic another Integer or Real tag.
 

Similar Topics

Hello All. I've been testing an application on both a PanelView and within FactoryTalk on my virtual machine. Testing was going fine until today...
Replies
4
Views
749
This feels like a simple, elementary question, but I am a Siemens novice and know there are experts here. My S7-1500 project (TIA Portal v17) has...
Replies
10
Views
2,666
RE: FactoryTalk View Tag Browser Datatype - UNRECOGNIZED Hi All I have a new install of FactoryTalk View SE 12 with the May 2022 patch rollup...
Replies
6
Views
3,242
Anybody know if there is a registry entry that can be changed/added for Logix/Studio 5000 that will change the default data type for an analog...
Replies
14
Views
6,306
Hello, It is possible to change form INT to UINT a variable data type? For the moment, I receive the value -32766 (Local:6:I.Ch0Data) from...
Replies
1
Views
2,508
Back
Top Bottom