07-02-2015 11:53 AM
I'm hoping this will be an easy one! Is there any way to programmatically convert a path to a .dbc file into an XNET database reference? In other words, instead of using the XNET database constant/control and selecting a.dbc database file, how can I convert a.dbc file path into a database reference?
I've tried typecasting the path string to a database reference, but that doesn't seem to do the trick:
Although I can read frames within the cluster using this method, the returned baud rate is always zero. If I use a database constant and manually select my .dbc file instead of typecasting, the baudrate is returned correctly.
07-02-2015 12:57 PM
OK, I think I figured it out. The .dbc file needs to first be configured as an alias (XNET Database Add Alias.vi) and then this method works correctly.