You need to read the helpfile for your assembler/compiler - to check what it sends - but commonly placing quote marks around a figure (like '1') instructs it to send the ASCII character inside the quotes (which is what you appear to be getting).
But D'129' etc. doesn't really make much sense - D is trying to send a decimal numeric value, and the quotes are trying to send an ASCII character.
This is what I want to do.I have many slaves connected to two wire bus.I'm giving commands through a PC.
Ex: Turn ON relay 4 on slave 2.
The attachment shows the frame I'm using.In simply its a MODBUS frame.
Earlier I planned to use a binary format frame but when PC sends commands the frame data goes to all slaves so it is unable to detect the start & end of a frame.
So I planned to use ASCII format frame.The problem is when using ASCII to show a single byte it needs to send as two ASCII characters so the frame length will be doubled.
It doesn't look like a modbus frame. If it was ASCII, it's missing a leading ":" and a trailing linefeed (vbLf). If it's binary/RTU then it has an unwanted trailing 0x0D.
Earlier I planned to use a binary format frame but when PC sends commands the frame data goes to all slaves so it is unable to detect the start & end of a frame.
So I planned to use ASCII format frame.The problem is when using ASCII to show a single byte it needs to send as two ASCII characters so the frame length will be doubled