Hi,
I am trying to write some C++ to send and receive CAN data. I have been using the "Transmit and receive same Port.c" example code as my basis. The example code works fine, but my code doesn't. The only difference that I can see is the that in the example code, they are using ncWrite and in mine, I am using ncWriteMult. The code to set up the CAN network interface object is the same. I am using a baud rate of 500k. The code transmits the two test messages okay, I just don't ever receive anything. I have a neo-VI on the other end that receives the messages from the NI USB device and it also sends a message of its own every second. I am attaching my code, if that helps, but it is messy right now. Originally, I had send and receive set up in two different functions, then I merged send and receive into one function. I have two threads running in the program that calls the functions in this code, the transmit thread executes every second and the receive thread executes every 1/4 second.
If anyone has any thoughts, I would be very grateful..
Shawn