Micrologix 1400

George,

What happens if you do as I subjected and leave source B as a constant.

I don't have the software on this computer.

Edit: I see MikeStew posted my answer, thanks.
 
OK, good for you and good on Mickey for advising you well.

I was not going to be so "helpful" so quickly. But for good reasons. I wanted you to learn as you go more so than telling you what to do upfront.

This is to answer your last question as to why you might not want to use an integer as the destination here...

My initial thoughts on the rounding were to sort your Online Edit issue and then see did you realize the results of multiplying an integer by a fractional value and storing it in a integer was perhaps not as you would have expected it to be i.e. an unexpectedly "rounded result". Had you returned to say as such I would then have realized that you have a basic misconception as to how such arithmetic instructions execute and how such data types store their values. I would then have gone on to explain the basics.

As Mickey "pulled the trigger" early on that one you have now jumped to the end of the "lesson" with a possibly more pleasing "unrounded result", but still asking "what was I doing wrong?"

But that's OK...

You are allowed to use an integer destination here, and using the float as a constant would have worked, as my examples have shown. But it results in rounding in the destination integer because the integer data type can only store whole numbers and not fractional parts i.e "1", but not "1.5". So the instruction performs the necessary rounding to produce the resultant whole number value that must be stored in the integer destination...

Example:

Source A N7:2 = 54

Source B F8:7 = 0.7

Dest N7:7 = 38 <<< rounded result

But you must use a float as the constant in between two integers or else it will error! The operands do not match (Source B and Dest).

If you were expecting the destination integer to store a real, or float value i.e. a whole number plus fractional part (1.5), then it will not and the resultant rounded value may not be too your liking. Whether this rounding is important to your goal here or not, only you can decide, unless you explain a little more what you had hoped to achieve here, then we could advise you as such. I had also considered that you do know what you're doing here and had intentionally chosen an integer destination while multiplying with a fractional value.

So as it stands, you have an integer whole number being multiplied by a fractional constant, and the result now being stored in a float destination. This will yield an "unrounded result", as I'm sure you are now aware...

Example:

Source A N7:2 = 54

Source B 0.7

Dest F8:7 = 37.8 <<<unrounded result

You can use a constant here because the operands match (Source B and Dest)

Both methods are valid and both have their uses. If you require accuracy in the result, then use a float destination (example: process control). If you require less accuracy and a rounded whole number result is OK, then use an integer destination (example: display a rough value), but don't forget to use a float for the constant if its fractional.

As for this anomaly with using a fractional constant in between two integer data types in a MUL instruction; it appears as though it's been around a while and it's here to stay, as they don't seem to have corrected it since 2008...

51613 - RSLogix 500 error: operand sizes do not match
Access Level: Everyone

That "rounds" my evening off nicely and I can head home now as its the start of my "technology downtime" for the weekend.

Have a good one.

Regards,
George
 
Last edited:
Not everything for Mircologix can done online. Check the manual or like above do offline and try to download.

One of the only things I've found out is you can not add new data table addresses that has not been pre-configured while doing online edits.

Other than that, have no issues.
 
Quick clarification...

padees said:
One of the only things I've found out is you can not add new data table addresses that has not been pre-configured while doing online edits...

That is correct, but it's not the only thing you cannot edit online...

37647 - MicroLogix processors that support online edits
Access Level: TechConnect

For the MicroLogix controllers that support online editing, namely the MicroLogix 1100 and 1400, the online editing of PTO, PWM and MSG instructions is not permitted while in RUN Mode. All other possibilities of online editing ladder logic is supported. However, the popup error message, when attempting any of the above, is different to MikeStew's error message back in Post #1.

Regards,
George
 

Similar Topics

hi to all, have anyone tried to communicate Schneider PM800 to a ML1400 through rs485? i am having an issue with it just receiving message...
Replies
1
Views
36
Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
103
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
134
Hi, I am working with a Micrologix 1400 model 1766-L32BXB. With no input wires connected to the “in12” thru “in19”, I am getting 24 volts while...
Replies
4
Views
251
Hi everyone, I hope I don't butcher this up, please feel free to critique me wherever if I do, I have an issue I would equate to "chasing...
Replies
4
Views
351
Back
Top Bottom