store and clear 3 variables

kurt.brinker

Member
Join Date
Dec 2006
Location
In Town
Posts
263
Plain and simple, we mix 3 chemicals in 900lb trays. I recieve pulse inputs so i can monitor and trend how much of each chemical is in each tray. The pulses are reset at 900lbs so we get a pretty graph on each tray we fill via view se. The problems is that you have to click on eack tray to see how much of each chemical was in the tray. I want to make it so that at 899lbs i move the 3 values to a location to store and then clear that location for the next set of numbers. Basically so i can easily see how much of each chemical was in each tray.
 
How are the pulses reset at 900.

If you are using the plc to reset them, use a one shot before you reset to zero and store the totals to be displayed.
 
Maybe I am misunderstanding this, but why are you resetting the weight at 900lbs? I would trigger the reset when you actually stop filling, how do you know you don't have 910lbs? For example, when the valves close, move the three values to a set of three new registers, then zero the 'running totals'
 
Kurt, I think I understand the process. Some questions:

I want to make it so that at 899lbs i move the 3 values to a location to store and then clear that location for the next set of numbers
1. Is what you mean that you already have a set of read-out numbers on the screen that displays the current tray data, and what you need now is another set of numbers that also displays the 3 chemical weights for the PREVIOUS tray data?

2. How many sets of History for each tray do you want to store? Only 1, or several? (Only 1 set of previous-history data is much easier and takes less PLC memory, than storing several.)

3. How do you want to access the previous data? Do you need a button on the screen to click for "Previous Tray", or what? Perhaps you would want to make the previous tray data always visible, and shift the data from current to previous when the 899 limit is reached?

4. How many 900 lb. trays are you dealing with?

In any case, you will need to modify both the RSViewSE program and the (assumed) SLC RSLogix program. In the SLC program, you will probably need to set up 3 memory addresses (either Integer or Floating Point locations depending on if your data has fractions) to store the weights for each chemical, for EACH tray. Then if you only need the PREVIOUS tray data, you can create PLC logic to shift the data, moving new data to the historical memory addresses each time the 899 lb limit is triggered.

Also in RSView it is pretty easy to set up TREND charts that will AUTOMATICALLY record ALL previous historical tray data, and display it in graph form, by date and time intervals.
 
Last edited:
Lancie1 said:
Kurt, I think I understand the process. Some questions:

1. Is what you mean that you already have a set of read-out numbers on the screen that displays the current tray data, and what you need now is another set of numbers that also displays the 3 chemical weights for the PREVIOUS tray data?

2. How many sets of History for each tray do you want to store? Only 1, or several? (Only 1 set of previous-history data is much easier and takes less PLC memory, than storing several.)

3. How do you want to access the previous data? Do you need a button on the screen to click for "Previous Tray", or what? Perhaps you would want to make the previous tray data always visible, and shift the data from current to previous when the 899 limit is reached?

4. How many 900 lb. trays are you dealing with?

In any case, you will need to modify both the RSViewSE program and the (assumed) SLC RSLogix program. In the SLC program, you will probably need to set up 3 memory addresses (either Integer or Floating Point locations depending on if your data has fractions) to store the weights for each chemical, for EACH tray. Then if you only need the PREVIOUS tray data, you can create PLC logic to shift the data, moving new data to the historical memory addresses each time the 899 lb limit is triggered.

Also in RSView it is pretty easy to set up TREND charts that will AUTOMATICALLY record ALL previous historical tray data, and display it in graph form, by date and time intervals.




1. in rsview i have a trend that monitors my subtotals. Those subtotals get reset when chem1 hits 900lbs. (i have another total that only gets reset when they start a new set of trays so i get a grand total for each batch) This way i get a nice graph on each tray but you have to click the peaks on each one to see what the totals were.

2. All i want to store is the subtotals of chem 1 2 and 3 when chem 1 is at 899lbs. So i will know how much of each is in each tray

3. I would like to store subtotals from the previous 16 trays.
It can constantly roll over so i have totals from just the prior 16 and they are overwritten.

4. 8 at a time.

actually wait. now that i think about it. Could i set a trend trigger to record those 3 values when the total is 899? that way i can keep records indefinately and with limited programing.
I would probably set it at 895 just to make sure i don't miss any.

Just create a new trend an only have it trend for the last 5 lbs of each tray?
 
I bet you could use the event editor (atleast in RSView32) and create an event watching your weight >895 and use the 'datalogsnapshot' command and a datalog set up with a log trigger of 'on demand'.

Thats what I like about this place. Now I have an idea of where I can use the same method.

Thanks for the help Kurt!
 
Sure, you can create a new trend that only captures what you need. You can even set a bit in the PLC that goes one between 895 and 899, and use that as the TREND trigger. There are many ways to trigger it.

Another method, requiring no additional PLC program modification, would be to create Derived Tags. The new Derived Tags would define 3 expressions that captures the values of the 3 chemicals when Chemical 1 is between 895 and 899.

To define derived tags in the RSView Forms section:
1 Double-click the Derived Tags editor under Logic and Control in the Project Manager.
To add tags to an existing derived tags file, double-click the file in the right hand pane of the Project Manager.
2 Type the name of the derived tag you are defining in the Tag Name field.
3 Type a description of what the derived tag does.
4 Create an expression that will be evaluated at runtime to give the derived tag a value.
5 Click Accept to confirm and save the tag definition.
6 To define another tag, click Next. The forms section is cleared and you repeat the above procedure.
7 When you have finished adding tags to the spreadsheet, choose Save from the file menu to save the spreadsheet.

A third way would be to capture the 3 chemical values in the PLC, only using the RSView to display the results. For the past 16 trays, for 8 different trays, would take 3 X 16 X 8 memory words, or 384 PLC words. That is not so large as to be undoable. The advantage of this method is that you could make trends on the 384 data words to show how each of the 8 trays is varying over the past 16 tray fillings.
 
Last edited:
Lancie1 said:
Sure, you can create a new trend that only captures what you need. You can even set a bit in the PLC that goes one between 895 and 899, and use that as the TREND trigger. There are many ways to trigger it.

i did just that and it works GREAT. thanks
 

Similar Topics

I'm running into a problem when trying to use the RSLinx Backup Restore Utility where it throws an error when it tries to restore a backup. The...
Replies
6
Views
564
Hi y'all I have a KTP400 connected to a s7-1200. Now i have on my screen the encoder value which comes from my SEW movitrac. under there I have...
Replies
2
Views
387
This was asked in another forum and taken down due to being a 'backdoor', but this has useful info that might be useful to someone in a pinch. I'm...
Replies
6
Views
607
Hello all, I'm using a 5069-L330ER in a project and I need to essentially capture some data that will be shown as a trend on a screen. The data...
Replies
9
Views
962
Hi all, I am working with an IO link sensor (measuring current across motor)and need to read in and store the sensor values for 5 seconds, then...
Replies
13
Views
1,209
Back
Top Bottom