SLC5 analog input

mtech2766

Member
Join Date
Jun 2021
Location
Indiana
Posts
20
Okay, I am probably trying to make this more complicated than it needs to be:
I am using engineering units input for -10 to +10 Vdc. (I was told it is best to not change the default setting in case the Ain module needs replaced).
Input voltage varies from 0 to 9.5 Vdc.
I need to display 0 to 7.5.
I am using SCP.
If I am doing it correctly, my maximum input value should be 9500 since it is measuring in mV.
Is this correct? It doesn't seem to operate correctly.

Thanks
 
The Raw Min & Max are going to depend on the type of I/O module you have. For example, for 4-20 mA signals, a 1794 Flex I/O module would read, as you might expect, 4000 to 20000. But a 1746 SLC Analog input would be 3277-16383.

For -10 to +10 VDC, the scaled range for the 1746 Analog module is -32768 to +32767.

Consult the user manual for you Ain card for details.
 
Input voltage varies from 0 to 9.5 Vdc.
I need to display 0 to 7.5.

*IF* you span the SCP at the full signal range (as I suggested, from -32768 to 32767) then you would also have to span your EU (engineering units range) proportionally.

Since -32768 represents -10 VDC and +32767 represents +10 VDC, then 0 counts represent 0 VDC.

You say your 7.5 EU represents 9.5 VDC, which would correspond to (9.5/10)*32767 counts, or 31129 counts.

Thus for your SCP:
Raw Min: 0
Raw Max: 31129
Scaled Min: 0.0
Scaled Max: 7.5

Again, if the AIn card isn't ranged -32768 to 32767, then you'll need to do similar maths.
 
Last edited:
Aardwizz,
thanks for your response. You are correct in saying that I am using the 1746 16 channel analog input module.

A little background is this signal is from a current sense circuit I built, giving .07 to 10Vdc output. During calibration of the product, the operator is instructed to set it to either 7.2 ADC or 2.15 ADC, but may overshoot those values briefly.

I am not concerned about measuring down to the 1mV range.

If I set the the max input to 32767 (giving me 10 volt max input), can I then set the max output to 10 and it read accurately at 2.15 and 7.5?

And my input min would need to be set to 229 to compensate for the .07 Vdc offset?

thanks.
 
Aardwizz,
thanks for your response. You are correct in saying that I am using the 1746 16 channel analog input module.

A little background is this signal is from a current sense circuit I built, giving .07 to 10Vdc output. During calibration of the product, the operator is instructed to set it to either 7.2 ADC or 2.15 ADC, but may overshoot those values briefly.

I am not concerned about measuring down to the 1mV range.

If I set the the max input to 32767 (giving me 10 volt max input), can I then set the max output to 10 and it read accurately at 2.15 and 7.5?

And my input min would need to be set to 229 to compensate for the .07 Vdc offset?

thanks.

I am assuming there is an HMI involved.

Make all the values in your SCP block HMI tags. Then dial it in with some trials. You might want to only allow authorized access to the raw data tags for the SCP block on the HMI. Even brand new cards are sometimes off by a couple of counts, but if you have a protected screen for calibration, you can account for that at runtime and not have to worry about having to change the code in case something drifts slightly or a card gets swapped out and is slightly different.
 
mtech2766 said:
If I set the the max input to 32767 (giving me 10 volt max input), can I then set the max output to 10 and it read accurately at 2.15 and 7.5?
...
And my input min would need to be set to 229 to compensate for the .07 Vdc offset?
I don't think so, see the TL;DR below.

The SCP Input Max. parameter should be 10000 for 10VDC analog voltage signal, and the Input Min. parameter should be 70 for a 0.07VDC analog voltage signal (=70mVDC at 1mVDC per count), or perhaps 0 for a 0VDC analog voltage signal.

Because of ambiguity in the previous posts, we cannot be completely sure of what the Scaled Min. and Scaled Max. values should be, but from the OP, I will assume what is wanted is for the output of the SCP instruction to be

  • 7.5 for an analog voltage signal of +9.5VDC
  • 0.0 for an analog voltage signal of 0VDC,
    • Or this may be 0.0 for an analog voltage signal of 0.07VDC
We don't know the units of those 7.5 and 0.0 SCP otuput values; "ADC" was mentioned. I am guessing that is DC Amps, but it does not matter: a key assumption is that the current-voltage relationship of the current sensing device is linear, and that the voltage-count relationship of the PLC analog input card is also linear.

One way to do this would be to configure the SCP as follows:

  • The digital output INT of the analog input card channel as the SCP Input parameter
  • 0 (or 70) as the SCP Input Min. parameter
    • 0 will be the channel unput value when the analog input voltage signal is 0VDC
    • 70 will be the channel input value when the analog input voltage signal is 0.07VDC = 70mVDC
  • 0.0 as the SCP Scaled Min. parameter
  • 9500 as the SCP Input Max. parameter
    • 9500 will be the channel input value when the analog input voltage signal is 9.5VDC
  • 7.5 as the SCP Scaled Max. parameter
The only problem with this approach is that the SCP instruction would clamp the output at 7.5 max even if the analog input voltage signal went above 9.5VDC, so the operator might see a clamped 7.5 output when the input voltage signal was above 9.5VDC and the actual value was above 7.5. One way to fix this would be to use arbitrarily high values for Input Max. and Scaled Max. parameters, but values that both (1) express the relationship correctly in a numerical sense, and (2) are easy to calculate, e.g.

  • 15.0 as the SCP Scaled Max. parameter
    • This is twice the 7.5 nominal scaled max
  • 19000 as the SCP Input Max. parameter
    • This is twice the 9500 nominal input max.
  • However, if 70 is used for Input Min., corresponding to the Scaled Min. of 0.0, then use
    • 18930 as the SCP Input Max. parameter
      • = 19000 - 70
TL;DR

According to previous posts, the card is set for [Engineering Units] (±10250), not [Proportional Counts] (±32k). It depends on the following assumptions

  • The analog input card is the 1746-NI16V that @jimtech67 suggested (we still don't know this, so this is the first shaky assumption)
  • IF the analog input channel configuration word is 0 (i.e. the default; this is the second shaky assumption):
    • mtech2766 said:
      I am using engineering units input for -10 to +10 Vdc. (I was told it is best to not change the default setting in case the Ain module needs replaced).
    • So this is the configuration:
      yyy.png
    • Bits 5-4 are 00, so
      • the analog input voltage signal [Input Type] is ±10VDC (nominal)
    • Bits 8-6 are 000, so
      • the [Data Format] is Engineering Units,
      • the analog voltage [Signal Range] is ±10.250VDC,
      • the analog input digital INT range will be -10250 to +10250
      • I.e. the analog input digital value will be
        • -10250 counts when the analog voltage signal is -10.25VDC
        • +10250 counts when the analog voltage signal is +10.25VDC
        • 0 counts when the analog voltage signal is 0VDC
        • 70 counts when the analog voltage signal is 0.07VDC
          • i.e. when the analog voltage signal is 70mVDC above 0VDC, the input digital value is 70 counts, = 70mVDC / (1mVDC per count step), above 0 counts.
      • Cf.
        xxx.png
 
Last edited:
Okay, I am probably trying to make this more complicated than it needs to be:
I am using engineering units input for -10 to +10 Vdc. (I was told it is best to not change the default setting in case the Ain module needs replaced).
Input voltage varies from 0 to 9.5 Vdc.
I need to display 0 to 7.5.
I am using SCP.
If I am doing it correctly, my maximum input value should be 9500 since it is measuring in mV.
Is this correct? It doesn't seem to operate correctly.

Thanks


hahaha that is the original post, we went on a bit of a rabbit trail, eh? And the first response from @jimtech67 was the correct one: post your code; check your configuration; i.e. check your assumptions.

So the answer to the OP question is yes, but that is a provisional yes that assumes the AI channel is indeed configured to use ±10Vdc for the Input Type and Engineering Units for the Data Format.

If an SCP input range [0:9500] and output range [0.0:7.5] yields an unexpected result, then something is wrong with one or more model assumptions.

One approach is to disconnect the current sensing device and short (apply 0VDC to) the AI channel terminals and see if the digital AI channel input value is 0 (or near 0).

Then get a small voltage source, such as a 1.5V battery, and connect it with each possible polarity (apply +1.5VDC and -1.5VDC) to the terminals and see if the digital AI channel input values are near +1500 and -1500, respectively.

Do that, and report back with the results, and you might get a better answer.
 
Last edited:

Similar Topics

I need some help on a program I inherited. I have the following rung that is supposed to initialize 2 slots. SLC5/05 1746-NI8, Analog 8 channel...
Replies
2
Views
3,366
I have wasted a week trying to figure out how to connect an SLC5/03 with my laptop. I do not have and can not Buy the 1747 UIC and PC3 cables. I...
Replies
14
Views
2,477
I am trying to connect to SLC5/03 using an FTDI usb to rs232 with female to female converter at 1 end... however I can not connect to it ... the...
Replies
8
Views
1,182
Good evening. I am in serious need of help. I am trying to connect a Panelview Plus 7 Standard to a SLC5/03(1741-L531) using a Moxa MGate...
Replies
3
Views
602
Hi. I am having trouble establishing comms between an slc5/04 and panel view plus 7 via a PLX51-net-eni. The set up is: 5/04 Channel 0 DF1...
Replies
8
Views
869
Back
Top Bottom