CompactLogix L32E and a ProFace hmi

jtashaffer

Member
Join Date
Aug 2009
Location
KY
Posts
415
I have a compactlogix l32e and a proface HMI GP-4301TM. I have setup a alarm screen. It displays the date, time, message etc. The focus is on the date and time. In the logix I am getting the date and time using the GSV instruction. I have it setup as a 7 dint array.Year,month, day, hours, minutes, seconds and milliseconds. I have the hmi program to sync with the plc time. I have set the time in the offline menu in the hmi also. I have setup the plc time in the processor. When I get a alarm it shows military time and I want it to show regular time. Any ideas
 
I assume that by "military time" you mean 24 hour time? As far as I'm aware, there's no way to get 12 hour time out of the PLC using a GSV.

The only thing that comes to mind would be a line of code after your GSV that says something like "if [hours] is greater than 12, turn on a "pm" BOOL, MOD your hours tag by 12 and store it back in the same place"

The MOD instruction stores the remainder of a division calculation. So if the hour was 14, the code would evaluate it and say "hour is greater than 12, so turn on my "pm" BOOL". Then it would divide 14 by 12, come up with a remainder of 2, and store it back in the "hours" tag. So your date/time array now has a "2" in the hours member and a "pm" bool turned on.

However, this all assumes that you are getting the HMI time from your date/time array in the PLC, not synchronising it directly to the PLC's internal clock. If you're doing the latter, you'd presumably have to be looking at the setup in your HMI, which is something I don't know enough about to offer useful advice :)
 
Last edited:
I will try that in my program. Does anyone have any idea on the proface HMI? Or any other info on the GSV instruction
 
I have my array setup with the attribute as date-time. If I change it to localdatetime. Will that change it from 24 hour time?
 
No. The time is ALWAYS in 24 hour time, the only difference between datetime and localdatetime is whether it returns GMT time or the time in your timezone.
 
Again, is your HMI reading the clock directly from your PLC's internal clock, or is the HMI getting it's time from the array you've stored the date and time in after executing the GSV?
 
I have the HMI setup to grab the time. By doing the array in the program I thought that is where it would get the time. So I need to delete my array and see if the time responds to the processor time I set?
 
Unless you're pointing the HMI to the array directly, the HMI will just be getting the time straight from the PLC. In that case, it will be 24 hour time.
 

Similar Topics

Hello . Info: Panelview plus 400 2711P-K4M20D Compactlogix 1769-l32E i make a program in RSlogix 5000 and Factorytalk view for...
Replies
9
Views
1,804
Hello again. I need to flash a CompactLogix L32E from firmware ver15 to 16. It has several Panelview Plus's Series D Rev A, connected via...
Replies
16
Views
2,792
Hello. I am trying to establish communication between CompactLogix 1769-L32E and CompactLogix 1768-L43 using serial port but with DeviceNet (and...
Replies
6
Views
2,759
Respected sir/madam I have CompactLogix L32E And I want to data log into logic . is any module or card require to it. request you guid me and if...
Replies
4
Views
1,391
A new member of our Forum community, maheshbhaiya, posted this as PMs and a resurrected thread, so I'm going to give it a push in the right...
Replies
1
Views
2,090
Back
Top Bottom