Hey,
I have a constant stream of data to CAN 4 and I want to pass one message to CAN 1, only when a RTR is sent to CAN 1. Is it possible to save the latest CAN message from CAN 4 in a buffer and when the RTR is sent on CAN 1, this buffer is emptied? Currently I am using the PPCAN editor 2 software.
I tried it like below, where the message from CAN 4 is transferred to CAN 1, but I need to send a second RTR to stop the router from passing the data, and I want to only sent this RTR once.
When I change the direction from receive to transmit, I can see by the LED's that data is being transferred only when a RTR is sent, but the transmitted data are always 0's.
I am still new with this software, so thank you in advance.
transmitting data from CAN 4 to CAN 1 only when RTR is received
Re: transmitting data from CAN 4 to CAN 1 only when RTR is received
Hello,
you cannot use the gateway function in this case, because the gateway function will always send the message.
Please configure the transmit message for bus CAN1 that should be transmitted when an RTR frame is received, but set the transmit period to 0 and enable RTR. Enable RTR means the message is transmitted when an RTR is received. Transmit period of 0 means that the message is not transmitted by a time event.
The receive data can be stored strored in internal variables (IO-Fuction 0xff). Up to 256 variables can be used.
Please put all required databytes from the receive message on bus 4 into variables, and use the same variables for the transmit message. The transmit message is now only transmitted when an RTR is received, and the databytes are the last received databytes form the message on CAN bus 4.
Regards,
Gunnar Bohlen
you cannot use the gateway function in this case, because the gateway function will always send the message.
Please configure the transmit message for bus CAN1 that should be transmitted when an RTR frame is received, but set the transmit period to 0 and enable RTR. Enable RTR means the message is transmitted when an RTR is received. Transmit period of 0 means that the message is not transmitted by a time event.
The receive data can be stored strored in internal variables (IO-Fuction 0xff). Up to 256 variables can be used.
Please put all required databytes from the receive message on bus 4 into variables, and use the same variables for the transmit message. The transmit message is now only transmitted when an RTR is received, and the databytes are the last received databytes form the message on CAN bus 4.
Regards,
Gunnar Bohlen
Re: transmitting data from CAN 4 to CAN 1 only when RTR is received
That worked, thank you very much! 
