Sign In Help
Schneider Electric
HelpSign In
Schneider Electric Exchange
  • Home
  • Collaborate
  • Develop
  • Shop
Home Collaborate Develop Shop Log in or Register Help

Invite a Co-worker

Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel

Invitation Sent

Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
  • Home
  • Collaborate
  • Exchange Community
  • :
  • Industrial Automation
  • :
  • Industry Automation and Control Forum
  • :
  • Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic
Community Menu
  • Forums
    • By Topic
        • EcoStruxure IT
          • EcoStruxure IT forum
        • Industrial Automation
          • Industry Automation and Control Forum
          • Alliance System Integrators Forum
          • Machine Solutions in the Digital Transformation
          • EcoStruxure Automation Expert / IEC 61499 Forum
          • Industrial Edge Computing Forum
          • Level and Pressure Instrumentation Forum
          • Modicon User Group
          • PLC Club Indonesia
          • SEE Automation Club Forum
          • Fabrika ve Makina Otomasyonu Çözümleri
          • Форум по промышленной автоматизации СНГ
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Forum
          • SCADA and Telemetry Devices Forum
        • Power Distribution IEC
          • Power Distribution and Digital
          • Power Standards & Regulations
          • Paneelbouw & Energie Distributie
        • Power Distribution Softwares
          • EcoStruxure Power Design Forum
          • SEE Electrical Building+ Forum
          • LayoutFAST User Group Forum
        • Solutions for your Business
          • Solutions for Food & Beverage Forum
          • Solutions for Healthcare Forum
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Forum
        • Healthcare
          • Solutions for Healthcare Forum
      • EcoStruxure IT
        • EcoStruxure IT forum
      • Industrial Automation
        • Industry Automation and Control Forum
        • Alliance System Integrators Forum
        • Machine Solutions in the Digital Transformation
        • EcoStruxure Automation Expert / IEC 61499 Forum
        • Industrial Edge Computing Forum
        • Level and Pressure Instrumentation Forum
        • Modicon User Group
        • PLC Club Indonesia
        • SEE Automation Club Forum
        • Fabrika ve Makina Otomasyonu Çözümleri
        • Форум по промышленной автоматизации СНГ
      • SCADA & Telemetry Solutions
        • Geo SCADA Expert Forum
        • SCADA and Telemetry Devices Forum
      • Power Distribution IEC
        • Power Distribution and Digital
        • Power Standards & Regulations
        • Paneelbouw & Energie Distributie
      • Power Distribution Softwares
        • EcoStruxure Power Design Forum
        • SEE Electrical Building+ Forum
        • LayoutFAST User Group Forum
      • Solutions for your Business
        • Solutions for Food & Beverage Forum
        • Solutions for Healthcare Forum
      • Food & Beverage
        • Solutions for Food & Beverage Forum
      • Healthcare
        • Solutions for Healthcare Forum
  • Blogs
    • By Topic
        • Industrial Automation
          • Industrial Edge Computing Blog
          • Industry 4.0 Blog
          • Industrie du Futur France
        • SCADA & Telemetry Solutions
          • SCADA and Telemetry Blog
        • Power Distribution IEC
          • Power Events & Webinars
          • Power Foundations Blog
        • Power Distribution NEMA
          • NEMA Power Foundations Blog
        • Power Distribution Softwares
          • EcoStruxure Power Design Blog
          • SEE Electrical Building+ Blog
        • Solutions for your Business
          • Solutions for Food & Beverage Blog
          • Solutions for Healthcare Blog
          • Solutions for Retail Blog
    • By Segment
        • Food & Beverage
          • Solutions for Food & Beverage Blog
        • Healthcare
          • Solutions for Healthcare Blog
        • Retail
          • Solutions for Retail Blog
      • Industrial Automation
        • Industrial Edge Computing Blog
        • Industry 4.0 Blog
        • Industrie du Futur France
      • SCADA & Telemetry Solutions
        • SCADA and Telemetry Blog
      • Power Distribution IEC
        • Power Events & Webinars
        • Power Foundations Blog
      • Power Distribution NEMA
        • NEMA Power Foundations Blog
      • Power Distribution Softwares
        • EcoStruxure Power Design Blog
        • SEE Electrical Building+ Blog
      • Solutions for your Business
        • Solutions for Food & Beverage Blog
        • Solutions for Healthcare Blog
        • Solutions for Retail Blog
      • Food & Beverage
        • Solutions for Food & Beverage Blog
      • Healthcare
        • Solutions for Healthcare Blog
      • Retail
        • Solutions for Retail Blog
  • Ideas
        • Industrial Automation
          • Modicon Ideas & new features
        • SCADA & Telemetry Solutions
          • Geo SCADA Expert Ideas
          • SCADA and Telemetry Devices Ideas
  • Knowledge Center
    • Building Automation Knowledge Base
    • Industrial Automation How-to videos
    • Ask Exchange
    • Digital E-books
    • Success Stories Corner
    • Power Talks
  • Events & Webinars
  • Support
    • User Guide
    • Leaderboard
    • Releases Notes
How can we help?
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
49250members
Join Now
242460posts
Join Now

Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Back to Industry Automation and Control Forum
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-06-25 04:59 PM
0 Likes
5
707
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-25 04:59 PM

Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

Hi,

 

I have a piece of code that is used for a linear congruential psuedo-random number generator, however one of the arithmetic operations deliberately overflows.  I know that this will happen, it's entirely expected behaviour, and I don't wish to have additional code that will alter this behaviour (since this existing code has already been characterised, and I don't wish to revisit this).

 

How would I go about disabling the diagnostic reporting of this particular arithmetic overflow however?

I was expecting that there would be an EF that could be called prior to the operation, passing in a mask of arithmetic errors, and then I could call the same EF afterwards to restore the previous mask.

 

Has anyone done something similar?

 

It becomes quite an issue that the fault light comes on, and requires someone to access the controller and acknowledge this 'fault'.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Labels
  • Smart Design & Engineering
Tags (1)
  • Tags:
  • english
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
5 Replies 5
Alpenglow
Crewman Alpenglow
Crewman
‎2020-06-25 05:15 PM
1 Like
4
701
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-25 05:15 PM

Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

If you look at Help you'll see that %S18 directly addresses our overflow error.  However, if you read towards the bottom you'll see the following:

 

"When the %S18 bit switches to 1, the application stops in error state if the %S78 bit has been set to 1". 

 

%S78 is the "halt if error" occurs.  You could try writing a 0 to %S78 so that if the error occurs (i.e. overflow) at %S18 then it won't make any difference because the conditional bit (%S78) is not set to 1.  

Blue side up.
Tags (1)
  • Tags:
  • english
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-06-25 05:47 PM
0 Likes
3
696
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-25 05:47 PM

Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

%S78 doesn't stop the 'error' from being entered in the Diagnostics Logs, and flashing the fault light.

It just changes whether that results in the process HALTing also.

 

I do NOT have %S78 set, so the HALT isn't my problem.  The diagnostic entry, and fault light behaviour is.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (1)
  • Tags:
  • english
Share
Reply
Alpenglow
Crewman Alpenglow
Crewman
‎2020-06-25 05:56 PM
1 Like
2
690
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-25 05:56 PM

Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

Yes you are correct.  Perhaps I misunderstood. 

 

I do not know of any method to prevent such an error occurring. 

 

 

All the best. 

Blue side up.
Tags (1)
  • Tags:
  • english
Share
Reply
Eric_Coudurier
Lieutenant Eric_Coudurier Lieutenant
Lieutenant
‎2020-06-26 02:34 PM
1 Like
1
661
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-26 02:34 PM

Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

There is no way to prevent the overflow error, but you can just reset the overflow bit after the execution of your function. Or prevent the execution of the function if it will lead to an overflow. The system diagnostic can be disabled if you don’t want to log this kind of errors.

Tags (1)
  • Tags:
  • english
Share
Reply
BevanWeiss
Admiral BevanWeiss
Admiral
‎2020-06-26 09:07 PM
0 Likes
0
656
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content
‎2020-06-26 09:07 PM

Re: Unity Pro / Control Expert: How to 'suppress' arithmetic overflow diagnostic entry via logic

Thanks @Eric_Coudurier,

So if I was doing this:

PrevSW125 := %SW125;
PrevS18 := %S18;
cong := 69069*cong+1234567;
%SW125 := PrevSW125;
%S18 := PrevS18;

 

What is expected to be 'different'.. it appears to still generate the system diagnostic log entry, and I suspect that it will still flash the fault light.

 

I really don't want to just turn off the system diagnostics, since it's incredibly useful for other situations, like genuine code errors (e.g. index array out of bounds, PIDIFF instructions with inf/sup set to the same values etc).

 

Unfortunately the overflow is a part of the operation.  A MODulus could be performed.. but it's already using a UDINT, so there's no bigger elementary type that I could use to fit the operation and then MOD it back down (right?)

 

Converting to a REAL for the dynamic range will ruin the entire psuedo-random behaviour of it (NOTE: I'm not using this for cryptography, so the trivial prediction of the sequence is not an issue... but the 'random' distribution of results is necessary)

 


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
Tags (1)
  • Tags:
  • english
Share
Reply
Top Experts
User Count
andrea_romacco
Crewman andrea_romacco
1
Fleo
Crewman Fleo
1
sesa25402
Administrator sesa25402 Administrator
1
See More Top Experts
Find a Service Provider
Find a certified partner to help you address your integration, installation, maintenance and project needs.
View all Providers
Support

Have a question? Please contact us with details, and we will respond.

Contact Us
FAQ

Look through existing questions to find popular answers.

Learn More
About

Want to know more about Exchange and its possibilities?

Learn More

Full access is just steps away!

Join Exchange for FREE and get unlimited access to our global community of experts.

Connect with Peers & Experts

Discuss challenges in energy and automation with 30,000+ experts and peers.

Get Support in Our Knowledge Base

Find answers in 10,000+ support articles to help solve your product and business challenges.

Ask Questions. Give Solutions

Find peer based solutions to your questions. Provide answers for fellow community members!

Register today for FREE

Register Now

Already have an account?Log in

About Us FAQ Terms & Conditions Privacy Notice Change your cookie settings
©2020, Schneider Electric