Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Webvisualisation of a table using pointer

mpi
2015-08-06
2015-08-06
  • mpi - 2015-08-06

    Hello,

    I want to display 10 elements of an array of structure strucTab that has got 1000 elements using a table. I have then defined an pointer to an array of 10 elements of my structure and filled the Configure table/Table settings/Data Array with PLC_PRG.ptar1^

    PROGRAM PLC_PRG
    VAR
    Β  Β arr1:ARRAY [1..1000] OF strucTab;
    Β  Β ptar1: POINTER TO ARRAY [1..10]Β  OF strucTab;
    ...
    ptar1:=ADR(arr1[k]);
    

    I can then display 10 elements from index k.
    This code works fine in the Codesys environement but the table remains desperately empty with the webvisualisation, any idea ?

    Thank for your help

     
  • shooter - 2015-08-06

    a web vis is in java, and can not have pointers, as they must be in memeory and a webvis is on the PC.

     
  • mpi - 2015-08-06

    Thanks for this quick reply, though I would have preferred another one ..

     
  • shooter - 2015-08-06

    there are ways to get it done, without pointers.
    I always avoid pointers and try it to make it just in pure 61131 and some libraries (like oscat, not used in vis)
    make it yourself with placeholders.

     

Log in to post a comment.