Math

shahn4

Member
Join Date
Feb 2003
Location
Georgia
Posts
104
Any feedback on how to muliply when the result is greater than 32767 using Micrologix. The Float register is not available in Micrologix. The math results is available in S13 and S14 but how to retrieve it using a real number in Integer register. Thanks
 
Long Integer

Instead of putting the result in an N: integer file, how about using a L: long integer (32 bit) file (available on Micro 1500 & 1200)? That's basically what S:13/14 are.
 
Hey Shahn,

I may be off base with the micrologix, but is the F file available? (floating point) It is not limited to the 16 bit address that the integer files are...

If you could give us an example of what you are trying to compute, we may be able to come up with a 'workaround' for this problem. There are a few functions that you can try, such as double divide (DDV), etc...

Hoot
 
Hi Hoot,
Thanks for your reply and concerns.
In Allen-Bradley smaller SLC's eg Micrologix, flaoting files are not available. Integer N files are the only solution. In an existing application, I am trying to multiply a number larger than 32767 (max allowable for N files). The result may be as large as 9999999. My problem is how to store the results. If I store in an N files, I will be getting maximum of 32767, the rest will be last.
If it was mutilplied in a Float F register, I would end up having the entire result in F file.
Thanks
 
Fundamentally you aren't going to be able to do much with an integer of greater magnitude than +32767 in a MicroLogix 1000. It can't process Long Integers, and it can't process Floating Point, and those are the only ways to manage numbers that large.

There are workarounds for displaying an MUL result in an HMI (like a PanelView) but HootnHoller is right that we'd need to know just what you need to do before we can recommend a trick.

The 16-bit signed integer limitation is one of the big reasons that MicroLogix 1200 and 1500 have "Long Integer" data types that are 32-bit signed integers.
 
I just did som checking, the F floating point files are available with the micro 1200 rev C but not with the rev A. I believe these are actually 32 bit words. I understand that you can upgrage the A to a C by software alone.
 

Similar Topics

This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,296
Hi all. First time programming a machine of this type. A center driven unwind feeding to a center driven rewind. No dancers or load cells, just...
Replies
37
Views
4,714
Hello, Been a while since I posted , Still sucking air been a interesting 3.5 years the dreaded health with old age scenario. Back at it and had a...
Replies
11
Views
2,030
Hello: Some time ago I wrote some basic code for a GuardLogix, in which I needed to add and subtract tags of LINT data type. When tried to use the...
Replies
13
Views
3,666
I have a customer who has a centrifuge application. The plant engineer did all the calculations on the centrifuge to arrive at a WK^2 of 6458...
Replies
14
Views
3,505
Back
Top Bottom