hapetter
Mechanical
- Apr 12, 2002
- 28
Hi.
I try to implement an array of struct in IEC61131-3 ST language.
The C code look like this:
Code:
Struct BDD
{
Unsigned char a1;
Unsigned int a2;
Unsigned int a3;
Unsigned int a4;
}
struct BDD BDD_table[4] = {
{'X', 1, 1, 2},
{'a', 0, 100, 0},
{'a', 1, 100, 2},
{'X', 2, 5, 4}
};So:
How to declare array of struct and fill inn data in array?
Thanks!
Best Regards
Hans Pettersson
I try to implement an array of struct in IEC61131-3 ST language.
The C code look like this:
Code:
Struct BDD
{
Unsigned char a1;
Unsigned int a2;
Unsigned int a3;
Unsigned int a4;
}
struct BDD BDD_table[4] = {
{'X', 1, 1, 2},
{'a', 0, 100, 0},
{'a', 1, 100, 2},
{'X', 2, 5, 4}
};So:
How to declare array of struct and fill inn data in array?
Thanks!
Best Regards
Hans Pettersson