Panelveiw 5000 Expression

eight_bools

Lifetime Supporting Member
Join Date
Apr 2019
Location
Oklahoma
Posts
71
Good Morning,

I've been working on an HMI using the Panel View 5000 series. I admittedly was not very good at Factory Talk View Studio, but I find view designer to be just different enough to struggle with most common items.

I am trying to concatenate two DINTs with a semi colon in the middle. I can get this to work, but I need to always display two digits, which is where I am having trouble.


Format should be mm:ss, but I am getting mm:ss, mm:s, m:s, m:ss depending on the value of my tags.

This would work in Factory Talk View Studio, but does not work in View Designer:
/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Minutes} ZEROFILL DP:0*/:/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Seconds} ZEROFILL DP:0*/

This is the expression I am currently using in view designer:
:: Dryex.Line_1[2].Zone_Control.Remaining_Minutes +":"+:: Dryex.Line_1[2].Zone_Control.Remaining_Seconds

Anyone have any thoughs? If we hadnt already purchased the PanelView 5000 I would go back to a PanelView Plus 7.

Thanks
 
Good Morning,

I've been working on an HMI using the Panel View 5000 series. I admittedly was not very good at Factory Talk View Studio, but I find view designer to be just different enough to struggle with most common items.

I am trying to concatenate two DINTs with a semi colon in the middle. I can get this to work, but I need to always display two digits, which is where I am having trouble.


Format should be mm:ss, but I am getting mm:ss, mm:s, m:s, m:ss depending on the value of my tags.

This would work in Factory Talk View Studio, but does not work in View Designer:
/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Minutes} ZEROFILL DP:0*/:/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Seconds} ZEROFILL DP:0*/

This is the expression I am currently using in view designer:
:: Dryex.Line_1[2].Zone_Control.Remaining_Minutes +":"+:: Dryex.Line_1[2].Zone_Control.Remaining_Seconds

Anyone have any thoughs? If we hadnt already purchased the PanelView 5000 I would go back to a PanelView Plus 7.

Thanks



  • Add one hundred to both numbers and convert the +100 values to strings
  • concatenate the the two strings to make a string six characters long.
  • truncate the first character to get a string five characters long
  • change the third character to a (semi-?)colon
 
  • Add one hundred to both numbers and convert the +100 values to strings
  • concatenate the the two strings to make a string six characters long.
  • truncate the first character to get a string five characters long
  • change the third character to a (semi-?)colon

Do you have an example of how to write this in the expression editor? I can't seem to figure out what language it is using and keep getting syntax errors.
 
Do you have an example of how to write this in the expression editor? I can't seem to figure out what language it is using and keep getting syntax errors.


No.

How about

:: Dryex.Line_1[2].Zone_Control.Remaining_Minutes + (Dryex.Line_1[2].Zone_Control.Remaining_Seconds * 0.01)



And then display it with 2 decimal digits, five "Number of digits" (the decimal point counts for 1(, and "Fill left with" zero? That would display mm.ss with a period, instead of a colon, between the values.

The other option might be three display widgets: one for a two-digit, zero-left-filled mm; one for a colon :)); one for a two-digit, zero-left-filled ss.
 
I have never used View Designer, but doesn't it have an option in the integer display to have 'fill zero'?
 
Good Morning,

I've been working on an HMI using the Panel View 5000 series. I admittedly was not very good at Factory Talk View Studio, but I find view designer to be just different enough to struggle with most common items.

I am trying to concatenate two DINTs with a semi colon in the middle. I can get this to work, but I need to always display two digits, which is where I am having trouble.


Format should be mm:ss, but I am getting mm:ss, mm:s, m:s, m:ss depending on the value of my tags.

This would work in Factory Talk View Studio, but does not work in View Designer:
/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Minutes} ZEROFILL DP:0*/:/*N:2 {::[PLC]Dryex.Line_1[2].Zone_Control.Remaining_Seconds} ZEROFILL DP:0*/

This is the expression I am currently using in view designer:
:: Dryex.Line_1[2].Zone_Control.Remaining_Minutes +":"+:: Dryex.Line_1[2].Zone_Control.Remaining_Seconds

Anyone have any thoughs? If we hadnt already purchased the PanelView 5000 I would go back to a PanelView Plus 7.

Thanks



Honestly I had big issues starting with View5000 To make a "run time clock" look any good as HH : MM : SS. But using a TextDisplay Is the easiest way to Concate number values in to one display. But i the end I just made a Clock Template using 7 Display Boxes and made it look good and saved it as a Group. I even had to add a 0 that is shown before seconds and minutes that is visible only when the second or minute timer is below 10 just to achieve the 1 : 05 :02 visual. otherwise I would only make it look like 1 : 5 : 2
 
Do you have an example of how to write this in the expression editor? I can't seem to figure out what language it is using and keep getting syntax errors.

Using a TextDisplay you can concate values using TAG+" : "+TAG

Below is written as

"#"+::pLC.HMI.Recipe.Active.RecipeNo+" "+::pLC.HMI.Recipe.Active.RecipeName

and shown as

#3 RecipeName
 
Chiming in a few weeks later on this to commend our friend CNLG for pointing to the concatenation of values with literal strings in an expression editor (and illustrating how emojis have no place in technical forums !).

That's how the Technote for setting the PanelView 5000's TimeConfig or DateConfig strings does it. When you're in an expression editor you can freely mix a DINT value with strings, and the DINT will become a string of the implied length.

Sign In

Code:
This generates a String in the format "MM/DD/YYYY".  
The <10 comparisons are to add a leading zero when the Month or Day is one digit.
A System Event writes this to ::Local:HMI_Device.DateTime.DateConfig

IIF(::MyCMX.LocalDateTimeArray[1]< 10, "0" + ::MyCMX.LocalDateTimeArray[1],::MyCMX.LocalDateTimeArray[1])
+ "/" +
IIF(::MyCMX.LocalDateTimeArray[2]< 10, "0" + ::MyCMX.LocalDateTimeArray[2],::MyCMX.LocalDateTimeArray[1])
+ "/" +
::MyCMX.LocalDateTimeArray[0]

This may not be perfect for the original question but I think it's worth putting some exposition onto the forum.

Now if only I had a way to add comment text to the Expression Editor in Studio 5000 View Designer.
 
Last edited:

Similar Topics

Iam removing a Panelview600 as it is no longer supported and replacing it with a Red Lion G306A panel the PLC is a SLC500, after much research I...
Replies
4
Views
2,465
Iam adding recipes to a existing program, and when I go to down olad the updated program I get an error saying " Invalid Length, Bit array cannot...
Replies
2
Views
1,428
Read many post on printing the screens and alarms on a Panelview Plus, but is there a way (or macro) to print a file located on the CF card when a...
Replies
0
Views
1,544
I was asked to modify a SLC500 program with the associated PV1000. I hooked up to the PV1000 485 port and could see the SLC using a 1747_UIC but...
Replies
1
Views
1,208
The options for selecting a key are F1 - F20 and K1 - K20 F1 - F10 are obvious, can anyone tell me how the others map to the remaining keys on the...
Replies
1
Views
1,519
Back
Top Bottom