rbei-etas / busmaster

BUSMASTER is an Open Source Software tool to simulate, analyze and test data bus systems such as CAN. BUSMASTER was conceptualized, designed and implemented by Robert Bosch Engineering and Business Solutions (RBEI). Presently it is a joint project of RBEI and ETAS GmbH.
http://rbei-etas.github.com/busmaster/
GNU General Public License v3.0
949 stars 500 forks source link

Transmitting scripts with Busmaster #1124

Open hkarnat opened 6 years ago

hkarnat commented 6 years ago

I want to transmit a CAN script cyclically with Busmaster, instead of transmitting individual messages. Is there any way this can be done?

FrankGerlachFlex commented 5 years ago

Yes, it works nicely for me.

Just create a Node and add the following Timer code. It will create a Huuuge ramp from 0 to 65535. Then again 0...

 static int i=0;  
 STCAN_MSG msg;
 msg.id = 0x18EF70C9;
 msg.isExtended = true;
 msg.isRtr = false;
 msg.dlc = 8;
 msg.data[0] = 0;
 msg.data[1] = 0;
 msg.data[2] = 0;
 msg.data[3] = 0;
 msg.data[4] = i ;
 msg.data[5] = i >> 8;
 msg.data[6] = 0;
 msg.data[7] = 0;
 msg.cluster = 1;
 i++;
 SendMsg(msg);