Sending simple sequenced messages

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
PaulS
Posts: 4
Joined: Wed 18. Jun 2014, 17:25

Sending simple sequenced messages

Post by PaulS » Wed 18. Jun 2014, 17:37

Hi,

I would like to send the following messages in order using PCAN-Explorer 5 with a 10 ms pause between them.
Something like the below...

Send 10AA0099h 4 01h 02h 03h 04h
Pause 10
Send 10BB0099h 8 10h 12h 13h 14h 15h 16h 17h 18h
Pause 10
Send 10BB0099h 8 21h 41h 42h 43h 44h 45h 20h 20h
Pause 10
Send 10BB0099h 8 22h 0Ah 20h 20h 20h 20h 20h 20h
Pause 10
Send 10BB0099h 8 23h 41h 42h 43h 44h 45h 20h 20h

How can I do this? Do I have to use a macro? If so how is it done?

Paul

User avatar
M.Gerber
Design & Documentation
Design & Documentation
Posts: 68
Joined: Mon 13. Sep 2010, 16:34

Re: Sending simple sequenced messages

Post by M.Gerber » Thu 19. Jun 2014, 10:18

Hello Paul,

You have already almost written a macro above. :)

But first things first: PCAN-Explorer 5 provides an easy-to-learn macro implementation for simple tasks like yours, called Standard Macro (besides the VBScript macros). You can create a new Standard Macro by using the menu command File > New > New File > Standard Macro.

Your task then looks like this:

Code: Select all

FormatVersion=5.0

Send 1 10AA0099h 4 01h 02h 03h 04h  // First parameter = Bus no. (see Connections panel)
Wait 10  // Pause in ms
Send 1 10BB0099h 8 10h 12h 13h 14h 15h 16h 17h 18h
Wait 10
Send 1 10BB0099h 8 21h 41h 42h 43h 44h 45h 20h 20h
Wait 10
Send 1 10BB0099h 8 22h 0Ah 20h 20h 20h 20h 20h 20h
Wait 10 
Send 1 10BB0099h 8 23h 41h 42h 43h 44h 45h 20h 20h
Save the macro (*.mcr) and add it to your project (e.g. in the Project Browser). Afterwards you can select the macro in the Macro toolbar and run it from there.

When running a Standard Macro, a separate window displays the progress. The transmitted CAN messages are also shown in the Transmit panel (Trigger: Macro).

For further information about Standard Macros see the PCAN-Explorer Help, section Reference > Standard Macros.

Kind regards
Mark

PaulS
Posts: 4
Joined: Wed 18. Jun 2014, 17:25

Re: Sending simple sequenced messages

Post by PaulS » Thu 26. Jun 2014, 15:19

Hi Mark,

Thank you for the info. It worked great!

Paul

Post Reply