Hi tonyf,
I don't think that there is any good way of doing this.
- Any passive element that you're connecting to the CAN_H and CAN_L lines has an impact on the overall impedance of the network, and thus can cause bus errors.
- You can't directly add opto-couplers as they would need some logic to drive them with the differential signal. Further more, these elements add a delay to all bits (both ways, Rx and Tx) and this propagation delay could cause the ACK bit of being transmitted to late (and violates the ISO 11898 specification).
- A solution with 24V rated Zener diodes is also likely to fail, as they would break, in case the voltages on the lines go below -0.6V, which could happen.
However, according to
this information, National Instruments Series 2 CAN cards use the TJA 1040/41 CAN transceiver which has a maximum input range of -27 to +40V. So, you should be fine with 24V. As those cards are fairly new, it could be that at the time when you posted this question, only the older hardware with the 82C250 tranceivers (-8 to +18V input range) was available.
-B2k