Showing results 1 to 2 of 2

Thread: Logic, a loop for an array with type variables

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    09.04.2015
    Posts
    17

    Default Logic, a loop for an array with type variables

    Hello,

    I have a type BatteryInRack:
    Voltage: real;
    Ready: bool;

    and a type BatteryRack:
    Battery1: BatteryInRack
    Battery2: BatteryInRack
    Battery3: BatteryInRack
    ...

    I have in Logic a variable:
    BatteryRack: BatteryRack

    I try to assign a value to the Voltage value, for example:
    Code:
    for i:= 1 to 3 doBatteryRack[i]:= i;end_for;
    But it isn't work.

    Is there a way to assign the value in a Loop?

    Thank you in advance.



    Attached Thumbnails Attached Thumbnails Types.PNG   variable.PNG  

Similar Threads

  1. Passing variables to an array by reference
    By jesus_michel in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 3
    Last Post: 27th February 2018, 18:23
  2. Writing status bits on Zenon Logic Global Variables
    By maurodx in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 2
    Last Post: 6th November 2017, 13:26
  3. Exposing Zenon Logic variables to be accessed via MODBUS TCP/IP
    By mbi in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 5
    Last Post: 20th October 2015, 09:13
  4. Array and licensed I/O variables
    By florian in forum zenon Service Engine Supervisor
    Replies: 1
    Last Post: 2nd June 2015, 07:35
  5. zenon logic doesn't communicate with external variables in zenon
    By mashjj in forum Engineering Studio Logic & Logic Service (former zenon Logic Workbench & Runtime)
    Replies: 6
    Last Post: 27th February 2015, 13:10

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
  •