<< Prev        Next >>

ID : 3523

Embedded Macro

Embedded macros refer to macros predefined in PacScript.

These macros can be used for environment compilation conditions such as robot type and COBOTTA.

The embedded macros have been determined by PacScript beforehand.
Therefore, when the embedded macro is used as a macro name of "#Ifdef...#Endif" syntax, the evaluation result is always TRUE, this makes the conditional branch ineffective.

Embedded Macro List

Macro name Value explanation
__VERTICAL_ROBOT__ 1 when the robot is a vertical-type (VS, VM and VP) robot project, or 0 when it is not.
__SCARA_ROBOT__ 1 when the robot is a horizontal-type (HS, HSA1, HSR, HM, XYC, XR and MC) robot project, or 0 when it is not.
__VERSION__ Decimal 6-digit numeric value representing the COBOTTA software version. Major version * 10000 + Minor version * 100 + Sub version
__VRC__ Always 1.
__RC8__ 1 when the project is RC8 series.
__NAME__ Program name (example: __NAME__ = "Pro1" when \App\Pro1.pcs)
__FILE__ File name (example: __FILE__ = "Pro1.pcs" when \App\Pro1.pcs)
__PATH__ File path (example: __PATH__ = "\App\" when \App\Pro1.pcs)
__SIMULATION__ 1 when the robot is in the simulation, or 0 when it is not.

ID : 3523

<< Prev        Next >>