To detect errors, right-click the CAN node in the diagram and select Error Terminals. The resulting Error In and Error Out terminals provide the standard LabVIEW error cluster for error handling.
Use of Error Terminals for CAN development is recommended. For some CAN nodes, the error terminals are essential. For example, you need to evaluate Error Out from a CAN Input node to determine if a CAN frame was received within the specified Input Timeout (ms). The only cost of using error terminals is slight FPGA gate usage, not performance.
When an error occurs, you can use the LabVIEW Explain Error Help dialog box for a description of the error code. Right-click an error cluster and select Explain Error from the shortcut menu for more information about the error. You also can select Explain Error and enter the returned error code into the dialog box.
The error descriptions in the Explain Error dialog box are generic to all CompactRIO (C Series) modules. The following sections provide information specific to the CAN module.
This error will occur anytime there is a catastrophic error with communication to the CAN module. Some possible causes are:
This error will occur if the user plugs in another CompactRIO module into a slot configured for a CAN module.
This error occurs when:
This error is not returned when a Wait or Abort Transmit method times out. Those methods indicate a timeout in the Timed Out? terminal.
This error can only occur from the CAN Input node. This indicates that you did not invoke CAN Input fast enough, and one or more CAN frames were lost. Since LabVIEW FPGA executes at a much faster rate than CAN frames are received, this can only happen when you introduce artificial delays in your FPGA VI. By invoking CAN Input at least once every 50 microseconds, this error will not occur.
This error occurs when communication is stopped and you use a CAN feature that requires communication to be started first. Refer to the preceding documentation to determine which features require running communication.
Prior to using the feature (CAN Output, I/O Method, or I/O Property node), make sure that you start communication on the CAN port. You can start communication by enabling Auto Start in the Module Configuration or by invoking the Start method.
This error occurs when communication is started and you use a CAN feature that requires communication to be stopped. Refer to the preceding documentation to determine which feature cannot be used while communication is running.
Prior to using the feature (usually writing a property), make sure that you stop communication on the CAN port. To set initial properties, disable Auto Start in the Module Configuration, then set the desired properties, invoke the Start method, and proceed with your remaining application. To set properties in your main application loop, invoke the Stop method, set the relevant properties, then invoke the Start method.
This error is returned by the CAN Property node when a property selected for reading or writing is not supported on the specified module.
This warning occurs when a serious fault is detected on the node, resulting in a burst of error frames. This warning indicates that one or more error frames may not be reported to LabVIEW FPGA. However, all valid CAN data frames will be reported.
Verify that cabling, baudrate, and termination of all nodes on the network are correct, and that proper bus power is supplied.