Display Elapsed Time on Red Lion G315

P90 Toter

Member
Join Date
Dec 2012
Location
Washington
Posts
10
I have not been able to get the elapsed time from a timer in a Siemens Simatic S7-1200 to display correctly on a Red Lion G315 HMI. I have searched this forum and have seen some related posts but not quite the same problem as what I am having. The elapsed time is is stored in a DWord I believe as data type Time. It gets to the HMI ok but I cannot seem to get it to display correctly. I am looking for it to display either the whole time value as Minutes:Seconds:Milliseconds or just Minutes:Seconds will work just as well. It is a ten minute timer so I don't need hours unless that is the only way to get it to display correctly. I have a feeling this has been explained before but I cannot find it. I noticed that my crimson software is a little outdated by a few releases so I am already updating it. Any help is appreciated and please keep it as simple as possible.
 
Ok I must have done something incorrectly. This post has been here for over two weeks and not a single reply.So I guess I need help on posting as well as the programming issue. There must be someone who can solve my issue. If my post has already been solved please give me a link to it.
 
Never worked with a Red Lion display before...

The control which you're trying to display the elapsed time in on the HMI, what data types does it accept? Maybe you need to convert the data from the "Time" data type into a DWORD first and do a Masked Display on the HMI to inject the ":" character? Just adding some food for thought, ultimately just try converting the datatype.

EDIT: Also what does "can't seem to get it to display correctly" mean? What is it doing/not doing that it should/shouldn't? Screen Shots always help :)
 
Last edited:
Thank You for the response timryder.

Also what does "can't seem to get it to display correctly" mean? What is it doing/not doing that it should/shouldn't? Screen Shots always help :)

From the PLC (Seimens Simatic S7-1200, CPU 1214C) the "Elapsed Time" from a timer is stored as a DWord and data type is "Time" It will display the digits but it looks like only the milliseconds and seconds! I do not see how to correct it with the normal formatting choices that crimson offers. This seems to me to be simple and straightforward but it apparently is not. It is like the Red Lion programmers felt nobody would ever need to display the time from a plc timer block.
 
How about the PLC sets a variable/flag and then you use the program I posted to set off a second timer in the HMI? So really you have two timers going simultaneously.
 
I have no experience with Siemens PLC's but have done a lot of Crimson projects mostly with Allen Bradley.

First thing first, what driver in Crimson are you using to connect to the S7-1200?
 
Ok, I will have to trust you that is the correct driver because I have no idea 🍻

When I set up Crimson with the same driver and then create a Numeric Tag I get the attached choices. Wouldn't the Timer Value be what you are looking for?

S7 Red Lion.PNG
 
Ok, I will have to trust you that is the correct driver because I have no idea 🍻

When I set up Crimson with the same driver and then create a Numeric Tag I get the attached choices. Wouldn't the Timer Value be what you are looking for?

Good idea but it does not want to work. Siemens in all their European glory and for reasons known only to them do not have "timers" like most other systems. What they call a timer is really a data block. It appears to be an array of 7 data types. 3 being time and 3 bool where the first one deos not give a type it just says Static. They make up the specific points of the timer. I tried to access the ET or number 4 in the array and while Crimson allowed this it did not show any data. I got it to work somewhat by making a numeric tag with the Dword that stores the ET and it does time out but the time format is all milliseconds "600000" for ten miutes. I have no clue as to why it will not display like the PLC does.

Timer DB LAD.jpg DB Array Timer.jpg
 
The reason why it wont display like the PLC is most likely due to the "TIME" data format being made up of other data formats. Kind of like a User Defined Data Type. The PLC has internal code that knows how to break out the ms into hours, minutes, seconds and milliseconds.

In Allen Bradley Compact/Control Logix PLC's we only have ms as our timer units. So if we need to display the ET it will only be in ms natively. If we need to display other units on a HMI then we have to do some math to the ET before displaying it.

Looks like in Seimens you will have to do the same thing.
 
What really helps is having all the hardware by the same manufacturer. I did some AB programming a couple years ago including what I think was a 10 inch Panelview. It was all pretty much cut and dry if I remember correctly. It went fairly smoothly after a short learning process to get around in the different software programs. The Red Lion HMI's are very powerful devices imho, you can really do some sophisticated things with it. They did an excellent job designing it and the software. It will do practically anything a person could want with nearly any manufacturers hardware. The problem is the manual is lacking the in depth instructions and examples a person needs to take full advantage of it's capabilities. There is just enough there to call it a manual. It is always my luck, it seems, to stumble across something (like this timer issue)that is not covered very well. I think I will take a look at the timer by JefferyS and use a bit to trigger it. Seems a little simpler to do. There does not seem to be much interest in helping me with this issue in this forum. Thank you Bullzi for your input, it is much appreciated.
 
I have always had good luck with RL tech support, however, it does see likely that the time is in ms only and you need to convert it to the units you desire by division. That will make it easy to get the ":" in there three seperate numbers one is minutes, one will be seconds, one be ms. When you display the numbers just have a static ":" in between each number display. If you want the ":" to only show when there is a number before and after it with a little bit of code in your RL project.
 
Thank you for your reply dlweber. Unfortunately I do not get to do programming as often as I used to do. I wrote this particular program about 6 years ago and now there is equipment being added to it so I am back at it. Although I have done some coding within Crimson it has been at least five years since I did that particular project so I am struggling to remember how I did some of the special things that the HMI can do. That is the real problem. If I could just get some help on exactly what to do I could be done with it and have some hair left on my head. ;)
 
I got it to work somewhat by making a numeric tag with the Dword that stores the ET and it does time out but the time format is all milliseconds "600000" for ten miutes. I have no clue as to why it will not display like the PLC does.

If it is showing milliseconds, then do you just want to convert/show that into minutes and seconds? Bulzi's post gave me an idea:

Create a new Numeric tag called ETime; leave your DwordTag alone.
For the ETime data source, use the following for the complex source:
Code:
return DwordTag/1000;

On the format tab, make sure the format is "Date and Time".
There should be a format mode, choose "Elapsed Time".
 

Similar Topics

Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
130
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
176
Is there a way to add a local message display to Studio 5000 View Designer? If its there, I’m not finding it. I have used them in older versions...
Replies
11
Views
410
Hello, I am new to Codesys, and am trying to learn about it for a project we're developing. I've got a couple questions, but first a little...
Replies
1
Views
152
Hello, I am learning to create shapes and VB Scripts in HMIWeb Display Builder. I wanted to change color of my rounded rectangle by script. I...
Replies
0
Views
110
Back
Top Bottom