Axis references in visualization

2017-06-02
2020-09-14
  • TotalPACkage

    TotalPACkage - 2017-06-02

    Hello,

    I have created a library of function blocks and a visualization which calls those function blocks to allow ease of use. When in the library project the visualization works great, when pulled from the library in a separate project the axis links are not recognized, error code "C0046: Identifier 'X' not defined".

    My visualization is composed of several programs to handle the visualization behavior and to call the function blocks required. The function blocks use the VAR_IN_OUT variable Axis of type AXIS_REF_ETC_DS402_CS. This axis input is assigned "X" in the programs, which is the name of the axis in the device tree. The function blocks are written to the PLC Open Compliant Libraries standard version 1.0.

    I have a suspicion there is either a different way to reference axes in the device tree (pointers?) or I have structured my visualization incorrectly.

    Any thoughts, ideas, questions? Any feedback would be appreciated. Thanks!

     
  • josepmariarams

    josepmariarams - 2017-06-04

    Can you post an screen capture of visu varuables definition and some capture of the fb variables dwfinition?

     
  • TotalPACkage

    TotalPACkage - 2017-06-05

    Josep M. Rams hat geschrieben:
    Can you post an screen capture of visu varuables definition and some capture of the fb variables dwfinition?

    Hi Josep,

    Sure. I don't have any visu definitions in the Interface Editor. I am using visu buttons to directly manipulate variables in the program associated with the visualization.
    For instance the enable button uses the "execute ST-code" input configuration (OnMouseClick) to enable function block inputs and variable states to control button colors. see image attached.

    In terms of the axis definitions, within the program a function block is called and the axis name is assigned to the axis input. This works in the project that the visualization is designed in but when I generate a library with this visu, the references I use for the axis input does not work. This can be seen in the image attached with the axis name "X" and this axis input "Axis".

    I hope this clarifies the problem.

    IMG: EnableButtonConfiguration.PNG

    IMG: EnableButtonProgramLogic.PNG

     
  • josepmariarams

    josepmariarams - 2017-06-06

    Hi.

    The code you have post is from the library you are creating?

     
  • TotalPACkage

    TotalPACkage - 2017-06-07

    Josep M. Rams hat geschrieben:
    Hi.
    The code you have post is from the library you are creating?

    Hi Josep,

    I have solved my problem. The code posted was indeed part of the project but has since been re-written to solve my issue.

    In case anyone is interested, the structure of my visualization was incorrect. The axis references were not being recognized because the visualizations were not associated to a function block correctly. I needed to include a reference to a function block in the interface editor of the visu and create a function block with the correct axis associations to pair with the VISU.

    For this reason I removed all programs previous used, created function blocks for each visu window, and created a main function block with all the correct program logic and other fb calls. With this structure the user must only create a program, add the main visualization function block with axis reference, and associate the visualization to the visualization function block.

    This is how the MC_etc. function blocks behave as well.

    IMG: VisuStruct.PNG

     

Log in to post a comment.