RSLogix5000 Hour time logic

dbanks

Member
Join Date
Nov 2017
Location
Tucson
Posts
9
I've got a program I'm working on, and one I'm referencing.
I've got some PLC that has a bunch of data and registers that help an HMI display data over time. BUT, i'm trying to feed a day long accumulator into an hour to hour 24 tag array.
In the referenced program it's something along the lines of "totalprtshrcnt[date.hour]. I can't find at any point that the date.time is defined. Not even in the GSV that's on there It looks like whoever put this together made their own data type called "DateTime_Type" and then from there it's broken down into datetime.year, datetime.month, etc. Again, I don't see where it's defined.

How do I replicate this in the other program? It's been done with a GSV but it's into an array that is phrased as such Datetime[0] - Datetime[8] or so. When trying to make that count that reads into a 24 hour array using the Datetime[x] it errors out. It won't let me do a similar totalprtshrcnt[datetime[3]].
I've tried copying it to a dint, and that helps a time defined problem as it's a little more basic, but doesn't not help me with this.

Any chance someone can shed some light on this? I'm sure my wording makes no sense, let me know if I can clarify in anyway. Thank you in advance!
 
I've got a program I'm working on, and one I'm referencing.
I've got some PLC that has a bunch of data and registers that help an HMI display data over time. BUT, i'm trying to feed a day long accumulator into an hour to hour 24 tag array.
In the referenced program it's something along the lines of "totalprtshrcnt[date.hour]. I can't find at any point that the date.time is defined. Not even in the GSV that's on there It looks like whoever put this together made their own data type called "DateTime_Type" and then from there it's broken down into datetime.year, datetime.month, etc. Again, I don't see where it's defined.

How do I replicate this in the other program? It's been done with a GSV but it's into an array that is phrased as such Datetime[0] - Datetime[8] or so. When trying to make that count that reads into a 24 hour array using the Datetime[x] it errors out. It won't let me do a similar totalprtshrcnt[datetime[3]].
I've tried copying it to a dint, and that helps a time defined problem as it's a little more basic, but doesn't not help me with this.

Any chance someone can shed some light on this? I'm sure my wording makes no sense, let me know if I can clarify in anyway. Thank you in advance!

I can`t find any reference to a UDT that holds the date information that way.

Perhaps the HMI is writing the values to that tag if you can`t find a cross reference that puts the information into the tags.

If you copy your Datetime[0] array to a UDT named Date that is has yy, mm, dd, hour, mm, ss all defined as DINT, you can access the data as Date.hour but that`s a bit of over-kill if you only use hour.

Since you are doing this for one value only, moving Datetime[3] to a dint tag called HOUR is less work.

Mov Datetime[3]¸HOUR
mov your data into totalprtshrcnt[hour]
 

Similar Topics

Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
112
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,120
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
866
The machine is running production. When trying to go online with the laptop the whole machine looses communication and faults out. Drives, HMI...
Replies
13
Views
1,932
Back
Top Bottom