Skip to content

Variables in blocks used on program are not mapped #240

Description

@thiagoralves

Expected Behavior

If I insert a Function or Function Block, for example, TON, I expect that all its internal variables (i.e. PT, ET, Q) are accessible on my program

Current Behavior

Variables are not listed in autocomplete and can't even be added to contacts or coils

Steps to Reproduce

  1. Create a project using LD
  2. Create a new rung
  3. Insert a TON block and name its variable TON0
  4. Create another rung
  5. Add a contact
  6. Try to associate TON0.Q to the contact (the editor won't let you do it)

Possible Solution (Not obligatory)

Map all blocks variables into the list of possible variables for the autocomplete and editor check. For example, TON0.Q is a BOOL and can be added to contacts and coils.

Context

It is very practical to check, for example, TON0.Q to know if a timer has expired anywhere in the program.

Image

Your Environment

  • App version : 4.0.3-beta
  • Branch : main
  • Operating System and version : MacOS Sequoia 15.4.1 Intel-based

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions