Citect Scada 2018 - IOServer stops when transferring data between Array's

Hi,

When I try to move data from one array defined in Cicode to an array defined in Variable Table, the IOServer "halts" and sometimes stops and then restarts.

My Simple test code in Cicode Editor is as follow:
REAL HPCData[8760];
FUNCTION Transfer()
INT i;
FOR i = 0 TO 8760 DO
  HPCPerfDatahttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f4a1.svg = HPCDatahttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f4a1.svg;
END
The Variable Array HPCPerDatahttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f4a1.svg is defined as follow:
TagName: HPCPerDatahttps://softwareforums.aveva.com/cfs-file/__key/system/emoji/1f4a1.svg
I/O Device: GENERIC
Data Type: REAL
Address: R1[8760]
If I reduce the array size, the IOServer is not halted/stopped that frequently. As an array may have 32767 elements according to help files, this number should not be an issue.
Appreciate any input that can help enlighten what's going on and perhaps there are some good best practices in Citect on how to work efficient with Arrays. 
Thanks,
Rune
Parents
  • Hi Patrick,
    I tried SleepMS(0) but then the IOServer halted.

    I don't think I can avoid, please correct me if I'm wrong.
    I'm using the TrnGetTable to get data from the Trend database. This function does not allow me to use an Variable defined Array directly. Have to use a Cicode defined Array as a temporarily array.

    The end goal is to use the data in VBA and 3 party Active-X. My understanding is that the Array would have to be defined as an Variable array if both Cicode and VBA should have access to it. I'm not able to access an Cicode Array directly from VBA.

    Configuring Active-X with VBA is so much easier than with cicode. I think some features are not supported either in Cicode towards an active-x.

    If you have other tricks I'm open to test any suggestions.

    Rune
Reply
  • Hi Patrick,
    I tried SleepMS(0) but then the IOServer halted.

    I don't think I can avoid, please correct me if I'm wrong.
    I'm using the TrnGetTable to get data from the Trend database. This function does not allow me to use an Variable defined Array directly. Have to use a Cicode defined Array as a temporarily array.

    The end goal is to use the data in VBA and 3 party Active-X. My understanding is that the Array would have to be defined as an Variable array if both Cicode and VBA should have access to it. I'm not able to access an Cicode Array directly from VBA.

    Configuring Active-X with VBA is so much easier than with cicode. I think some features are not supported either in Cicode towards an active-x.

    If you have other tricks I'm open to test any suggestions.

    Rune
Children
No Data