Author Topic: Analogue Refresh Rates  (Read 15457 times)

Ben_Whitworth

  • Guest
Analogue Refresh Rates
« on: July 21, 2003, 06:17:29 AM »
We have just bought a T100MD888+ and need it to read an analogue input from a 0-5v variable proximity sensor and switch on a relay when the value of the analogue reaches a predetermined value.  The sensor is reading distances between itself and an eccentric cam on a spindle and hence will receive the value at which to stop many times and often.  At the moment it switches the relay (that stops the spindle) only occasionally.  It often will pass straight through the value and may do three or four times in a row.  The cam is presently only turning slowly and the sensors refresh rate is high enough to record the required value.  It seems as if the PLC is not reading the analogue input quick enough.

Is it possible to increase the scan rate of the program via any tricks or to increase the refresh rate of the variable given by the ADC??

Cheers
Ben
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: Analogue Refresh Rates
« Reply #1 on: July 21, 2003, 08:28:32 AM »
If you need to read the analog data at high speed then you need to execute a non-differentiated custom function {CusFn} at every scan of the ladder program. Within the custom function you are reading the ADC input value to make a decision. Note that any SETIO or SETBIT command executed within a custom function will not update the physical output until the end of the ladder logic scan. Hence, if you need to turn on an output within this custom function, then you should allow this custom function to end so that the ladder logic can scan to the end of the whole ladder program and the physical output can be updated.  

If you are already doing the above and feel that the input ADC is not updating quick enough, then you may have to remove the 0.1uF capacitor at the corresponding ADC input. The 0.1uF acts as a low pass filter and is meant to filter out the high frequency switching noise but it also means that the frequency response is altered.

Note that ADC input #7 and #8 do not have 0.1uF capacitor. So a quick way to test if the 0.1uF cap is affecting your need for high refresh rate is to move your sensor output to the ADC #7 or #8 and change your ADC(n) command accordingly.


« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

Ben_Whitworth

  • Guest
Re: Analogue Refresh Rates
« Reply #2 on: July 24, 2003, 07:04:57 AM »
Thanks support - it is better on output 8

However, on a slightly different point, how accurate are the ADC??  The value in the PLC is wavering by about 24 units i.e 24 / 4092 , but the voltage giong into the PLC is steady, at least to the limits we can measure it (2 decimal places).

Cheers

Ben
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: Analogue Refresh Rates
« Reply #3 on: July 24, 2003, 08:00:06 AM »
The built-in ADC has repeatability of about +/- 3LSB, which is about +/- 12 counts since the reading is amplified by 4 due to internal scaling.  Input with 0.1uF capacitors should be more stable due to the filtering of switching noise imposed on the analog by the digital side of the PLC.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS