|Download Help (Windows Only)|
When you use a C Series NI-Industrial Communications for CANopen module in a CompactRIO chassis, the NI-IndCom for CANopen features on the LabVIEW Real-Time Module are the same as other RT targets, such as PXI. The communication between the NI-IndCom for CANopen RT driver and the module does not exist in the default FPGA VI that ships with CompactRIO. Prior to using NI-IndCom for CANopen features, you must use the LabVIEW FPGA Module to compile and run an FPGA VI that contains the required communication logic.
Complete the following steps to use a C Series NI-IndCom for CANopen module in a CompactRIO chassis from the out-of-box configuration.
Install the required software to the host computer in the following order:
Use MAX to locate your CompactRIO controller under Remote Systems in the left pane. Right-click the Software item and select Add/Remove Software to launch the installer. You can install the required components in the following two methods:
To compile an FPGA VI with the required communication logic, you must add NI-IndCom for CANopen modules to a LabVIEW project.
|Note If the Discover C Series Modules dialog box appears, select the Do Not Discover button and proceed to step 5.|
If you are new to CompactRIO, you can use an empty FPGA VI in order to quickly get started with NI-IndCom for CANopen tools and examples. Select the FPGA target in LabVIEW project, and then select New»VI. When the front panel opens, select the LabVIEW run button (arrow) to compile and run the VI. Even though the VI is empty, it will load the required NI-IndCom for CANopen support. When compilation completes and the VI runs the first time, you can close the front-panel and proceed to the next step.
If you have an existing FPGA VI in your project, you must re-compile the FPGA VI in order to incorporate NI-IndCom for CANopen support for the configured slots. Once the FPGA VI is re-compiled, you run it using the same methods that you used previously. This is typically done using the Open FPGA VI Reference from a host VI.
Tables X-1 and X-2 provide a detailed list of actions that cause NI-IndCom for CANopen to load and unload. NI-IndCom for CANopen must be loaded in order for its hardware to be detected. Within the tables, the term CANopen-enabled FPGA VI refers to an FPGA VI compiled with a project that contains at least one NI-IndCom for CANopen module. The term CANopen-disabled FPGA VI refers to an FPGA VI compiled with no NI-IndCom for CANopen modules.
|Invoke Open FPGA VI Reference with a CANOPEN-enabled FPGA VI.||NI-IndCom for CANopen loads regardless of whether Run the FPGA VI is checked in the configuration dialog.|
|Run CANOPEN-enabled FPGA VI using Interactive Front Panel Communication|
|Note NI-IndCom for CANopen does not load when the CompactRIO system powers up. Even if you configure a CANOPEN-enabled FPGA VI to automatically load on power up, you must perform an action from Table X-1 prior to using NI-IndCom for CANopen.|
|Invoke Close FPGA VI Reference with shortcut option Close and Reset if Last Reference (default).||If the reference is not the last to close, NI-IndCom for CANopen remains loaded. Shortcut options Close and Close and Abort without Reference Counting do not unload NI-IndCom for CANopen.|
|Power down CompactRIO|
|Run CANopen-disabled FPGA VI.||This applies to Open FPGA VI Reference or Interactive Front Panel Communication.|
|Invoke Reset using the Invoke Method node of the FPGA Interface.||Reset of an open FPGA reference causes NI-IndCom for CANopen to unload, and then immediately load again. If you are using NI-IndCom for CANopen interfaces during the reset, the interfaces will be invalidated. Other methods such as Abort do not unload NI-IndCom for CANopen.|
|Run a different CANopen-enabled FPGA VI from the CANopen-enabled FPGA VI currently loaded.||When you change FPGA VIs, the effect is the same as the reset method. NI-IndCom for CANopen unloads, and then immediately loads again.|
|Note When using FPGA Interactive Front Panel Communication, stopping the FPGA VI does not unload NI-IndCom for CANopen. This applies to stopping the VI normally (e.g. from front panel button), or using the LabVIEW abort button (stop sign).|
After the FPGA runs with NI-IndCom for CANopen support, it may take a few seconds for the new FPGA features to be detected, appropriate RT drivers to load, and NI-IndCom for CANopen modules to be detected. This delay occurs only after the action from Table X-1 is performed.
You can use the options to detect NI-IndCom for CANopen hardware:
Once the interfaces are detected, you are ready to use these interfaces. Within your RT VI, you can use the NI-IndCom for CANopen VIs to read and write data.