Crimson 3.0 - Stopwatch

Cano

Member
Join Date
Feb 2013
Location
Mexico
Posts
13
Hello!
I am making a stopwatch using this software(Crimson 3.0),
but I didn't found functions in the list for use.
Anyone know how I could do it? and ...
How I can enable the active functions?

I am working with PTV (Red L), a touch screen G304K (Red L), and a PLC 1200 (Allen B).
 
Hello!
I am making a stopwatch using this software(Crimson 3.0),
but I didn't found functions in the list for use.
Anyone know how I could do it? and ...
How I can enable the active functions?

I am working with PTV (Red L), a touch screen G304K (Red L), and a PLC 1200 (Allen B).

I recommend that you don't use the Display or PTV for the timing of the stop watch. The time in the PLC is probably more accurate.

I don't have an example stop watch function - I've never needed a stopwatch, but someone may be able to help you.

However, you should be able to program one pretty quickly.

If you don't need accuracy or resolution less than 1 second, you can do it with Crimson 3.0. It *could* consist of calling a function and incrementing a tag every update period

For example, call a function every second (use the On Tick event of the display page or the display itself) and increment an Elapsed Time Tag by one if a Run Enable Tag is True. The same function can be used to reset the Elapsed Time Tag when a Reset Enable Tag is True.

Again, I would do it in the PLC, but if you just want the Crimson 3.0 programming experience, go for it.
 
I'm in the middle of a computer upgrade and I haven't yet reinstalled Crimson yet (posting while other stuff installs) so I'm doing this from memory and I might not be remembering the function names - you can verify them in the Crimson reference manual.

Use a start button and I think the Now() (or maybe Time()) function to store the current time in a numeric tag StopWatchStartTime. Use a Lap button to subtract the current time Now() from the value stored when you pressed the start button and put that in another tag StopWatchLapTime. Format StopWatchLapTime tag as a time tag. Place a data display primitive on the screen, tie it to the StopWatchLapTime and use the tag defaults. To see a running stop watch create a third tag StopWatchRunningTime, format it as time, and make its source be the expression Now()-StopWatchStartTime. Place a data primitve on your screen tied to StopWatchRunningTime.

That should work, but I haven't tested it.
 
Last edited:
I'm in the middle of a computer upgrade and I haven't yet reinstalled Crimson yet (posting while other stuff installs) so I'm doing this from memory and I might not be remembering the function names - you can verify them in the Crimson reference manual.

Use a start button and I think the Now() (or maybe Time()) function to store the current time in a numeric tag StopWatchStartTime. Use a Lap button to subtract the current time Now() from the value stored when you pressed the start button and put that in another tag StopWatchLapTime. Format StopWatchLapTime tag as a time tag. Place a data display primitive on the screen, tie it to the StopWatchLapTime and use the tag defaults. To see a running stop watch create a third tag StopWatchRunningTime, format it as time, and make its source be the expression Now()-StopWatchStartTime. Place a data primitve on your screen tied to StopWatchRunningTime.

That should work, but I haven't tested it.

Your solution works very well as long as he doesn't want to start, stop and restart the stopwatch. I was thinking he might want to be able to do that, but he didn't say so.

Since he didn't say so, I was overly complicating it.

Good solution!
 
He could do a start/stop/restart by having the restart button make StartWatchStartTime = Now() - StopWatchStopTime.

This stop watch isn't going to be suitable for tenth of a second timing, but if you want something good to within a second or so its probably fine.
 
Thanks for yours comments... that's that I needed.
I had a program made, but I could not do
to run on automatic, it had a conditional with
button on the screen, and now with your advice already running
as expected.


As you mention, I need to have control over the Stop Watch,
This is what I try to do:

1.-When the machine stop automatically initiate a Stop Watch.

2.-Having the option to move the time (Stop Watch) to an
accumulator (1 of 3).
Each acumulator represent a condition for example:
-Fail.
-Set-Up
-Programming

3.-Then, when restarts the machine, the Stop Watch is back to zero,
but, the accumulator was selected, keep the time.

The idea is to keep track of the time when the machine is stopped.

I was thinking use a program with "Cases"
to manipulate information.
 

Similar Topics

Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the...
Replies
1
Views
75
How do you install update on Red Lion Crimson ver 3.1. Do I just need to run the exe file on the host server?
Replies
1
Views
97
Has anyone found a way to convert/replace/update the firmware on old Parker TS80xx series HMIs (i.e. TS8010, TS8006, etc) to accept Crimson...
Replies
0
Views
86
Has anyone setup communications with Red Lion 3.0 MODBUS to Baker Hughes Centrilift GCS VFD? Thanks
Replies
0
Views
81
Hi, I have a complex database in Crimson 3.0 and in one of the display pages I am trying to get a tag to show the sum of several other tags. The...
Replies
3
Views
150
Back
Top Bottom