Analog Scalling in GX Works 3 for Mitsubishi FX5U PLC

6 posts in this topic

Hello all,

I am trying to write one FB for Analog Scaling in GX Works 3 Software for my Mitsubishi FX5U Plc...

Unfortunately i am not aware very much about ST Language instructions of Mitsubishi Softwares.

So the Code is Giving 5 Errors, i think the error are due to incorrect data conversion expressions, Can you please correct me with my code ?

Here are the Variables

RAW_MIN                   Word [Signed]                      VAR_INPUT
RAW_MAX                  Word [Signed]                      VAR_INPUT
SCAL_MIN                  FLOAT [Single Precision]    VAR_INPUT
SCAL_MAX                FLOAT [Single Precision]    VAR_INPUT
AI_RAW                      Word [Signed]                       VAR_INPUT
SCALED_OP_INT      Word [Signed]                       VAR_OUTPUT

Here is the Code


Edited by SillyBoy

Share this post

Link to post
Share on other sites

AI_RAW    Word [Signed]    VAR_INPUT
RAW_MIN    Word [Signed]    VAR_INPUT
RAW_MAX    Word [Signed]    VAR_INPUT
SCAL_MIN    FLOAT [Single Precision]    VAR_INPUT
SCAL_MAX    FLOAT [Single Precision]    VAR_INPUT
SCALED_OP_REAL    FLOAT [Single Precision]    VAR_OUTPUT
SCALED_OP_INT    Word [Signed]    VAR_OUTPUT
RAW_MIN_REAL    FLOAT [Single Precision]    VAR
RAW_MAX_REAL    FLOAT [Single Precision]    VAR
AI_RAW_REAL    FLOAT [Single Precision]    VAR





Looks like above modification is correct...what you say ?

but this is strange to create separate variable for each data conversion......

Share this post

Link to post
Share on other sites
On 18/02/2020 at 3:56 PM, zpassha said:

Can u attach a file with program?

Along with that, how to assign address to my variables ? (In this backup, in Analog_Scaling Task, PT_Min,PT_Max,PT_Scaled)


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