I have the following expression.
[MySql_Connection]
(“sensor”+SensorValue)
/reading
SensorValue is a parameter I am trying to combine with “sensor” so that as the SensorValue Changes, “sensor” becomes "sensor1, sensor2, etc…).
What the hell am I doing wrong. I have tried every type of syntax I can think of.
Did not work. This Tag Path is going into an easy chart for one of the pens. I thought the below would work but it does not.
“[MySql_Connection]sensor” + {Root Container.SensorValue} + “/reading”
If i use “[MySql_Connection]sensor1/reading” then sensor1 comes in fine. The SSensorValue I am referencing shows up in the root container properties and is being used on the same screen for other tags, so I believe that is correct. I am pretty sure I have a syntax issue, but i have spent days trying to fix it.
Sorry, but you lost me with your directions.
This is what I have.
on the easy chart customizer, I have a pen in the “Tag History Pens” whose Name is “Reading”.
The exact Tag path text is [MySql_Connection]{“sensor” + SensorValue}/reading
SensorValue is a custom Property that changes depending on which popup I select to get to the easy chart screen.
When I use the below tag it does work.
[MySql_Connection]sensor1/reading
I need to replace the “1” with the SensorValue value, which is an integer.
And how exatcly is your custom property text being sent to your Tag Path property on the Easy Chart? You’re using a cell update binding or are you doing something like this?
I might be wrong, but i don’t think you can use expressions there, can you try the following:
Create another custom property, let’s call it “myTagPath” and set it as a string type.
Make an expression binding at myTagPath with the expression @Paul.Scott provided but make sure to substitute “(SensorValue)” with the correct path to this value, you’ll know you’re on the right path if the value on the string result after you click OK matches "[MySql_Connection]sensor1/reading”
At the EasyChart’s properties under Chart Configuration create a cell update binding for the Tag Pens dataset that modifies the TAG_PATH column with myTagPath’s value
Should look something like this:
I created a custom property and I have it showing the correct text for the tag, but I cannot find the “Chart configuration” in the properties of the easy chart. I would think the property would go into the “edit Pen” window.
Thank all of your guys very much. I finally got it. Leonardo pointed me to the Dataset, and that is what I needed. It seems like way too much work just to make a damn tag work properly.
Well, that's on me, after reading carefully the post @JordanCClark cited, the whole process can be simplified by deleting the custom property and writing the expression directly at the "value" field on the Cell Update Binding like this:
Note that this time you wont have to use " since the field will already convert to a string and concatenate after solving your property reference, so by giving it the correct adress for your sensor value it'll look something like this:
I am in need of one more piece of assistance.
I got the one pen working with this:
[default]sensor1/reading
I have two pens that are supposed to read the alarm setpoints. I have this:
[default]sensor1/Reading/Alarms/High Alarm.SetpointA
[default]sensor1/Reading/Alarms/Low Alarm.SetpointA
Those look like adresses to point directly to the alarm’s setpoint, being “Alarms” the name of your tag and High Alarm and Low Alarm the names of two different alarms configured there, is that correct?
If so, maybe it doesn’t work because they’re not historical and in that case you can add two calculated pens with the Constant function using the easy chart customizer and then the process will be the same as with your tag history pens, but this time your dataset will be called “Calculated Pens” and the column you need to modify is called “FUNCTION_PARAM” and instead of a properety or an expression, you use the same tag path you provided above.