Welcome, Guest
Username: Password: Remember me

TOPIC: st problem

st problem 1 year 6 months ago #3242

  • sezgin
  • sezgin's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
Hello.
I can't get the data from the array.
Please help.

int i;
float array[10];
for ( i=0;10;1)
{
array=Tags.HLK24_isitma_1;
}
Tags.md_02_ht_2_sic_1_veri = array;
The administrator has disabled public write access.

st problem 1 year 6 months ago #3243

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 1039
  • Thank you received: 138
  • Karma: -102
Hello,
I don't understand what you want to do from your code. If you want to use array from you tag you have to use code like this:
Array Example:

byte bytes[10] = Tags.Array;

In this example value of the array tag with name Array will be assigned to the bytes array.

And you can use every element of the array for other operations. Like this:

for (int i=0;i<10;i++){

print(bytes);

}
For more information: teslascada.com/HTML/using-tags-in-structured-text.html
The administrator has disabled public write access.

st problem 1 year 6 months ago #3244

  • sezgin
  • sezgin's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
Hello
Data comes from the PLC every 10 seconds.
I want to send this data to the array.
The administrator has disabled public write access.

st problem 1 year 6 months ago #3245

  • sezgin
  • sezgin's Avatar
  • Offline
  • New Member
  • Posts: 6
  • Karma: 0
sezgin wrote:
Hello
Data comes from the PLC every 10 seconds.
I want to send this data to the array.
Attachments:
The administrator has disabled public write access.

st problem 1 year 6 months ago #3246

  • fatkhrus
  • fatkhrus's Avatar
  • Offline
  • Administrator
  • Posts: 1039
  • Thank you received: 138
  • Karma: -102
It's not possible to do. Insert value that comes into DB.

Best regards,
Ruslan
The administrator has disabled public write access.
Go to top