Hold the data

atatari

Member
Join Date
Sep 2002
Posts
92
Hi Everybody,

I am trying to measure the product lenght and keep the measured lenght in a register for evaluation.
My first question:

I tried to use timer to keep the data in for example N7:0/1 for two second ( I can't keep it for more that 2 sec. because the next product will pass the sensor and I have to measure this lenght too)
my next try was to use S24 to write the values in different registers each time,but again it will be reset after the timer times out (but nice try)

so ,I guess my only choice would be using different timers in different subroutins and keep the like that (It's not a smart idea !!)

I don't know if there is any instructions that I can use or any other suggetions?

My second question is:
how I will be able to transfer this data to Excel and chart them?

Thanks alot,
 
I am wondering why your first method did not work. Seems like it should. I would think that you could set your program up to keep the measurement in N7:1 (I am assuming that you meant that- N7:0/1 is a bit) until the next product passes the sensor, or your timer method. Could you post your program? Maybe we can see what went wrong.
 
Hold the pickle

You need to define your specifications better.

1) How long (seconds, minutes, days, years) do you need to keep the length?

1a) (Related) How many lengths do you need to keep?

1b) Do you need to keep some lengths and not others? If so, explain....

2) When you pull the number "for evaluation", do you need any other info associated with it (time stamp, ID no?)

3) Is Excel going to be used to store every length of every bar, or are you just planning on using it as a cheap real-time trending tool?

4) What flavor of RSLinx are you using (Lite, OEM, Professional, Gateway, ???) ?

4a) If Lite, do you have a budget to upgrade from Lite?



In the meantime, play with this code fragment and see if it gives you any ideas:


TIMER/DN
---| |------[osr]--+---(MOV Length N10:100)
|
+---(COP #N10:1 #N10:0 100)


`
 
Last edited:
We do something like that. We read a High speed ctr, store the data, do a multitude of math, then re write the HSC config based on the previous measurement's results. Point is--Max rate is 16 measurements a second, and there's plenty of time to do all the read, math and write in between the repeats which come about every 85 Msec. Two seconds seems like a lifetime, in comparasin.

I set up a couple of timers just to see how long things took in order to determine if the system was fast enough to work on a faster running machine. The thing takes about .02 sec to do all the work, then sleeps for .06 sec until the next measurement comes in. It's a PLC-5/40 but the little slc's are even faster than the 5's.

Figure out what you want to know about the data, code it, and you'll be suprised at how fast you get what you need.
 
Try a shift register

Depending on the information you want to compare you could try a shift register. This would also alow you to average all of your distances for a set duration or add them all to gether.
 
Thanks guys for the reply,

Well, is excel a cheap trending tool? what else I can use?
Yes ,I have the budget to upgrade my Rslinx(I am using lite)

I just want to keep the data for max 5 hrs.
and beside the lenght i want to record the time too.
thans
 
So, you need 5 hours (=18,000 seconds) of data, with a new datapoint every 2 seconds, for 9,000 data points?

That's not going to fit in a PLC (at least not without pain).

So you need to store the data in Excel. And since the data is going to keep on flowing in a FIFO manner, that's going to require some good VBA programming skills and an upgraded licence of RSLinx (to one that supports third-party DDE).

I'd suggest that you use a shift register (like the code I posted) to collect several minutes worth of data, and then have Excel grab all the data at once, rather than trying to grab each data point.

OR....

You could use RSTrendX, which (I think) was installed with your RSLogix (although Rockwell also sells it - I don't know what the differences are, possibly the abilitity to drop it into ActiveX containers, like Excel and Word).

You can use it to trend, and it will keep track of the 9000 data points for you (kinda,sorta). You can zoom in on a section, and see something that's amiss.

It's fairly limited, and will bog your system down, but if it's just for some now-and-again monitoring, it might suit you (once you clarify exactly what you need to accomplish - you haven't done that here yet).
 

Similar Topics

Hello, I am writing a program which calculates the real Power and Energy Measurement and then store it inside SQL database. Now, I want to change...
Replies
2
Views
1,445
Hi to All, Actually today i had tried with this concept,but no result.. i have L32E cpu and 1734AENT with IB8 and OB8(in the testing kit) please...
Replies
3
Views
2,515
Hi all, Got another question. We have an application for a sample-hold circuit, and I'm wondering if you guys think it might be possible to do in...
Replies
4
Views
6,874
Hello I am trying to make a program work with a sqo instruction .The process has 5 steps ,and a starting step of zero.There should be 8 sec...
Replies
17
Views
969
Howdy Everyone, We have an old HMI that is a UniOp Model eTOP310U201. It is the only one in the plant, and i didn't even know it was here until a...
Replies
15
Views
2,059
Back
Top Bottom