Our Brands

Welcome to the Schneider Electric Website

Welcome to our website.
		
How can we help you today?
Why does my Function Block not write values to variables assigned to VAR_IN_OUT pins in EcoStruxure Machine Expert HVAC?

Issue
The IEC61131-3 standard dictates that a function block should be able to both read from and write to VAR_IN_OUT class pins.
When I am creating a Function Block in EcoStruxure Machine Expert HVAC for the Modicon M172 PLC, and in my function block, I am writing to a VAR_IN_OUT pin, the value of the variable is not changed when I run the program.

Product Line
EcoStruxure Machine Expert - HVAC

Cause
By default, VAR_IN_OUT in EcoStruxure Machine Expert HVAC works by Value and not by Reference.

Resolution
In order to enable it to function by reference you have to enable the proper option in Application > Project Options menu.

Programming Tab > Project dropdown > Options

In the Project options dialog popup, navigate to the Code generation tab.

Tick the checkbox row named "VAR_IN_OUT by reference (IEC standard=yes)" shown below.
(Note that it is not set to ticked by default)

Project options > Code generation tab

Schneider Electric Hong Kong

Explore more
Range:
Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range:

Need help?

  • Start here!

    Find answers now. Search for a solution on your own, or connect with one of our experts.

  • Contact Support

    Reach out to our customer care team to receive more information, technical support, assistance with complaints and more.

  • Where to buy?

    Easily find the nearest Schneider Electric distributor in your location.

  • Search FAQs

    Search topic-related frequently asked questions to find answers you need.

  • Contact Sales

    Start your sales enquiry online and an expert will connect with you.

I'd like to receive news and commercial info from Schneider Electric and its affiliates via electronic communication means such as email, and I agree to the collection of information on the opening and clicks on these emails (using invisible pixels in the images), to measure performance of Schneider Electric's communications and to improve them. For more details, please read our Privacy Policy.

  • Products Documentation
  • Software Downloads
  • Product Selector
  • Product Substitution and Replacement
  • Help and Contact centre
  • Find our Offices
  • Get a Quote
  • Where to buy
  • Careers
  • Company Profile
  • Report a misconduct
  • Accessibility
  • Newsroom
  • Investors
  • EcoStruxure
  • Job Search
  • Blog
  • Privacy Policy
  • Cookie Notice
  • Terms of use
  • Change your cookie settings
Your browser is out of date and has known security issues.

It also may not display all features of this website or other websites.

Please upgrade your browser to access all of the features of this website.

Latest version for Google Chrome, Mozilla Firefox or Microsoft Edgeis recommended for optimal functionality.