S7 analog inputs

CharlesM

Member
Join Date
Aug 2005
Location
Arkansas
Posts
1,129
I am trying to scale a +/-10VDC analog input in Step 7. I put the input PIW520 into a var table and it shows -27000. In the ladder program it shows at 36000. I have a simple scale block that I made for other things but it only works for 0-10vdc not +/-10. So this is the first time I have gone -. I have tried using the FC105 but I am having trouble with it as well. Anyone used FC105?
 
The problem I was having is related to words & ints. I changed everything to ints and it started working. I changed my scale block to do - numbers by checking the input to see if it was less than 0. If it was I mul by -1 to change to + and set a bit. After the scale was done if the bit was set then I mul the scaled value by -1 to make it -.

I realy like most things about Siemens. But some of things should not be this hard.
 
Scaling

If you use the scaling formula, it will not matter what ranges you are working with.

Output=(ScaledMax-ScaledMin)/(InputMax-InputMin)*(Input-InputMin)+ScaledMin

Siemens PLCs do take a bit of getting used to, but from what I've seen, they are on top for flexibility and performance.
 
As far as I know, Siemens analog module represent analog signal like integer number in your program. Integer number is in range (0-27648). If you want to convert it to a -/+10 V use FC105 as SimonGoldsworthy described. Alos to have as little headache as possible define PIW520 as type INT in your simbol table.
 
The analog input should be from -32768 to 32767. If this is to be scaled to a small range, it may be beneficial to convert the number to a real (float) type.
 
lendyck said:
The analog input should be from -32768 to 32767. If this is to be scaled to a small range, it may be beneficial to convert the number to a real (float) type.

No, normally values will be in range (0-27648), values out of that range means some kind of error. If you use FC105 and set up bipolar to 1, lo limit to -10 and high limit to +10, FC105 will convert that range (0-27648)INT into range of real numbers (-10, 10).
Try it and see
 

Similar Topics

I am converting a SLC 500 to a Compact Logix. I plan on using a Compact Logix 5380 with conversion Kit. The problem is that the analog input cards...
Replies
1
Views
144
Hi there, I'm doing some extensive testing and commissioning with a slew of new Emerson PACSystems RX3i PLCs. It would be convenient to...
Replies
5
Views
96
Hello I need to message read the entire 16 channel raw analog inputs from a 1769-L33ER Compact Logic controller to another 1769-L33ER Compact...
Replies
8
Views
240
I have a SLC500 5/05 and we have an alarm setup to monitor the status of the Analog Inputs we have wired to a 1746-NI8. We are using 5 of the...
Replies
14
Views
2,803
Hi, I'm curious if anyone has made a master sheet or cheat sheet for all allen bradley card's analog inputs/outputs? As much fun as it is to...
Replies
2
Views
1,571
Back
Top Bottom