You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old September 15th, 2021, 12:59 PM   #1
mtech2766
Member
United States

mtech2766 is offline
 
Join Date: Jun 2021
Location: Indiana
Posts: 16
SLC5 analog input

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
  Reply With Quote
Old September 15th, 2021, 01:15 PM   #2
jimtech67
Member
United States

jimtech67 is online now
 
jimtech67's Avatar
 
Join Date: Jun 2002
Location: New Jersey
Posts: 476
post your code

check you configuration

I am assuming a 1746-NI8 module

https://literature.rockwellautomatio...m020_-en-p.pdf

pages 1-2 and 5-2 should help

Last edited by jimtech67; September 15th, 2021 at 01:28 PM.
  Reply With Quote
Old September 15th, 2021, 01:16 PM   #3
Aardwizz
Member
United Kingdom

Aardwizz is offline
 
Aardwizz's Avatar
 
Join Date: Dec 2017
Location: Swindon
Posts: 275
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.
  Reply With Quote
Old September 15th, 2021, 01:27 PM   #4
Aardwizz
Member
United Kingdom

Aardwizz is offline
 
Aardwizz's Avatar
 
Join Date: Dec 2017
Location: Swindon
Posts: 275
Quote:
Originally Posted by mtech2766 View Post
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 by Aardwizz; September 15th, 2021 at 02:00 PM.
  Reply With Quote
Old September 16th, 2021, 08:59 AM   #5
mtech2766
Member
United States

mtech2766 is offline
 
Join Date: Jun 2021
Location: Indiana
Posts: 16
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.
  Reply With Quote
Old September 16th, 2021, 09:18 AM   #6
jimtech67
Member
United States

jimtech67 is online now
 
jimtech67's Avatar
 
Join Date: Jun 2002
Location: New Jersey
Posts: 476
SLC 500 Analog
Input Modules
Catalog Numbers 1746-NI16I and
1746-NI16V


https://literature.rockwellautomatio...m001_-en-p.pdf
  Reply With Quote
Old September 16th, 2021, 09:18 AM   #7
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 11,133
Quote:
Originally Posted by mtech2766 View Post
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.
__________________
You've been taken, but you don't know it yet.
  Reply With Quote
Old September 16th, 2021, 12:05 PM   #8
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,581
Quote:
Originally Posted by mtech2766
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):
    • Quote:
      Originally Posted by mtech2766
      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
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.

Last edited by drbitboy; September 16th, 2021 at 12:31 PM.
  Reply With Quote
Old September 16th, 2021, 12:55 PM   #9
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 3,581
Quote:
Originally Posted by mtech2766 View Post
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.
__________________
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.

Last edited by drbitboy; September 16th, 2021 at 01:01 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
RSLogix 500 - I/O mapping question toads LIVE PLC Questions And Answers 8 September 25th, 2019 12:40 PM
Analog Input location for PLC5/20 sboudreau LIVE PLC Questions And Answers 3 March 28th, 2012 03:47 PM
1762-1F4 Analog Input toarts LIVE PLC Questions And Answers 2 October 20th, 2010 05:04 PM
Scalling for analog input module - SLC 5/04 ckchew666 LIVE PLC Questions And Answers 1 May 15th, 2008 10:31 AM
Analog Input to Analog Output rawtalent LIVE PLC Questions And Answers 6 March 22nd, 2005 05:02 AM


All times are GMT -4. The time now is 04:28 PM.


.