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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 14th, 2020, 11:58 AM   #31
AustralIan
Member
Germany

AustralIan is offline
 
Join Date: Jan 2013
Location: Germany
Posts: 1,121
Someone must have a MicroLogix at hand they can perform a MUL 20077 -20423 on and post the results. We must know!
  Reply With Quote
Old January 14th, 2020, 11:34 PM   #32
PLCnovice61
Member
Australia

PLCnovice61 is online now
 
Join Date: Apr 2015
Location: home
Posts: 182
Micrologix 1000 Analog
20077 x -20423 = -32768
so it doesn't = -44,044,711, like it should
Attached Files
File Type: docx rs 500 mul.docx (116.6 KB, 3 views)

Last edited by PLCnovice61; January 14th, 2020 at 11:46 PM.
  Reply With Quote
Old January 15th, 2020, 04:07 AM   #33
PLCnovice61
Member
Australia

PLCnovice61 is online now
 
Join Date: Apr 2015
Location: home
Posts: 182
I didn't take notice re math overflow bit being set, so will redo shortly
  Reply With Quote
Old January 15th, 2020, 04:29 AM   #34
PLCnovice61
Member
Australia

PLCnovice61 is online now
 
Join Date: Apr 2015
Location: home
Posts: 182
So in the end no matter what l select in the status bits the monitor display gives 16 bit result -32768, status table gives a 32 bit result which is correct -42,044,711
Attached Files
File Type: pdf no overflow set.pdf (105.3 KB, 6 views)
File Type: docx flow1.docx (125.0 KB, 7 views)
  Reply With Quote
Old January 15th, 2020, 09:08 AM   #35
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,965
Both of those screen shots show the plc in program mode. Did you ever put the plc back in run mode with the overflow select bit set to the difference values?

Keith
  Reply With Quote
Old January 15th, 2020, 09:38 AM   #36
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 349
Quote:
Originally Posted by PLCnovice61 View Post
So in the end no matter what l select in the status bits the monitor display gives 16 bit result -32768, status table gives a 32 bit result which is correct -42,044,711
Thank you! I finally snagged one cheap off of eBay, but it will not be here until next week. You may think I am asking stupid questions now...

The -32768 16-bit INTEGER result suggests the [Math Overflow Selected S:2/14] bit is not affecting behavior as advertised in the help file.

I have attached a .ZIP; please try the .RSS in that archive; I expect the [Processor Type] in the [General] tab of the [Controller Properties] dialog will need to be changed to match your hardware.

Caveats, Anomalies and FFEs (Fat Finger Errors;-)
  • The N7:20 value in Rung 0002 (MUL.Source_A) should be 20,077,
    • but it is 2,077,
    • whilst the MOV in Rung 0001 correct.
    • but that should not matter in this case,
    • because the result is greater than 16M (2**24)
      • where any FLOAT conversion, if involved, would start dropping low bits
  • The N7:10 value could be -20,423 to match my original example,
    • instead of 20,243
    • but that only affect the actual bits, not the answer to the OP query.
Attached Files
File Type: zip minimul.zip (277.9 KB, 2 views)
  Reply With Quote
Old January 15th, 2020, 12:18 PM   #37
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 3,965
I may have misdirected the interpretation of the result. On an actual PLC I don't think S:2/14 will affect the result in the Dest field of the instruction. I think only the values in the status file can be used to get the correct result. This seems to be another thing that the emulator doesn't get quite right.

Keith
  Reply With Quote
Old January 16th, 2020, 06:34 PM   #38
PLCnovice61
Member
Australia

PLCnovice61 is online now
 
Join Date: Apr 2015
Location: home
Posts: 182
Just with MOV MUL the mirologix goes into fault when put into run mode, drbitboy code functions
Attached Files
File Type: docx micrologix Mul.docx (234.7 KB, 3 views)
File Type: docx micrologix MUL 2.docx (121.5 KB, 4 views)
  Reply With Quote
Old January 16th, 2020, 07:54 PM   #39
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,187
if the math overflow bit is set when the program starts rung 0 it will fault the processor
the trick is to cleat the fault bit on the last rung of the program
  Reply With Quote
Old January 16th, 2020, 08:34 PM   #40
PLCnovice61
Member
Australia

PLCnovice61 is online now
 
Join Date: Apr 2015
Location: home
Posts: 182
Ok, thanks GaryS, l did know about clearing the trap, just didn't put it in, same result but, without the error.
Attached Files
File Type: docx micrologix Mul.docx (243.8 KB, 5 views)
  Reply With Quote
Old January 16th, 2020, 09:06 PM   #41
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,187
it the way the PLC handles the different data types
with a real / float type they trim the lower bits to fit the are deemed to small in value to be any use.
with an it they don't do that that's why you should never mix the data types
  Reply With Quote
Old January 17th, 2020, 08:19 AM   #42
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 349
Thanks everyone!
  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 Emulate 5 and RSLogix Emulate 500 on Windows 7 Ravioli LIVE PLC Questions And Answers 4 September 29th, 2016 06:23 AM


All times are GMT -5. The time now is 02:22 AM.


.