09-23-2021 05:50 AM
Hi guys,
If I get the signals directly from a database file path, the resulting format is signalName<CR>dbName_number.
But if I connect the dbAlias instead, the format lacks the _number at the end. What's going on here?
Thanks!
09-23-2021 09:36 AM
First I'll answer your question, then I'll mention a different XNet issue I don't like that is somewhat related that you reminded me of.
What you are seeing is likely because you have the same DBC added, with the same name, but in two separate places on your hard drive. Launch the NI-XNet Database Editor from your start menu, then go to File >> Manage Aliases. From here you can see all the aliases, and what files they reference on disk. These aliases need to be unique, and I'm guessing you added the database twice on accident some how and so it just adds some number. To clean things up you can probably remove any duplicates.
Now for my complaint you reminded me of. A signal name can appear in a database multiple times, as long as they are under different frames, or clusters. In a DBC there is only one cluster so we don't need to worry about that. If I have signal named "Voltage" under the frame "Device 1", inside the database "Database 1", then the name can be referenced by "Voltage<CR>Database 1". But if you add another frame named "Device 2" and under it is also a "Voltage" signal, then you must reference it by "Device 1.Voltage<CR>Database 1". This is good and fine, however I've seen that you can't reference the signal by this name if the signal "Voltage" is not duplicated in another frame.
In making code that does things in an automated way, I now need to see if signals are duplicated, and if so to reference them with the frame name in them. It would be much more useful if XNet supported referencing a signal either by the shortened name, or full name, even if there isn't a duplicate.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-23-2021 09:50 AM
I thought about that, but even removing all aliases the numbers get added at the end. When there are duplicated names, it usually adds something like _2 at the end of the Alias, but in this case it adds usually more than 4 digits.