Another unexpected GE ST problem

radsett

Member
Join Date
May 2008
Location
Waterloo,ON
Posts
10
I have a simple initialization loop

FOR BS_i:=0 TO (BS_CONC_LEVEL_CONTROL - 1) DO
BSHistorySt_Return_LR[BS_i] := DONT_CARE;
END_FOR;

That gives an error " expected := " pointing at the assignment inside the loop. I've tried
- using a second variable for indexing in the array
- recoding as a while loop

all without success. Finally I tried eliminating the loop and reduced it to

BS_i := 0;
BSHistorySt_Return_LR[BS_i] := DONT_CARE;

I still get the same error.

I do have a query in to GE but they are not replying as of yet.

Robert
 
Good question.

I quickly tried

BS_i := 0;
BS[BS_i] := 0;
BS[BS_i] := DONT_CARE;


Same error on both of the array assignment lines.

Robert
 
What data type is the BS array ?

Can you post the complete (but cut down) code that fails to compile.
 
This is it (both lines 2 and 3 fail)

BS_i := 0;
BS[BS_i] := 0;
BS[BS_i] := DONT_CARE;

BS_i is a UINT
BS is an array of 4 INT
DONT_CARE is a INT

(Proficy ME doen't include variable definitions in the source)

Robert
 
L D[AR2 said:
Just throwing up ideas, maybe the array index variable has to be of type SINT (short int) ?

It's worth a try.

GE doesn't have an SINT type but I checked a few others, So far for the index variable I've used

BYTE
INT
UINT
DINT
WORD
DWORD

I think I've covered all the integer types.

Robert
 
...... I've run out of suggestions (except maybe the GE ST implementation does not support variable array accesses)
 
I'm beginning to suspect that myself.

That will raise the question, why support arrays at all? I don't see an advantage of

a[3]

over

a_3

Hopefully GE will get back to me.

Thanks for your suggestions. At least we managed to eliminate a few possibilities.

Robert
 
OK, I got my answer from GE. GE doesn't support the use of another variable to index an array. Essentially that means they don't support arrays.

I've had to write a function block (since they don't support functions either) to provide access to each array by essentially matching the index to an offset and then referencing the array with a constant.

The mind boggles.

Robert
 

Similar Topics

Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
136
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
428
Hello I need to message read the entire 16 channel raw analog inputs from a 1769-L33ER Compact Logic controller to another 1769-L33ER Compact...
Replies
8
Views
244
I am noticing a problem where i am using MOV instruction and writing literal text into source and String datatype in destination. It works fines...
Replies
6
Views
488
I'm not actually in front of the equipment yet, but this is the information that I have been given by a client: ------------ Data from HART...
Replies
2
Views
336
Back
Top Bottom