Sending SPI Bits as blocks

Hello,

I'm just a little hung up on a probably simple problem.
I would like to output 9 times 24 bits (216 bits) via the SPI. I always want to output 24 bits at once, then e.g. have 1µs pause in between and output 24 bits again. After the 9 times, a longer pause is to be inserted, in order to repeat the whole in the connection, but that is not worth the speech.
My idea so far was to send 3 bytes, then delay(0.001); and then repeat the whole thing with a counter and a while loop.
In principle the whole thing works, too, but I would like to have a complete packet of 216 bits always sent out, as in the picture and not always one after the other. I hope you understand what I'm getting at.

Best regards and thanks!

//with 
const byte READREGISTER = 0b00000000;

//and in the loop:

  x = 1;
  while (x <= 1)
  {
    SPI.transfer(&READREGISTER);
    SPI.transfer(&READREGISTER);
    SPI.transfer(&READREGISTER);
    delay(0.001);
    x=x+1;
  }

Please post a complete program rather than a snippet out of context

You do have the option of:

SPI.transfer(buffer, size)

So you could transmit a complete 24 bit buffer at once.
In your while loop, you have to load your 24 bit buffer with the next 24 bits to be transmitted.
Your loop will be wrapped with the code to manipulate the CS pin and the begin/end transaction.

Thanks, I've solved my problem by then.
How can I save the values of MISO?
When I write "save = SPI.transfer(READREGISTER,3) I get an error message "void value not ignored as it ought to be". Of course I declared "save" before.

As always, the source code is the ultimate documentation. From SPI.h:

inline static void transfer(void *buf, size_t count) {
    if (count == 0) return;
    uint8_t *p = (uint8_t *)buf;
    SPDR = *p;
    while (--count > 0) {
      uint8_t out = *(p + 1);
      while (!(SPSR & _BV(SPIF))) ;
      uint8_t in = SPDR;
      SPDR = out;
      *p++ = in;
    }
    while (!(SPSR & _BV(SPIF))) ;
    *p = SPDR;
  }

So, you can see that the read values are clocked into the data buffer that you provide at the same time the write values are clocked out from it.

Wing354:
Thanks, I've solved my problem by then.
How can I save the values of MISO?
When I write "save = SPI.transfer(READREGISTER,3) I get an error message "void value not ignored as it ought to be". Of course I declared "save" before.

For this specific issue, where you need a return code from SPI.transfer, you have these 2 options (in addition to the code supplied by @gfvalvo.

receivedVal = SPI.transfer(val )
receivedVal16 = SPI.transfer16(val16 )
SPI.transfer(buffer, size )

from: SPI - Arduino Reference

From the code sample in your OP, it was not clear that you were later going to use a return code.