I'm wondering, how can we add a delay or wait function between messages in PCAN-Router FD. ( I need to add 20s or more delay here)
EX: I'm changing CAN ID 0X200 to 0X201 and change byte in 201 based on the value of 200.
Code: Select all
if ( RxMsg.id == 0x200 && RxMsg.msgtype == CAN_MSGTYPE_STANDARD)
{
RxMsg.id = 0x201;
RxMsg.msgtype =CAN_MSGTYPE_STANDARD;
if(RxMsg.data8[0] == 0x10 ||RxMsg.data8[0] ==0x08)
{
RxMsg.data8[0]=0x01;
[u][b](how can I add 20s delay here?)[/b][/u]
}
else if(RxMsg.data8[0] == 0x18)
{
RxMsg.data8[0]=0x21;
}
Thanks