05-27-2026 07:37 AM
I want to do CAN testing using PXI-8512 for S32K566 MCU board.1st step i try to do is that, I took CAN loopback test from NI example finder and executed and also checked the signals using Saleae. I connected CANH pin of port 1 to CANH pin of port 2. Similarly for CANL and GND by referring the image(shown below). I'm getting CAN error frames and in the block diagram, the array size is always zero in the reading part. I'll upload the block diagram, front panel and saleae screenshots. Please analyse those and let me know where is the issue.
Thank you
Parvathy Krishna R
05-27-2026 08:27 PM
Try Log Bus Traffic With NI-XNET Bus Monitor While Running NI-XNET Application
Enable Error Frame in the Interface and Database Settings. It will give you more info.
05-28-2026 04:47 AM
Hi ZYOng,
Thanks for the quick reply.
I tried the steps you suggested, but I’m still facing the same issue. In the Bus Monitor, I’m not able to see any frames, even after following the procedure carefully. I'll share the screenshots as well.
Could you please check whether the block diagram is correct or let me know if any modifications are required? As far as I can tell, the hardware seems to be functioning correctly, so the issue might be on the software side.
Are there any additional steps or configurations that need to be followed to get the CAN communication working properly?
Thanks in advance for your support.
05-28-2026 11:11 AM
Errors with CAN occur mostly because of incorrect termination. Is your cable terminated? if not enable termination on both interfaces.
05-28-2026 02:27 PM
Not sure if you've read my CAN blog but you probably should. At least the first couple of posts. If you are just trying to verify the setup using the NI Bus Monitor is probably the way to go. The example you linked to looks edited, and I wouldn't be surprised if something broke. Like the random wait in the middle that won't do anything since the code runs in parallel.
But with the Bus Monitor have one open that is writing and one that is reading. The pinout like you said should be Pin 2 to Pin 2, and Pin 7 to Pin 7. No cross over, no null. And preferable no termination. As you saw in the Bus Monitor you can turn this on and off in software for each port. If you have a straight through cable, both ports should have their termination on. Start both ports with the same baud rate, typically 500k. Start them both (the device may have green lights) and write a frame in one bus monitor, then look to read on the other. If you enable echo you can read back what you wrote. This will only work if there is a second device on the bus. If you just perform a write with nothing there the tranceiver will continually resend it looking for an ack.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord