Send a single Can Bus ID without data once on start up

Hi,
I’m attempting to get my arduino mega and sparkfun CANbus shield to speak with a motor control board for an AC motor invertor. The outcome i’d like is that when the system powers on, the arduino sends a CAN message 0x820 to the control board for the AC motor invertor to tell the control board to start doing control board things, without the CAN message, it powers on but does nothing except flash LEDs blankly at me. I’ve borrowed code from Henry’s Bench which was originally designed to send a CAN message repeatedly every 25ms. (from here: http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/arduino-can-bus-module-1st-network-tutorial/)
I dont need it to send data, just the ID, and just once.

While the code compiles without error, I am not sure if i have correctly removed the data portion of the code.
Originally the code read:

long unsigned int txID = 0x1881ABBA; // This format is typical of a 29 bit identifier.. the most significant digit is never greater than one.
unsigned char stmp[8] = {0x0E, 0x00, 0xFF, 0x22, 0xE9, 0xFA, 0xDD, 0x51};

blah blah other code

CAN.sendMsgBuf(txID,1, 8, stmp); // send the data:  id = 0x00, Extended Frame, data len = 8, stmp: data buf
                                                   // Extended Frame = 1.

I understand the code up to the " ,1, 8, stmp" bit
really dont know what the 1 is. i think the 8 has something to do with the number of bytes but changing this number and the number of bytes didnt cause an error, i dont know what stmp means. I tried deleting the unsigned char stmp… line and just running CAN.sendMsgBuf(txID); but it was not happy. it gave error message no matching function for call to ‘MCP_CAN::sendMsgBuf(long unsigned int&)’

my complete code is below. it compiles correctly

#include <mcp_can.h>
#include <SPI.h>


const int SPI_CS_PIN = 10;

// Build an ID or PGN

long unsigned int txID = 0x820; // This format is typical of a 29 bit identifier.. the most significant digit is never greater than one.
unsigned char stmp[0] = {};

//Construct a MCP_CAN Object and set Chip Select to 10.

MCP_CAN CAN(SPI_CS_PIN);                            


void setup()
{
    Serial.begin(9600);

    while (CAN_OK != CAN.begin(CAN_500KBPS))              // init can bus : baudrate = 500K
    {
         Serial.println("CAN BUS Module Failed to Initialized");
        Serial.println("Retrying....");
        delay(200);
        
    }
    Serial.println("CAN BUS Shield init ok!");
    delay(500);
    CAN.sendMsgBuf(txID,1, 0, stmp);
}


void loop()
{   Serial.println("In loop");

    // send the data:  id = 0x00, Extended Frame, data len = 8, stmp: data buf
    // Extended Frame = 1.
    
}

have you looked at the exampled in the mcp_can library?

Thank you Sherzaad,
I had read the original article on instructables but found some other information in there that was useful thank you.

IT says
CAN.sendMsgBuf(INT32U id, INT8U ext, INT8U len, INT8U *buf);
This is a function to send data onto the bus. In which:

id represents where the data come from.

ext represents the status of the frame. '0' means standard frame. '1' means extended frame.

len represents the length of this frame.

buf is the content of this message.

For example, In the 'send' example, we have:

unsigned char stmp[8] = {0, 1, 2, 3, 4, 5, 6, 7};

CAN.sendMsgBuf(0x00, 0, 8, stmp); //send out the message 'stmp' to the bus and tell other devices this is a standard

This tells me what the parts of the message are for. Not really clear yet on the alternatives. I cant find any examples without the data being sent.
I'll keep reading and if anyone can provide any more suggestions for info or code please send them along.

Thanks again
Glenn