Products
Download
Contact us
Back to Top
  • 1Let's learn compatibility of hardware!
  • 2Let's learn comparibility of the connection device!
  • 3Let's learn compatibility of software!
  • 4Let's learn how to replace!

Instruction Conversion

Pattern A: Add an instruction to match the variable type

GP-Pro EX doesn't allow different types of variables to be assigned to an instruction. If the variable types assigned to an instruction are different, a conversion instruction to match the variable types before conversion is added.

e.g. 1: The case of copying data of a real variable "Real_A" to an integer variable "Int_B" with a transfer instruction
-
Before Conversion
Variable
Variable type
Real_A
Real type
Int_B
Integer type


-
After Conversion
1. An instruction to copy data of "Real_A" to a real variable "RealTmpTran(0)" is created.

2. An instruction to convert the real data, which was copied to "RealTmpTran(0)", to an integer data and copy it to an integer variable "Int_B" is created.



*1: The real variable "RealTmpTran(0)" is created automatically when conversion.
*2: The instruction "R2I" converts a real to an integer.

e.g. 2: The case of copying data of an integer variable "Int_A" to a real variable "Real_B" with a transfer instruction
-
Before Conversion
Variable
Variable type
Int_A
Integer type
Real_B
Real type


-
After Conversion
1. An instruction to convert data of "Int_A" to real data and copy it to a real variable "RealTmpTran(0)" is created.

2. An instruction to copy the real data stored in "RealTmpTran(0)" to a real variable "Real_B" is created.



*1: The instruction "I2R" converts an integer to a real.
*2: The real variable "RealTmpTran(0)" is created automatically when conversion.


Back to page top Return to the previous page
FAQ for use | Protection of Personal Information | Trademark Acknowledgments | About Intellectual Property Rights | Terms of Use
Copyright (C) 2005- Schneider Electric Japan Holdings Ltd. All Rights Reserved.