Ken Roach

Crimson 3 Timestamp String

10 posts in this topic

I'm posting this Red Lion Crimson 3 application here as a reminder and repository for sample code. This Forum seems to be a favored place to put sample code and sample applications. I think Red Lion should undertake a Forum of their own, especially because of the relatively steep learning curve for their C-like Program language, but for now this will have to do. I have an application where I am manually creating descriptive text strings for events that are being monitored by a Data Station Plus. I want to have a tidy String that contains the Year, Month, Day, Hour, Minute and Second to go into those descriptive strings. While this is easy to do with display objects because there is a Time and Date Primitive, this method works for making strings that will be used with the file I/O commands. This program is configured to execute "On Tick", so it runs every 1 second. The result is a text string in the format "02/01/2003 08:53:46" This was written for and tested on a Data Station Plus DSPSX000, using Crimson 3 version 579.003. Timestamp_String.zip

Share this post


Link to post
Share on other sites
Ken check out this function library. http://www.theautomationstore.com/red-lion-crimson-3-0-function-library/ It was originally provided by Red Lion in C2 format but I still use many of the programs in it today.

Share this post


Link to post
Share on other sites
Holy crow, that's terrific ! Is this on Red Lion's website someplace, or did you just have to ask for it ? While their Reference manual is *okay*, the Red Lion programming language has a pretty steep learning curve for your average controls programmer. If you have a background in C, obviously it's a lot easier because so much of the syntax is similar.

Share this post


Link to post
Share on other sites
Dan was helping me develop some of my first custom remote monitoring code back in 2009 and gave it to me then. It has been very useful over the years but I've never seen it posted anywhere else. The G3 is capable of so much, but that can turn into a limitation very quickly because of lack of sample code. I've started working on posting sample code of various projects I've done. One reason is I've finally hit the point where I can't remember every project I've done so I need a way to store samples for later use. I figured I would store it on the web where it may help others and they may decide to share some of their samples as well. For example this one is on interfacing a G310 with a Honeywell DC2500 which took me about 6 hours to workout. It was a bear to map out, mainly because of lack of documentation by Honeywell. http://www.theautomationstore.com/red-lion-g310-to-a-honeywell-dc2500-temperature-controller-sample-program/

Share this post


Link to post
Share on other sites
I concur with Ken about the separate forum for the Crimson stuff. Their Dataloggers and RTU's are becoming more prevalent in my line of work also. The forum has rescued me several times trying to figure out how-to. The Red Lion site, last time it looked, was mostly version 2 examples.

Share this post


Link to post
Share on other sites
Any hope of a separate forum for the Red Lion stuff?

Share this post


Link to post
Share on other sites
On 1/31/2015 at 7:13 AM, a062549 said:

Any hope of a separate forum for the Red Lion stuff?

Teaser! :)

Share this post


Link to post
Share on other sites

Bump again!!!

Share this post


Link to post
Share on other sites

I forgot completely about this thread until I revisited it today, 4 years later, when I was having trouble figuring out some serial port commands on a DataStation Plus.

 

Neat !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now