Hello,
If I use two USB PCAN FD devices to send messages to each other (with the PCAN Basic API), would the communication still work if one of the CAN wire gets broken? I guess it depends if you use a fault-tolerant transceiver?
If the CAN communication would still work, would is there a way from the PCAN Basic API to detect that something is wrong?
Thank you in advance!
Best regards,
Ludovic
Detect broken CAN wire from PCANbasic API.
Re: Detect broken CAN wire from PCANbasic API.
Hi,
with PCANBasic API you can just detect the error frames or error status messages, but there is no option to directly detect a broken wire. When using a fault tolerant CAN transceiver, there is a output pin which will inform about such a wire problem. However, these outputs are typically put on LEDs and could not be read by the API with our PCAN-TJA1054 Converter.
regards
Michael
with PCANBasic API you can just detect the error frames or error status messages, but there is no option to directly detect a broken wire. When using a fault tolerant CAN transceiver, there is a output pin which will inform about such a wire problem. However, these outputs are typically put on LEDs and could not be read by the API with our PCAN-TJA1054 Converter.
regards
Michael
Re: Detect broken CAN wire from PCANbasic API.
Thank you Michael for your fast feedback.
Actually I don't need to have a flag "broken wire", I just need to be able to detect that something is wrong (even if I don't know for sure whether the rootcause is a broken wire or something else).
So have I understood correctly that if a wire is broken, I could find out that something is wrong using the GetStatus from the PCANBasic API which would return (I guess) BusHeavy, BusLight, BusPassive, BusWarning, or BusOff?
I also see in the documentation the PcanParameter "AllowErrorFrames" to activate the reception of error frames, but it's not clear for me how these error frames are then readable through the PCANBasic API?
Actually I don't need to have a flag "broken wire", I just need to be able to detect that something is wrong (even if I don't know for sure whether the rootcause is a broken wire or something else).
So have I understood correctly that if a wire is broken, I could find out that something is wrong using the GetStatus from the PCANBasic API which would return (I guess) BusHeavy, BusLight, BusPassive, BusWarning, or BusOff?
I also see in the documentation the PcanParameter "AllowErrorFrames" to activate the reception of error frames, but it's not clear for me how these error frames are then readable through the PCANBasic API?
Re: Detect broken CAN wire from PCANbasic API.
Hi,
PCANBasic will set the status messages and the error frames in the receive queue, like a normal CAN message, just the MESSAGETYPE of thise messages is different. See help of PCANBasic API -> CAN_Read() section for more details.
regards
Michael
PCANBasic will set the status messages and the error frames in the receive queue, like a normal CAN message, just the MESSAGETYPE of thise messages is different. See help of PCANBasic API -> CAN_Read() section for more details.
regards
Michael