Arduino sending Binary Numbers

I'm trying to send the ASCii character codes 254 and 8 through Arduino Mega to a relay (more later, but for now just those two in that order). The relay is a R410pro.

The relay works when receiving data from a C sharp program. However, I am struggling to send the ASCii codes from the Arduino to the Relay and getting a response. As of now, it is doing nothing.
It seems as though I am missing something as the Arduino will talk through Serial1 to another computer correctlly, just not the relay. I've switched the TX/RX to see it that's wrong, no luck.

I've tried this...

void setup()
{
  Serial.begin(9600); //pins 1 and 0 for Serial
  Serial1.begin(9600);
}
    unsigned char  thisByte = 254;
   unsigned char nextByte = 8;
void loop()
{
                Serial1.print(thisByte, BIN);
              Serial1.print(nextByte, BIN);
              
              if (Serial1.available()>0){
                Serial.print("Relay Serial is recieving data"); //nothing ever comes back
              
            }
delay(10);
}

and this....

void setup()
{
  Serial.begin(9600); //pins 1 and 0 for Serial
  Serial1.begin(9600);
}
    byte thisByte = 254;
   byte nextByte = 8;
void loop()
{
                Serial1.print(thisByte, BIN);
              Serial1.print(nextByte, BIN);
              
              if (Serial1.available()>0){
                Serial.print("Relay Serial is recieving data"); //nothing ever comes back
              
            }
delay(10);
}

and this...

void setup()
{
  Serial.begin(9600); //pins 1 and 0 for Serial
  Serial1.begin(9600);
}
   int a = B11111110;
   int b = B00001000;
void loop()
{
         
              Serial1.write(a);
              Serial1.write(b);
              
              if (Serial1.available()>0){
                Serial.print("Relay Serial is recieving data"); //nothing ever comes back
              
            }
delay(10);
}

but nothing happens to the relay.
Any help would be great.

              Serial1.write( 254 );
              Serial1.write( 8 );

But, that is probably functionally equivalent to the last version you posted. I suspect there is something else wrong.

Does the the relay have a TTL serial port or an RS-232 serial port? Never mind ... "RS-232 Input Levels".

Do you have a TTL to RS-232 converter on Serial1?

I have tried two things for a TTL to RS232 conversion. The relay board has two jumpers that are set for Input Data Voltage: +/5V and Output Data Mode: TTL1/+5V and according to the manual this should work directly with the Arduino. However, I have also tried using a Microchip232 circuit (I have used it to go from serial1 through an RS232 to a computer successfully) with the relay and I still get nothing.

Does the documentation for the relay mention anything about control lines (CTS, DTR, RTS, DSR)?

I know this might be a bit to basic... But - Do you also have a ground connected for the serial communications??

Thanks for your replies.

CodingBadly, I reread the relay manual and found nothing on control lines. The relay works fine without them when it is run with a C# program. Also, there are only enough blocks on the relay for RX, TX, GND, and power source/ground, so I don't see them as being necessary (though I've been wrong before...).

In response to kf2qd, there is a ground connection for the serial communicators. It goes from the relay RS232 ground to the GND on the Mega 2560. I've double and triple checked to make sure it is the correct connection. When the relay is connected to the Arduino GND, that is considered a "Power Supply ground of the board," correct?

Thanks again.

The relay works when receiving data from a C sharp program.

Post it (the smallest possible C# code that works).