01-17-2022 03:47 PM
Hi,
Very new to LabVIEW. I have a CopperHill technologies board (SAE j1939 Gateway Module with USB Port, RTC, Micro SD Memory Card) and I am trying to read the data coming from the board and the connected product and parse it according to j1939.
I can detect the usb with the VISA resource name, but can't then use any of the XNET functionality. Similarly, I can setup the VI do read the data with XNET, but I can't link it to the USB port.
I'm brand new to LabVIEW and trying to learn it fast to get this figured out,
so any help is good.
Thanks!
01-17-2022 10:28 PM - edited 01-17-2022 10:30 PM
VISA and XNET are different protocols.
First of all decide which protocol you want to use either usb or CAN.
Below link have details regarding communication with the board:
Details of your board
https://copperhilltech.com/sae-j1939-gateway-module-with-usb-port-rtc-microsd-memory-card/
Communication using serial port(usb)
https://copperhilltech.com/blog/programming-the-sae-j1939-ecu-simulator-board-using-visual-studio-c/
01-18-2022 03:15 PM
Thanks for the resources. I am able to read some data through my labview program, but I can't filter by the PGN numbers and so I'm just getting the raw data coming through. Is there a way to do that through the VISA class?
01-18-2022 09:51 PM
What are you actually trying to receive from the controller.
How much have you achieved?
Kindly share the code to further checking.
01-19-2022 05:37 PM
I'm trying to receive data according to the PGN 64982, j1939-71. I have attached the link to the code below. It's totally unfinished, and won't run, but I'm trying to send a RESET message to the board, then send a PGN filter to access the data for than PGN.
Again, totally messy and unfinished but thank you for having a look!
https://copperhilltech.com/content/jCOM1939-Protocol.pdf
^ is the link to the protocol pdf from copperhill technologies.
01-20-2022 02:08 AM
kindly down convert the vi to LabVIEW2020 or before
01-21-2022 10:25 AM
Okay so with the array, I am trying to send the RESET message to the COM port, see the copper hill document link. (page 6)
https://copperhilltech.com/content/jCOM1939-Protocol.pdf
I want to then be able to use ADDFILTER to filter out some PGN's so that I can start interpreting the data I'm receiving.
It doesn't seem like I am correctly writing to the COM port, or I am missing something in my VISA serial block.
I have attached a different version, that gives me the same output, saved as 2019.
01-24-2022 10:17 AM
Hi, I have a Copperhill technologies board, and I am trying to send a reset message and an addfilter message to the board so that I can start filtering the PGN's according to j1939. It seems to always just be returning the same message back out. I want to avoid using NI-XNET and a library.
The link to the board is here:
https://copperhilltech.com/sae-j1939-gateway-module-with-usb-port-rtc-microsd-memory-card/
The document containing the COM protocol:
https://copperhilltech.com/content/jCOM1939-Protocol.pdf
My LabVIEW code is attached I am trying to use.
01-24-2022 12:30 PM - edited 01-24-2022 12:31 PM
Hi Jack,
why do you need to start a new thread for the very same topic?
Please keep related things in one place!
@sJack wrote:
I have a Copperhill technologies board, and I am trying to send a reset message and an addfilter message to the board so that I can start filtering the PGN's according to j1939. It seems to always just be returning the same message back out. I want to avoid using NI-XNET and a library.
You don't "want to avoid X-NET", you have to avoid X-NET - your device expects communication by VISA…
Did you read the manual where you provided the link?
Did you understand the message format expected by your device? It seems you didn't read the manual very carefully, as your messages are ill-formed!
The RESET message consists of the bytes "C0 00 05 05 A5 69 5B", which is wrong in two ways!
That checksum calculation is explained on page 4 of your manual!
Recommendation: whenever controls/constants/indicators show values using a non-default display mode you should make that display mode indicator (aka radix) visible in the context menu of that FP item (or constant)!
01-25-2022 10:29 AM
Hi GerdW,
I only started a new thread as no one replied to my previous one after a few days. Forgive me for the seemingly dumb mistakes. I have never used LabVIEW or worked with a communications protocol before, so I am learning as I go. Understanding the message is a work in progress.
That being said, I appreciate your explanation, and I think this will help me move a step in the right direction.
Regards,
Kieran