Can Programmatically Created NI-CAN Messages and Channels Be Saved in MAX?Hardware: Industrial Communications>>CAN>>PCI-CAN
Problem: I am programmatically creating NI-CAN messages and channels during runtime in LabVIEW and want to export them to Measurement & Automation Explorer (MAX). Is there a way to do this? Solution: Unfortunately, these programmatically created channels and messages can not be saved in MAX. It is possible to create messages and channels during runtime in LabVIEW, but there is no channel name or message name created. So, everything you create during runtime is created temporarily as a handle, and identification is possible only by the message ID or handle. If you do want to use LabVIEW to create a *.ncd file, please refer to KnowledgeBase 4SBF1Q0S: How Do I Programmatically Create NI-CAN *.ncd Files? Please reference the examples in the Attachments section below for reading and writing channels created at runtime. It is not possible to save these created messages within MAX, or a file, because the channel API is always related to a database or database file. Therefore, you must create the channels first in a file or in MAX in order to use them at a later time. The create message functions will add the ability to create some channels temporarily, but does not allow you to save them. This avoids mixing the databases that already exist. The channel name input can only be used for existing channel configuration outside of LabVIEW. Related Links: KnowledgeBase 3E0B1N7T: How Do I Set Up Channel and Message Configurations Without MAX or a CAN Database? KnowledgeBase 4SBF1Q0S: How Do I Programmatically Create NI-CAN *.ncd Files? Developer Zone Tutorial: The NI-CAN Channel API Attachments:
Report Date: 03/14/2006 Last Updated: 03/24/2009 Document ID: 3VD7EPC5 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
