How can we help you today?

An Unhandled Exception appears when I type an opening parenthesis to instantiate a function call in Structured Text

Issue
In EcoStruxure Machine Expert / SoMachine, after declaring a Function Block in a POU's declaration area previously, if I type an opening parenthesis "(" after typing the name of the function block in Structured Text language, an Unhandled Exception message pops up starting with:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at . . (String , ISignature& , LList`1& )
at . . (String , IVariable& , ISignature& , IPrecompileScope& )
at . . (VariableExpression )
at _3S.CoDeSys.LanguageModelManager.VariableExpression. ( )
at _3S.CoDeSys.LanguageModelManager.PreCompileContext.FindSubelements(Guid guidSignature, String stAccessPathOrType, FindSubelementsFlags flags, Boolean& bError)
at _3S.CoDeSys.IECTextEditor.IECTextEditor.GetQuickTipData(String accessPath)
at _3S.CoDeSys.IECTextEditor.TokenMarker.GetQuickTipForPosition(SynEdControl syned, Int32 position, QuickTipData& quickTipData, Int32& quickTipPosition)


Product Line
EcoStruxure Machine Expert / SoMachine

Environment
PLC Configuration Software

Cause
The likely cause is that if the POU where the Function Block is defined is Excluded from Build, the context lookup will not be able to auto-complete the phrase.

Resolution
Steps:
  1. Find the POU that has the declaration of the Function Block you wish to use in it that is Excluded from Build. The node that are excluded from build will appear as light-blue text under Application.
  2. Right-click on the POU where the Function block is declared (it may be different than the POU that you are writing the Structured Text program).
  3. Select Properties
  4. Click on the "Build" tab
  5. Untick "Exclude from build"
  6. Click OK
POU

If this FAQ did not solve your issue, you can chat with us at chat with us or e-mail us at customer.services@se.com to create a case with our Technical Support Team.

If you are not located in North America, please contact your local Customer Care Center for assistance:
Support | Schneider Electric Global (se.com)

Schneider Electric Canada

Explore more
Range:
Users group

Discuss this topic with experts

Visit our community and get advice from experts and peers on this topic and more
Explore more
Range:

Need help?

Need help?

Product Selector

Product Selector

Quickly and easily find the right products and accessories for your applications.

Get a Quote

Get a Quote

Start your sales inquiry online and en expert will connect with you.

Where to buy?

Where to buy?

Easily find the nearest Schneider Electric distributor in your location.

Help Center

Help Center

Find support resources for all your needs, in one place.

  • Help and Contact Center
  • Contact Sales
  • Find our Offices
  • Where to Buy
  • Careers
  • Company Profile
  • Investors
  • Newsroom
  • Report a Misconduct
  • Product Documentation
  • Product Selectors
  • Software and Firmware
  • Product Substitution and Replacement
  • Blog
  • Events
  • Schneider Electric Community
  • Sustainability
  • Legal Information
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings