Gathering data.

Grzesiuk

Member
Join Date
Dec 2018
Location
Ukraine
Posts
24
Dear experts,

I want to implement a modification to my machine, which will count a working time of motors. Three shifts (I shift: 6:00 - 14:00, II: 14:00 - 22:00, III: 22:00 - 6:00). I want to get data for each day, the whole week, which shall be displayed in HMI [First we open the window that will display all informations for current day (3 shifts), then in the same window, there should be an option to choose whatever day from the drop down list and then another window (not sure if we can do this in one window) will appear displaying informations about working time of that day]. When we start another week, we just delete information from the following day and overwrite it by current day, the rest should stay untouched until next day and so on.
I am not sure how to start with that thing. I am using KTP700 with S7-300 (CPU 314C).
If it would be only for one day then its okay, but I want to gather data for whole week, and split it to each day for three shifts.
I would be grateful if you provide me with some examples, informations, tips how to implement such function.
 
Dear experts,

I want to implement a modification to my machine, which will count a working time of motors. Three shifts (I shift: 6:00 - 14:00, II: 14:00 - 22:00, III: 22:00 - 6:00). I want to get data for each day, the whole week, which shall be displayed in HMI [First we open the window that will display all informations for current day (3 shifts), then in the same window, there should be an option to choose whatever day from the drop down list and then another window (not sure if we can do this in one window) will appear displaying informations about working time of that day]. When we start another week, we just delete information from the following day and overwrite it by current day, the rest should stay untouched until next day and so on.
I am not sure how to start with that thing. I am using KTP700 with S7-300 (CPU 314C).
If it would be only for one day then its okay, but I want to gather data for whole week, and split it to each day for three shifts.
I would be grateful if you provide me with some examples, informations, tips how to implement such function.

Hi Grzesiuk

You will need to call SFC1 to get the date and time from the PLC. If you dont already; SFC1 will need to be imported from the standard library and called cyclically (for example OB1). Get this downloaded and make sure your date and time is being passed into Memory.

Once you have that, I would create a UDT block of your required information (so Time) then use this to create a structured DB (12 Months, 31 days per month, 3 shifts per day, X number of minutes runtime per day). Then all you need to do is write an FB with input parameters for time, day and start/ end times of all your shifts. Your output parameter will point to the relevant point in the structure and write to it...

Now everything is located in 1 DB. The advantage of this method is that you have lots of records, however the memory allocation will be high and maybe tight for you on the 314C.

In terms of HMI view; you can always create another block to populate the HMI table, for example lets say you want to view data for 25-12-2018, the relevant FC/FB could retreieve this data then populate the HMI DB. Look at this like a 'store' of data and you are simply collecting the relevant 'packet' you require to be displayed.

All in all, it sounds like a great little project ����...


Regards

Daniel
 
Last edited:
Hey, thank you for the answer!
Counting the work of the motors is already delivered, in program we set the bit for one cycle, and if the motor is working we are counting up. I dont like they way its done now, because we dont have any control of it at all. I can see that someone have placed SFC1 to Program, but its not used anywhere, so that a good start. The idea to create UDT is pretty good and I was thinking about it too, but had no idea how to start. However I dont want to collect data for entire year, for my purpose it is enough to gather it for one week, and then overwrite old data, so the problem with memory is disappearing. Your solution seems fine and I will try to follow that way.
 
Hey, thank you for the answer!
Counting the work of the motors is already delivered, in program we set the bit for one cycle, and if the motor is working we are counting up. I dont like they way its done now, because we dont have any control of it at all. I can see that someone have placed SFC1 to Program, but its not used anywhere, so that a good start. The idea to create UDT is pretty good and I was thinking about it too, but had no idea how to start. However I dont want to collect data for entire year, for my purpose it is enough to gather it for one week, and then overwrite old data, so the problem with memory is disappearing. Your solution seems fine and I will try to follow that way.

Sounds good....in that case simply just create your UDT then make your DB for only 1 week ie ARRAY [0..6] of type UDTx. Sounds simple enough.



Regards

Daniel
 
Yes, its related to production (no overseer over II and III shifts and some miscalculations in productivity), but also because of poor monitoring system that was delivered, which is counting a work time of motors in seconds to eternity (I could reset counter only in PLC, which i want to change and make an additional button to HMI to reset the values) - this is not a valuable information for me at all. Additionally I want to add measurment how long there was a power supply for control cabinet and how long we had controlling system switched on.
 

Similar Topics

Good Afternoon , I need to gather some data on a Excel spreadsheet from a CompactLogix PLC. I understand , thru RS Linx as a "go between" ...
Replies
10
Views
3,507
I have been searching the forum looking for information on this. I would like to find a flame controller , Honeywell , White/Rodgers , etc. that...
Replies
5
Views
2,781
hello, i have a project im about to start, i will be thankful for any help i can get, as you guys are always helpful. ok i am not sure yet what...
Replies
1
Views
3,967
I have been tasked with bringing in ascii string data from some scales in our plant, onto the RL for display as well as utilization. My code...
Replies
3
Views
2,896
I'm a Siemens person, and this is one of my first AB programs. The customer wants everything programmed in Ladder. I have a lot of data (3...
Replies
14
Views
153
Back
Top Bottom