measuring analog input signal 5ms sample time

mulderm

Member
Join Date
Jun 2003
Location
Netherlands
Posts
298
Hello,

I want to make a program for the PLC5/25 to measure an analog input signal
with a sample time of 5 ms.
There is a start and a stop signal and between this time (max.5 sec.) the
program must put the measuring words into a datafile (example N7 integers).
Also the program must measure the time between the start and the stop signal
en put the measured time in a integer woord.
Who can help me?
Must I use the indexed register?

Greetings,

mulderm
 
As you suggest, you will use either indexed or indirect addressing to log your data into various data locations. I think you will be limited to 1000 samples. I believe the maximuim file size in the PLC5 is 1000 words.

The bigger problem is the time between samples. Are you sure the analog input card will sample at that rate? 5ms seems kind of fast for a typical analog input channel. Also, I don't know of a way to force the BTR to update data immediately. You could use an STI to give the repeated 5ms sample. But since you are using a classic PLC5 the STI won't wait for the BTR to complete. So the data you log in a given STI will be at least one STI old. I'm not even sure you can complete a BTR inside 5ms. At best you will get an occasional STI overrun. At worst you will get a watchdog failure because the rest of the program can't be serviced.

Look into the analog conversion rate of your analog input and make sure it can satisfy your requirements. After that look into BTR access time to make sure you can get the data in as quickly as you need it. If you can do that then the data logging won't be too bad. Let us know if you have specific questions about that. I believe indexed addressing is faster than indirect addressing so that may be the way to go.

Keith
 
I don't think its as simple as using indexed registers to log the data. This may be more than a PLC-5/25 controller can handle.

First, there is the issue of the sample time. You said you want a sample every 5 milliseconds. Typical PLC-5 analog input modules (like the 1771-IFE) have a sample time of about 14 milliseconds per module. The module must also use a block transfer, which is an asynchronous function to the processor, and the CPU itself typically has a scan time in the 20-50 millisecond range.

I just don't think the PLC-5/25 is fast enough to do a 5 millisecond analog sample, unless you use a specialty module and dedicate the PLC-5/25 to this purpose.

In addition, there is the matter of memory usage. 5 milliseconds interval over 5 seconds is 1000 samples. If each value is 1 memory word, that's almost 2K of memory right there. Do you have that much spare memory in the controller ?

What is this application, where you need to sample analog data that fast with this controller ?
 
Sorry, sorry guys.
I means 50 ms.
Can you give me a little rungs to do this sample?
I know the configuring of a block transfer.
Greetings,

mulderm
 

Similar Topics

Hi, I have PLC-5 that has analog input module. The modules are setup as differential inputs so two wires go to 1+ and 1- terminals. I was...
Replies
8
Views
3,733
Hi, Anyone knows a Capacity Measuring Instrument with Analog Output? The ideia it's convert the analog output to digital, and use that digital...
Replies
6
Views
4,806
dear friends I am working with analog input moudle(sm331;ai8*12,6es7 331-7kf02-0ab0) I 've measured voltage with scale(fc105)but this moudle can...
Replies
2
Views
3,919
Hi all, Iv'e got a question, I hope I can describe clearly, and I hope someone can help me in determining a solution. Ok here goes.. Im...
Replies
13
Views
7,357
Hi everyone, I don't know much of PLCs but it happened that i need to connect Leuze AMS358i Ethernet laser measurement to Productivity 1000...
Replies
0
Views
1,061
Back
Top Bottom