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 June 11th, 2018, 03:39 PM   #16
bernie_carlton
Lifetime Supporting Member + Moderator
United States

bernie_carlton is offline
 
bernie_carlton's Avatar
 
Join Date: Apr 2002
Location: Yakima, Washington
Posts: 6,226
The PLC is using 32 bit reals. The PC computation is probably using 64 bit reals.
__________________
Controlling outputs is the PLC's way of getting its inputs to change.

www.thePLCguy.com
  Reply With Quote
Old June 11th, 2018, 03:47 PM   #17
Sapper307
Member
United States

Sapper307 is offline
 
Join Date: Nov 2017
Location: Maryland
Posts: 87
Does AB have an LREAL double precision floating point data type? 64 bits can allow for some pretty big numbers.
  Reply With Quote
Old June 11th, 2018, 04:00 PM   #18
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,372
Quote:
Originally Posted by Sapper307 View Post
Does AB have an LREAL double precision floating point data type? 64 bits can allow for some pretty big numbers.

No
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old June 11th, 2018, 04:07 PM   #19
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 230
The precision of floating point numbers is finite.

The problem is with how many decimal digits of precision do you want to be represented, a 32bit REAL can only offer approximately 7 digits, if it's represented with more than 7 the rest is garbage.

Instead a 64bit REAL offers up to 14.
__________________
Suppanel HMI
Beta Testers
  Reply With Quote
Old June 11th, 2018, 04:12 PM   #20
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 230
AB Micro820 has 64bit LREAL data type
__________________
Suppanel HMI
Beta Testers
  Reply With Quote
Old June 11th, 2018, 04:17 PM   #21
daba
Lifetime Supporting Member + Moderator
United Kingdom

daba is offline
 
daba's Avatar
 
Join Date: Jul 2004
Location: uk
Posts: 4,372
Quote:
Originally Posted by lfe View Post
AB Micro820 has 64bit LREAL data type

But does it do 64-bit floating-point math ?
__________________
___________________________
ControlLogix & SLC Training
a-b train ltd.
abtrain@tiscali.co.uk
www.abtrain.co.uk
tel: 07506 73 9999
nil illegitimi carborundem


  Reply With Quote
Old June 11th, 2018, 06:33 PM   #22
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 680
Here's a link to a good explanation of the IEEE numbers

https://en.wikipedia.org/wiki/IEEE_754-1985
  Reply With Quote
Old June 11th, 2018, 07:23 PM   #23
Aabeck
Member
United States

Aabeck is offline
 
Aabeck's Avatar
 
Join Date: Feb 2013
Location: Detroit
Posts: 969
Isn't this what the Basic card was for?

The real number in a SLC was limited to 7 digits, if more were entered it rounds the 7th digit, adding an EE if needed.

In a ControlLogix it is limited to 9 digits (on my computer)
__________________
Never underestimate the quality of idiots that will be running your machines
http://aabeck.com
  Reply With Quote
Old June 12th, 2018, 07:36 AM   #24
AustralIan
Member
United Kingdom

AustralIan is offline
 
Join Date: Jan 2013
Location: UK
Posts: 752
32 bit floats are so last millennium.

On the topic of 64 bit floats.. excel uses a modified ieee 64 bit float which has the same precision regardless of number, whereas 64 bit reals conforming to ieee standard have MORE precision than excel, albeit a variable precision. So if you do a 64 bit math in excel and a 64 bit math on a PLC, you may have slightly different answers.
  Reply With Quote
Old June 12th, 2018, 09:16 AM   #25
rootboy
Lifetime Supporting Member
United States

rootboy is offline
 
rootboy's Avatar
 
Join Date: Jan 2004
Location: Tennessee
Posts: 1,305
Quote:
Originally Posted by lfe View Post
The precision of floating point numbers is finite.
Exactly. You've got a limited number of bits available for the mantissa, so expect a limited answer. You don't get Pi to a quadrillion places on your '80's era solar-powered calculator either. Everything has its limits.

Although I would have expected it to get the whole number portion of the answer correct. Call me picky...

Searching for "Arbitrary Precision" will lead to any number of calculators that will pump out various lengths of precision. Some of them with *less* precision (go figure), and some even incorrect.

This is what I get over at: https://www.mathsisfun.com/calculator-precision.html

221383538.5323974358974358974358974358974358974358 97435897435897435897435897435897435897435897435897 43589743589743589743589743589743589743589743589743 58974358974358974358974358974358974358974358974359


As a side note, do any other old-timers here remember the Pi wars from the early days of hand-held calculators? Pi was calculated or stored differently depending on the TI and HP brands.

And does anyone know the fraction that was used to approximate Pi?
__________________
Just because you can doesn't mean that you should...
  Reply With Quote
Old June 12th, 2018, 02:57 PM   #26
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 230
Quote:
Originally Posted by daba View Post
But does it do 64-bit floating-point math ?
On a Micro820, all are LREAL variables, just the same result than EXCEL

__________________
Suppanel HMI
Beta Testers
  Reply With Quote
Old June 12th, 2018, 04:06 PM   #27
AustralIan
Member
United Kingdom

AustralIan is offline
 
Join Date: Jan 2013
Location: UK
Posts: 752
Quote:
Originally Posted by lfe View Post
On a Micro820, all are LREAL variables, just the same result than EXCEL
I disagree, micro820 uses ieee 64 bit floats, where excel uses a modified version. I would describe the results as similar but not the same.
  Reply With Quote
Old June 12th, 2018, 04:18 PM   #28
lfe
Member
France

lfe is offline
 
Join Date: Jun 2007
Location: Barcelona
Posts: 230
Quote:
Originally Posted by AustralIan View Post
I disagree, micro820 uses ieee 64 bit floats, where excel uses a modified version. I would describe the results as similar but not the same.
Then the modified version of excel generates exactly the same 15 most significant decimal digits ...
__________________
Suppanel HMI
Beta Testers
  Reply With Quote
Old June 12th, 2018, 04:22 PM   #29
Bit_Bucket_07
Member
United States

Bit_Bucket_07 is offline
 
Bit_Bucket_07's Avatar
 
Join Date: Feb 2013
Location: Southeast US
Posts: 1,401
Quote:
Originally Posted by rootboy View Post
And does anyone know the fraction that was used to approximate Pi?
355/113 is a very close approximation of Pi, much closer than is 22/7.
__________________
  Reply With Quote
Old June 13th, 2018, 08:24 AM   #30
Engineer_MG
Member
United States

Engineer_MG is offline
 
Engineer_MG's Avatar
 
Join Date: Mar 2012
Location: USA
Posts: 73
Hi,

This is what I got in my software(SoMachine/CoDeSys).

Thanks.
Attached Images
File Type: jpg Compute_SoMachine2.jpg (82.2 KB, 68 views)
__________________
Ms. Mohua Ghosh
Senior Application Design Engineer
Schneider Electric , USA

Last edited by Engineer_MG; June 13th, 2018 at 08:27 AM.
  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
Wrong Select: Modul select 0 -20 mA to Device 4 - 20 mA Herbrata LIVE PLC Questions And Answers 10 August 16th, 2016 08:19 PM
What's wrong with my factorytalk system? seuzhang LIVE PLC Questions And Answers 0 November 5th, 2008 08:36 PM
Power Flex drive outputting wrong speed to user's plc BTL_Man LIVE PLC Questions And Answers 1 March 3rd, 2008 05:36 PM
OT - Multiplication and PLCs RMA LIVE PLC Questions And Answers 4 September 6th, 2005 06:33 AM
Hello!help To Stop Down Loading Wrong plcbuddy LIVE PLC Questions And Answers 1 August 29th, 2003 01:20 PM


All times are GMT -5. The time now is 04:17 AM.


.