Sign in to follow this  
Followers 0
Starsonic

Return WORD/DWORD from function in GXW2

1 post in this topic

Posted (edited)

Greetings, so i create project for FX3U in GX Works2. In my program i use function in ST. That function return array with word(signed). I have a warning:

Quote

No.    Result    Data Name    Class    Content    Error Code
1    WARNING    QueueBySetOn    Program compile    A WORD/DWORD type label is being used in the return value. The instruction used for the generated code will be changed. When using the designated instruction, use ANY_SIMPLE type except WORD/DWORD type.    C9026
 

ST


FOR i_var := 0 TO n_i BY 1 DO
	
	TempNumbs := Numbs;
	TempDevSetsOnPerTime := DevSetsOnPerTime;
	QueueBySetOn[i_var] := 0;
	
END_FOR;

QueueBySetOn[1] := TempNumbs[n_i];
QueueBySetOn[3] := 1;

FOR i_var := 0 TO n_i BY 1 DO
	
	IF (TempDevSetsOnPerTime[TempNumbs[i_var]] < MaxSetsOnPerTime) THEN
		
		QueueBySetOn[0] := TempNumbs[i_var];
		QueueBySetOn[3] := 0;
		
		EXIT;
	
	END_IF;
	
END_FOR;

So, it realy funny, GXW cant return int?

QueueBySetOn.gxw

Edited by Starsonic

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0