Go to Parker.com
  • Sign in
Technologies
  • Aerospace
  • Climate Control
  • Electromechanical Group
  • Filtration
  • Fluid and Gas Handling
  • Hydraulics
  • IoT
  • Pneumatics
  • Process Control
  • Sealing and Shielding
Other Groups
  • Parker Indego
Blogs Forums Knowledge Bases
Parker Community
Parker Community
  • Technologies
    • Aerospace
    • Climate Control
    • Electromechanical Group
    • Filtration
    • Fluid and Gas Handling
    • Hydraulics
    • IoT
    • Pneumatics
    • Process Control
    • Sealing and Shielding
    Other Groups
    • Parker Indego
    Blogs Forums Knowledge Bases
  • User
  • Site
  • Search
  • User
Home Technologies Electromechanical Group Electromechanical - Industrial Electromechanical Industrial Knowledge Base C0046: Identifier 'xxxx' not defined - precompile error in PAM 1.3.0
Electromechanical - Industrial
  • Technologies
  • Electromechanical Group
  • Electromechanical - Industrial
  • More
  • Cancel
Electromechanical - Industrial
Electromechanical Industrial Knowledge Base C0046: Identifier 'xxxx' not defined - precompile error in PAM 1.3.0
  • Electromechanical – Industrial Support Forum
  • Electromechanical Industrial Knowledge Base
  • Members
  • Sub Groups
  • More
  • Cancel
  • New
Electromechanical - Industrial requires membership for participation - click to join
  • Electromechanical Knowledge Base & Frequently Asked Questions
  • Motion and Machine Controllers-
    • ACR Controllers+
    • PAC120+
    • PAC340+
    • PAC320 (Discontinued)-
      • 3rd Party Samples+
      • Embedded Xpress+
      • Errors+
      • Hardware+
      • PAM IDE+
      • Programming Tips-
        • ANY Data Type
        • C0046: Identifier 'xxxx' not defined - precompile error in PAM 1.3.0
        • How can I monitor cycle time in the PAC?
        • How do I use function block methods in CFC?
        • How to make comments in PAC software
        • How to program a Start, Stop, Reset Cold from within a PAC project
        • IDE Login Status
        • IDE User Management
        • Known issue with MC_Stop and MC_Home in PAM 1.3.0
        • Programming Tip: Save Time by reusing Code (Export / Import Programs & Function Blocks)
        • Programming Tip: Save Time on Naming Variables through Export/Import Mappings .csv
        • Variable size arrays
      • Web Visualization+
      • Quick Start and Online Training Videos
      • Adding New Devices
      • Auto Addressing enabled by default
      • Cam and Gear Program Sample & Video
      • Common PACIO Troubleshooting Tips
      • Compax3 Linear servo motor settings with PAC
      • Default IP Address 192.168.10.50 subnet 255.255.0.0 (X2 port)
      • Reading G Code from a file to develop a CNC machine
      • Error: Red triangle on EtherCAT axes/devices when ModBus or ProfiNet connects
      • FTP support
      • How can I send ASCII strings to or from the PAC?
      • How do I configure and gear to the PACIO-454-01 Module?
      • How do I upgrade a Parker Automation Manager (PAM) project from 1.3.0 to 1.4.0?
      • How do I use variables in G code?
      • How to Add ModbusTCP to PAC project (PAC as ModbusTCP slave)
      • How to Set and Get Time / Date / Time Zone Pre-1.4
      • How to Update Devices and their Descriptor files
      • How to Update PAC project without Parker Automation Manager software?
      • How to Update a PAC Firmware? Flashback instructions
      • How to Upload a Program?
      • How to Use the InteractX OPC Quick Client with the PAC
      • How to set up EtherNet/IP Communications with an Allen Bradley PLC
      • How to set Scaling for Parker Mechanics
      • How to use the Outputs on the Compax3-I31 or P series (EtherCAT)
      • IO settings for EtherCAT_Master: How to see IO update while in Stop
      • Log Data to a File
      • Minimum Internet Explorer version for Xpress and Visualization options
      • PAC CNC & Multi-Axis Capabilities, Samples & Video demos
      • PAC CNC visualization
      • PAC System Time Access and Edits
      • PAC Web Visualization with Internet Explorer: missing browser feature HTML5-Canvas Webvisu
      • PAC with .Net or LabView or InteractX: Using OPC DA Server
      • PAC with Modbus: What addresses for tags?
      • Reading Torque from Pseries drive
      • Remanent Variables: Retain vs Persistent Retain
      • Retentive Memory details
      • SDO Read / Write PAC to/from Compax3 I31
      • SMC_ERROR.SMC_FB_WASNT_CALLED_DURING_MOTION
      • Sample Continuous Function Chart CFC Program: time based counter
      • Sample Continuous Function Chart CFC Program: Basic Motion (Power, Home, Cycle)
      • Sample Ladder Logic LD Program: Basic Motion (Power, Home, Cycle)
      • Sample Ladder Logic LD Program: Time based counter
      • Sample SFC Program: time based counter
      • Sample Stuctured Text ST Program: Time Based Counter
      • Sample Structured Text ST Program: Basic Motion (Power, Home, Cycle)
      • Single Axis Sample Program with Visualization
      • Two Axis Sample Program with Visualization
      • Using the PAC as a Modbus TCP Master Device
      • Using the PAC as a Modbus TCP Slave Device
      • VIDEO: Run an AC30V an AC Induction motor via EtherCAT with a PAC
      • VIDEO: PAC with Compax3 EtherCAT part 1: EtherCAT connections & Device Selection
      • VIDEO: PAC with Compax3 EtherCAT part 2: Complete Configuration
      • VIDEO: PAC with Compax3 EtherCAT part 3: Setting EtherCAT Master and DS402 scaling
      • VIDEO: PAC with Compax3 EtherCAT part 4: Download & Test in C3 ServoManager
      • Video: Parker's PAC, the Automation Controller Based on IEC61131-3
      • What's the 16# in the axis scaling default of 16#10000?
      • Working with recipes in the PAC
      • Does the PAC have a first scan flag?
      • Error when switching Active Application
      • Using tappets during cam motion
      • WebVisualization not working in PAC terminal (PTA)
      • Can I open an edit and download a PAM 1.3.0 project using PAM 1.4.0?
      • Does PAC act as a OPC-UA server or client, or both?
      • How do I upgrade the PAC from OPC-DA to OPC-UA?
      • How do I use OPC-UA with the PAC?
      • PACIO-441-01 analog current input module
      • Sample code for PACIO-442-02 and PACIO-441-02 analog modules
      • What ports get used with PAC Ethernet connections?
      • C0032: Cannot convert type 'Unknown type: 'ADR(Device.Application.PLC_PRG.x)' to type 'POINTER TO BOOL'
      • CSV Reader Library for the PAC
      • Do I have to upgrade my PAC 1.3.0 Firmware to work with a PAM 1.4.0 project?
      • eCL Homing notes with PAC via EtherCAT
      • EtherCAT communication between the PAC and AC30 drive
      • How to add images to a visualization in WebVis
      • How to reset the EtherCAT bus
      • Parker Tap Adapter for EoE communications
      • User Management in the Parker Automation Controller
      • Using MC_TouchProbe with Compax3 Series Drives
      • Using MC_TouchProbe with P Series Drives
      • Webvis toolbox missing tabs (Codesys calls them tags) - Added alarms but no Alarms Display tool in toolbox.
    • 6K (Discontinued)+
  • General Technology Information+
  • Virtual Engineer+
  • Visualization and Human Machine Interface (HMI)+
  • Servo Drives and Servo Drive/Controllers+
  • Stepper Drives and Stepper Drive/Controller+
  • Gearheads+
  • AC and DC Drives and Inverters+
  • Servo Motors+
  • Step Motors+
  • Linear and Rotary Positioners+
  • Electric Cylinders+
  • T-Slot Aluminum Framing+
  • C3 + Xpress + ETH+
  • How can I stay updated on Parker electromechanical and drives product news?
  • Legacy (Discontinued)+
  • Other+
  • Memorandum: Information on EPA ban of Persistent bioaccumulative toxin (PBT)
  • What replaces the Gemini GV6K servo drive controller?
Wiki Actions
  • Share
  • More
  • Cancel
Community Quick Links
  • Home
  • Technologies
    • Aerospace
      • Supplier Resource Center
    • Climate Control
    • Electromechanical Group
      • Electromechanical - Industrial
      • Electromechanical – Mobile
    • Filtration
    • Fluid and Gas Handling
    • Hydraulics
    • IoT
      • Mobile IoT
    • Pneumatics
      • Pneumatic Industrial
      • Pneumatics Mobile
    • Process Control
    • Sealing and Shielding
  • Other Groups
    • Parker Indego
      • Parker Indego Instructors
      • Parker Indego Therapists
      • Parker Indego Distributors
  • Community Blogs
  • Community Forums
  • Community Knowledge Bases
Follow Us
  • Follow Parker Hannifin on social media

Follow Parker Hannifin on social media:

C0046: Identifier 'xxxx' not defined - precompile error in PAM 1.3.0

Print Friendly and PDF

In PAM 1.3.0 the programming environment now attempts to enforce better programming discipline when generating a Global Variable List (GVL) or Enumeration Data Unit Type (DUT). 

When the GVL or ENUM file is first created, Parker Automation Manager will automatically add a new precompile directive {attribute 'qualified_only'} as the first line.  This precompile directive causes the pre-compilation syntax check to expect the full variable "declaration path" (aka - namespace) in all references to the variable rather than simply the variable name itself as in the previous versions.

For example:   I add a Global Variable List named GVL.  I have a variable declared in GVL named bSwitch_State which is of type Boolean.  When I reference this variable in my POU(s) it should be referenced as GVL.bSwitch_State to clearly indicate which variable I am referring to.  There could be other declarations of a variable named bSwitch_State in other files and this requirement makes it clear which one I am referring to. 

Without the explicit namespace the compiler will do its best to resolve which instance to use but clearly this could lead to the wrong instance being used.  Good programming practice is to explicitly reference each variable with its namespace and not simply the variable name itself unless it is truly just a local variable.  This is also a good way to differentiate external variables from a local one when debugging and supporting code later on.

This pre-compile error is more of a warning than a functional error.  You can still complete the code generation, download, and run as before (assuming that your variables resolve correctly), in essence you can ignore this pre-compile error.  However, we recommend correcting the variable references to include the namespace for more robust code and supportability. 

To get the environment to behave like it did in version 1.2.1 and 1.2.0 you can also delete this first line from the Global Variable List or Enumeration file and the pre-compile syntax check for this will not be utilized.

 

 

Note - there is a bug in the current compiler (3.5.9.0) with the Auto Declare dialog in that it doesn't prefix the namespace as the pre-compiler syntax check expects.  Simply add the prefix namespace or see the alternative solution described above to remove this pre-compile requirement.

glh  6/2017

  • Share
  • History
  • More
  • Cancel
Anonymous
Related
Follow Us
  • Follow Parker Hannifin on social media

Follow Parker Hannifin on social media:

Parker Hannifin Parker Hannifin

  • Products
  • About Parker
  • Investors
  • Community
  • Careers

Global Operations Global Operations

  • Divisions
  • Sales Companies
  • Worldwide Locations
  • Distribution Network
  • ParkerStore™ Network

Company Information Company Information

  • Newsroom
  • Event Calendar
  • Working with Parker
  • Product Brands
  • History

Global Support Center Global Support Center

  • Support
  • CAD
  • Where to Buy
  • Contact Parker
  • Manage Online Orders
© Parker Hannifin Corp 2022
  • Site Map
  • Safety
  • Privacy Policies
  • Terms and Conditions
  • Community Terms of Use
ENGINEERING YOUR SUCCESS.