03-24-2017 08:44 AM
A simple (probably) question that I cannot solve.
LabVIEW program accesses equipment via multiple CAN channels. When the program is started, operator must select one or more channels.
How can the program obtain list of available CAN channels? The list differs between different stations; thus it must be obtained "on the fly".
Thank you
Solved! Go to Solution.
03-24-2017 08:58 AM - edited 03-24-2017 08:58 AM
03-28-2017 08:01 AM
Thank you GerdW for the answer. Unfortunately, I do not know much about DBC files and cannot find any in the computer. Where are they located? Is there any doc describing structure of these files?
03-28-2017 08:37 AM
The DBC files are generated by the company that creates the equipment software to which you want to connect with CAN. It will look something like this:
; Database 123-4567.db ; VERSION 103 COMMENT "" DEFAULT MOTOROLA MAP 1 "my_canape.map" MAP 2 "your_canape.map" GROUP 'TEST' : "" { GROUP 'SYSTEM' : "" } FORMULA 1 0 Boolean "" "" "%7.3" VTAB 0 'FALSE' 1 'TRUE' DEFAULT "" SEGMENT 'ADC_Err' 0x1:0xAE730 SEGMENT 'Junction.Temp' 0x1:0xAE734 ['SYSTEM'] VARIABLE 0x0 'ADC_Err' 'ram_INT_P1' : 730 "" UINT(32) "" 1 0 4294967295 (0 255) PREC 3 MEASUREMENT WEAK_LIMITS 0 4294967295 VARIABLE 0x0 'Junction.Temp' 'ram_INT_P1' : 734 "" FLOAT "" 0 -3.4e+038 3.4e+038 (0 255) MEASUREMENT WEAK_LIMITS -3.4e+038 3.4e+038
It is generated by the software group based upon where certain variables will be found in memory based on the software build that is loaded in the equipment to which you are trying to connect through CAN.
03-28-2017 09:26 AM - edited 03-28-2017 09:26 AM
Unless I'm mistaken OP is actually asking about listing enumerated hardware on the start of the software. Not CAN Channels in regards to frames, signals, or databases
I think the code I posted here does what you want (I had a similar question years ago)
https://forums.ni.com/t5/LabVIEW/Get-CAN-Bus-Ports/m-p/3350267#M984615
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-29-2017 03:43 AM
Thank you Hooovahh, this is exactly what do I need.