Sign in to follow this  
Followers 0
rooty09

date and time stamp in logix5000

8 posts in this topic

Hi Chaps I am working on a project which involves collecting and storing some data within a controllogix plc. I am looking for a way to date and time stamp the records. I have read in another post that i can use GSV and date time to retieve and store to an array of dints, but i am looking if possible to some how concatenate into the format DD/MM/YYY HH:MM:ss in one field so i can display onto an HMI. does anyone have any sugestions ?? thanks in advance kev

Share this post


Link to post
Share on other sites
Logix5000 has a variable type of LINT that you can select to be Time/Date format. This works on the standard clock format of 0 being 1-1-1970 00:00:00 and counting up from there. Not sure if your HMI would support this, but it might be worth a look at.

Share this post


Link to post
Share on other sites
You could just pull the alarm number from the PLC, store the alarm description in the HMI and pull the date/time from the HMI. The last piece of the pie is to chain the PLC date/time to the HMI. If it is a PanelViewPlus HMI, you can use a macro application with a global connection.

Share this post


Link to post
Share on other sites
You can declare a string variable for Formatted_Date and use some DTOS and Concat commands to build what your HMI Pulls.

Share this post


Link to post
Share on other sites
Thanks for the info Bob, I have created a string variable as you described above and concatenated values into it without any problems. Unfortunatly the HMI i am using (proface AGP 3600) does not read strings directly. To get it to display a string i have to load an array of Dints with either the ascii character codes or hex values for the text i wish to display, the system reads the array of character codes and displays them as ascii characters on the screen. Is it possible to retieve the Ascii Character code from a value ie Dec 9 = char(57) or 39h In VBA i would normally do this using an ASC instruction ie (asc(9) = 57), but i cannot find any such instruction within the logix 5000 software. thanks in adv kev

Share this post


Link to post
Share on other sites
Have you tried accessing MyString.Data[X] and moving it to the DINT Array. Something like COP MyString.Data[0] GOP_DINTArray[0] 32.

Share this post


Link to post
Share on other sites
Bob Did as you suggested and its now working fine Thanks for the help

Share this post


Link to post
Share on other sites
Glad to hear. You can also use MOV to load the datas of a string, but gotta also move the len parameter.

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
Sign in to follow this  
Followers 0