Author Topic: PLC to PLC, Analog issue  (Read 11622 times)

BJMarsh

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
    • Webmosa
PLC to PLC, Analog issue
« on: July 20, 2010, 09:14:07 AM »
For my project I required two PLCs, one of which reads a IR thermometer. The second PLC needs that value, so I made the first write an Analog signal so that in theory I could capture the signal on the second and convert it back into the value I needed.

The problem I am having is that the 1st writes a perfect signal, with minimal error, however I can't seem to get the 2nd to pick up the analog signal successfully. The signal cycles through 0 to 4096 continuously. I anticipate a wiring error but I've tried almost everything.

Has anyone been able to get a TRI PLC to read an external analog signal before? I've done it many times with potentiometers and other sensors using the ground and Vs, but I have hit a wall this way.  Thanks for any help!

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PLC to PLC, Analog issue
« Reply #1 on: July 20, 2010, 11:12:22 AM »
Are the two PLCs communicating over RS485 signal? Or is the analog input shared between the two PLCs? What do you mean by "capture" the signal on the second? If the IR thermometer is attached only to the first PLC's analog input, then the 2nd PLC could retrieve the reading from the first PLC via RS485. The second PLC can use either the NETCMD$ command or the READMODBUS command to read the result that is captured on the first PLC.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

BJMarsh

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
    • Webmosa
Re:PLC to PLC, Analog issue
« Reply #2 on: July 20, 2010, 11:56:04 AM »
The first PLC writes an analog signal from 0-5V. I was hoping I would then be able to read the analog signal from the second PLC.

Wasn't sure if I would have to read it with a PWM or if the analog to analog would work. The first PLC is a little Arduino board acting as a sensor slave, the second is an F2424, so RS485 is not a built on ability (that I know of for the Arduino).

I am successfully reading the sensors, and then writing the Analog out from the 1st. Where it is failing, is the F2424 cannot seem to read the analog signal.

BJMarsh

  • Newbie
  • Posts: 5
  • I'm a llama!
    • View Profile
    • Webmosa
Re:PLC to PLC, Analog issue
« Reply #3 on: July 20, 2010, 12:10:44 PM »
I should ad to that. The analog signal frequency is 1hz, so on the F2424 I have the ADC on a dCuff that is triggered at the same rate. I figured that would give me a flat signal, but the signal still comes in all over the place.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:PLC to PLC, Analog issue
« Reply #4 on: July 20, 2010, 01:46:55 PM »
Oh it wasn't clear from the original post that the first PLC is a 3rd party PLC.

So what you mean is that your Arduino board is giving out an analog signal that varies from 0 to 5V every 1 second (you said 1 Hz frequency) and not a stable voltage? F2424 can read the analog input from 0-5V accurately but if the signal from your Arduino board varies then obviously the F2424 will get a varying voltage.  If the Arduino board can be configured to output a stable analog voltage between 0 and 5V then the PLC should be able to read the voltage accurately.

Please ensure that the two controllers share a common analog ground. This is achieve by tying the 0V of the PLC power supply to the Arduino's analog ground.

If the Arduino board can be configured to output its signal as a PWM or as pulses where the frequency varies with measured quantities the F2424 can also read them (probably with better accuracy than analog since the signal will not be disturbed by electrical interference)
« Last Edit: July 20, 2010, 01:50:16 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS