no floats in1747-L524 ?!?!?

realolman

Member
Join Date
Mar 2009
Location
here
Posts
584
You can't use decimals in a 1747-l524?




I have an analog output card that needs a number from 31208 to 0 for 4-20 mA

I need to calculate numbers for outputs that are close enough together that they require divisors of 1.6 1.9 etc. or multipliers of .5 etc

if I try to multiply the 31208 by 10 to do the calculations, it doesn't fit in an integer

there are no floats???? surely there is a way around that
I can't believe it doesn't do decimal points, but I can't find them
thank you
 
Last edited:
That part number indicates that your working with a SLC 5/02. That vintage had offline programming only and no floating point numbers. Floating point didn't come around until about 1993 with later versions of the 5/03 or maybe the 5/04.

I believe you can use double divide (DDV) instruction to help with numbers larger than 32767. Look up the instruction help for details. It's not pretty, but it's probably your best bet if you stick with the 5/02.
 
I have an analog output card that uses a number between 0 and 31208. 4- to 20mA
want to calculate numbers in between there. Using only decimals doesnt give me enough resolution.

If i have the 4 -20mA going to a VFD that has a maximum of 120 Hz i can't get output frequencies very close together using only integers
 
Floating point numbers are not going to increase the resolution of your analog output card. You can't write a floating number to the analog output card's output word.
 
if I try to multiply the 31208 by 10 to do the calculations, it doesn't fit in an integer

You can use implied decimal places in your N registers, within reason. You didn't tell us the range you're working with or the resolution you need, but for example you can go to 2 decimal places with an N register as long as the final result < 327.67

The DDV is used to handle this type of situation. The math register is 32 bit, so the overflow data is "there" when dealing with large numbers.
 
Floating point numbers are not going to increase the resolution of your analog output card. You can't write a floating number to the analog output card's output word.
If the Maximum number the analog output card will use is 31208, and I want to use some sort of calculation to get 11703, what calculation would I use? I need to divide 31208 by 2.666

If I use division, I can only get 15604 by dividing by 2, and 10402.6666666666 dividing by three.

all the outputs between 15604 and 10402 are unavailable to me..

this really is ridiculous, and it has blindsided me... I wasn't expecting this
 
I have an analog output card that uses a number between 0 and 31208. 4- to 20mA
want to calculate numbers in between there. Using only decimals doesnt give me enough resolution.

If i have the 4 -20mA going to a VFD that has a maximum of 120 Hz i can't get output frequencies very close together using only integers

You have 31209 possible outputs to the card, across a 16mA range. If you programmatically step through the domain and measure the output with a meter, for example, you will discover this.

If the Maximum number the analog output card will use is 31208, and I want to use some sort of calculation to get 11703, what calculation would I use? I need to divide 31208 by 2.666

If I use division, I can only get 15604 by dividing by 2, and 10402.6666666666 dividing by three.

all the outputs between 15604 and 10402 are unavailable to me..

this really is ridiculous, and it has blindsided me... I wasn't expecting this

I also meant the question in a different sense - what's being measured to determine the output value? What's the process?
 
Last edited:
As others have stated you can use an implied decimal point.
You are not going to get the exact number you want but you can get closer.

31208/2666=11.7 ( would be rounded to 12) then multiply by 1000 giving you 12000. Best you can do with your PLC.

Or 31208/266=117.32 rounded to 117 X 100 = 11700. You get the idea?

Upgrade.
 
Last edited:
all the outputs between 15604 and 10402 are unavailable to me..

Au contraire, mon frere! One just needs to think outside the box when using 20+ year old technology.

Dividing by 2.666 is the same as multiplying by 1/2.666, right?

2.666 can be represented by 2666/1000, right?

So if you take your integer, multiply by 1000, storing the product in a scratch register. The scratch register value is immaterial. Then double divide by 2666. Number x1000 too large, you say??? As mentioned earlier, that's where the DDV and 32-bit math register (S:13 & S:14) comes in.

I think you'll be pleasantly surprised by the result. Work it out the inversions on paper to make sure this jibes. I'm typing off the cuff here.
 
Au contraire, mon frere! One just needs to think outside the box when using 20+ year old technology.

Dividing by 2.666 is the same as multiplying by 1/2.666, right?

2.666 can be represented by 2666/1000, right?

So if you take your integer, multiply by 1000, storing the product in a scratch register. The scratch register value is immaterial. Then double divide by 2666. Number x1000 too large, you say??? As mentioned earlier, that's where the DDV and 32-bit math register (S:13 & S:14) comes in.

I think you'll be pleasantly surprised by the result. Work it out the inversions on paper to make sure this jibes. I'm typing off the cuff here.
That's fine I guess but I never did it and I don't know what you mean by it...what scratch register is immaterial? What is double divide... I gotta get this stupid thing going before 3 pm
 
I'm thinking that your input to the SCL function would be the frequency you want (0-120) and the rate would be 260. At 120 Hz, the output value would = 31,200.
 

Similar Topics

This is all pertaining to the Micro850 and modbus. A couple things: 1.) How do you read double words? I can read/write words but there's no...
Replies
4
Views
4,944
I am writing a program for a training course to use floats to control the inlet and outlet valves on a water tank. I've got the program done to...
Replies
2
Views
1,716
First off, I'd like to thank everyone on here. Although this is my first post this forum has always been very helpful. I am renovating a WWTP...
Replies
0
Views
1,936
PLC SLC5/04 i am doing some limit comparisons based on ranges coming from an analog input card. Thing is the analog input card will have a raw...
Replies
3
Views
1,644
Hello, I'm currently programming a MicroLogix 1400 in RSLogix Micro, and I'm trying to put data into FIFO queues. Would you know how to use the...
Replies
4
Views
5,028
Back
Top Bottom