Showing results 1 to 5 of 5

Thread: Arrays with variable length

  1. #1
    Join Date
    04.04.2018
    Posts
    2

    Default Arrays with variable length

    Hello,
    I would like to know how to declare arrays with variable length in Zenon Logic?

    I need to create an UDFB with 2 data set from variable length.
    Objective would be to call twice the same FB with different dataSets
    Code:
    fbMyFunction(dataSet1);// Array from 5
    
    fbMyFunction(dataSet2);// Array from 10
    According to IEC-61131-3, it should be possible to declare arrays with variable length as following
    Code:
    arrMyArray   : ARRAY[*] OF LREAL;
    And then use functions LOWER_BOUND and UPPER_BOUND to find the limits from the array.

    Thanks for your help

  2. #2
    Join Date
    08.12.2015
    Posts
    39

    Default Re: Arrays with variable length

    Hello,

    In zenon Logic, this is not possible to do this.
    But this could be an interesting feature, I will add it in our Functionality Suggestions list and ask if it could be implemented for the next releases.

    I wish you a nice weekend,
    Anthony

  3. #3
    Join Date
    05.12.2018
    Posts
    1

    Default Re: Arrays with variable length

    Quote Originally Posted by anthony.burille View Post
    Hello,

    In zenon Logic, this is not possible to do this.
    But this could be an interesting feature, I will add it in our Functionality Suggestions list and ask if it could be implemented for the next releases.

    I wish you a nice weekend,
    Anthony


    Good morning,

    can you give an update on the current status of this functionality?

    I am working on a use case where I have an input array of boolean variables of different length (in the range of 1 to 250) and I need to implement a simple OR which takes the array as input.
    Is this currently possible with zenon logic?

    All the best,
    Nikolas Rieble

  4. #4
    Join Date
    23.10.2018
    Posts
    12

    Default Re: Arrays with variable length

    Quote Originally Posted by Rieble View Post


    Good morning,

    can you give an update on the current status of this functionality?

    I am working on a use case where I have an input array of boolean variables of different length (in the range of 1 to 250) and I need to implement a simple OR which takes the array as input.
    Is this currently possible with zenon logic?

    All the best,
    Nikolas Rieble

    Hello Nikolas,

    Sorry for the late reply…

    After investigating on this feature we finally decided that this will not be implemented. This is too complicated as the whole compiler must be rearranged.

    Anyway, with the help of straton Development Kit, this is possible to create your own C blocks and to make it possible.

    Best regards,
    Anthony

  5. #5
    Join Date
    28.09.2019
    Posts
    1

    Default Re: Arrays with variable length

    Thank you! Walmartone
    Last edited by delrein : 5th October 2019 at 04:41 Reason: To make it better

Similar Threads

  1. The length of time column
    By parisamoosavi in forum zenon Supervisor
    Replies: 1
    Last Post: 27th October 2014, 14:27
  2. String length field for STRING variables.
    By stolyarov_as in forum zenon Supervisor
    Replies: 3
    Last Post: 11th January 2013, 07:49
  3. Tooltip length is too short
    By stolyarov_as in forum zenon Supervisor
    Replies: 2
    Last Post: 9th March 2012, 01:03
  4. Replies: 1
    Last Post: 2nd August 2011, 10:21
  5. Replies: 1
    Last Post: 23rd July 2011, 08:51

Tags for this Thread

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •