FT decimal places when using globals or parameter files

sflemon

Member
Join Date
Feb 2014
Location
The South
Posts
1
Let's say I have a FT global object that is an analog indicator. It has a simulation-enable button, simulation value entry, and normal PV indication when not in simulation.

I can lay down a ton of these globals and just define the changing part of the tag each time I lay down an instance: {[#1]#2#3} where #1 is my PLC name, #2 is a tag and #3 is that tag's suffix.

This is nice, but let's assume you can't just have ALL indicators showing 1 decimal place or 2 decimal places. You have instruments with 0, 1, 2, and 3 decimal places. And there are dozens of each.

I understand I can just have a global for each number of decimal places and pick the right one for the right instrument.

But, it would be nice to have a global object parameter value as you lay down instances where you define the decimal places.

Like for a text field you have: /*N:5 {[#1}#2#3} NOFILL DP:1*/

I tried replacing DP:1 with "#5", but it just treats it as text.

I can't figure out how to do this. It appears this is a shortfall of FT.

Anybody get around this?
 
Hi
I am not experienced in FT but as a work around you could add 3 or 4 displays and hide the ones you don't need based on a tag of the analog udt

Tag_DP=0/1/2/3
 
I tried replacing DP:1 with "#5", but it just treats it as text.

That is what is supposed to happen. It is a placeholder and will be replaced by what you tell it. It's not indirect addressing. One solution is to make HMI tags like 0, 1, 2, and have the values be 0, 1, 2. This will work, not sure it will save anytime though.

James
 
I thought I had discovered a workaround wherein I used the following in a global object Text object:

/*N:#3 {[PLC]#1.PV.EU_Min} NOFILL DP:#4*/

I then used the global object on a display, entered 4 for the Number of digits parameter (#3 above) and 1 for the decimal places (#4 above) and it worked when I tested the display. However, when I created the runtime application I received an error about not finding the parameters #3 and #4 in the parameter file, even though I am not using a parameter file.
 
Let's say I have a FT global object that is an analog indicator. It has a simulation-enable button, simulation value entry, and normal PV indication when not in simulation.

I can lay down a ton of these globals and just define the changing part of the tag each time I lay down an instance: {[#1]#2#3} where #1 is my PLC name, #2 is a tag and #3 is that tag's suffix.

This is nice, but let's assume you can't just have ALL indicators showing 1 decimal place or 2 decimal places. You have instruments with 0, 1, 2, and 3 decimal places. And there are dozens of each.

I understand I can just have a global for each number of decimal places and pick the right one for the right instrument.

But, it would be nice to have a global object parameter value as you lay down instances where you define the decimal places.

Like for a text field you have: /*N:5 {[#1}#2#3} NOFILL DP:1*/

I tried replacing DP:1 with "#5", but it just treats it as text.

I can't figure out how to do this. It appears this is a shortfall of FT.

Anybody get around this?

Check out the PlantPAX Analog In Popups, I believe they convert to string in the PLC, and then control the decimal points there?

I maybe wrong, often is the case.
 
Yes, I had in the back of my mind converting the value to a string in the PLC but that seems like an extra step I do not want to be forced to take.

I've attached a document summarizing the issue. My confusion is why it works when performing a Test Display but not with the runtime application.
 
either you are not calling the file when the screen opens or the file your using does not contain the parameter # 3 or 4. if that is a test .mer and you're using the startup screen you must select the parameter to use at startup in the start folder. If it's not the main start screen then you must select the file with the GOTO button.
 

Similar Topics

In S7/TIA Portal, is there a function to round a real to a specified number of decimal places? e.g. If I have 22.519432 and I want to round it to...
Replies
16
Views
1,888
Hello, I have googled my question without much luck. I am using the FGEN instruction and trying to find out how to control the number of decimal...
Replies
15
Views
5,570
Hello everyone, I have met the following issue in a project: there is an I/O field where you can set parameter "number of decimal places" for an...
Replies
0
Views
1,176
I am displaying inch position values in numerous places on a Kadet G307K2. The display format is three decimal places, i.e. 00.000. I need to...
Replies
3
Views
2,210
Hi there, Does anyone know how to limit the # of decimal places of all floating integers displayed on the HMI? I want to display one decimal...
Replies
4
Views
7,465
Back
Top Bottom