Hello Johnshi
It is the nature of CAN that you can only (successfully) transmit a frame, if there is someone listening. In fact, a CAN frame has a 2 bit wide acknowledge field (ACK), which the transmitter of the frame leaves recessive. Anyone that successfully (no bit faults) received the bit stream of that frame is supposed to overwrite the ACK field with dominant bits. As the transmitter of a frame also senses the bus, it will detect whether anyone else set the ACK or not. If not, the frame will be resend right away until someone sets the ACK.
The NI-CAN Channel API monitors this for a while and in case that no node acknowledges the frame, returns an error. However, this somewhat ‘forces’ a specific order for devices to activated. There is a way to turn the automatic retransmission off, but I wouldn't recommend it here:
Use the CAN Set Property (Single Shot Transmit) VI and set the value to ‘1’. However, this should only be used for debugging purposes (or niche applications) as it technically violates the CAN specification and might cause other undesired behavior in your CAN network (e.g. nodes that are asleep sometimes need the first transmission to wake up, but don't receive all bits and thus rely on the retransmission to receive the entire frame).
In your case, it might just be easier to define a special message that all nodes in your network interpret as an ‘end-of-session’- message. Any node that receives that message will seize all communication.
I modified one of the shippping examples for demonstration (see attached).
Regards,
-B2k