Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

RS-485, Unable to generate desired serial data frame

Solved!
Go to solution

Hi Reader,

 

Hope you are doing good,

 

I am trying to communicate to a feedback device which I believe, follows UART based, 2-Wire, RS-485 communication at 9600 Baud. I went through some examples and physically set up the RS-485/422 port on sbRIO-9638 to support 2-wire setup.

 

Created a VI just to make sure that I can setup VISA Module first and send desired signals out. I know what the "Data format" / "Serial Data Frame" should look like but I am unable to re-create it. I tried sending out [HEX, Decimal, String and Binary] values to String to "VISA Write" but I think I am doing something fundamentally wrong here, not sure what.

 

I do not have background knowledge for serial communication so basically going by hit and trial and reading material online to confuse myself. After 4 days with no success, I am hoping if anyone can direct me in the right direction.

 

At max, I am able to match the first 8 bits of the data and then after that it is just something random. Also, voltage levels look different as compared with how signals appears on probing the working communication between master and slave. 

 

1) When device is communicating (High state is at +2.5V and Low is at -2.5 Volts, and goes to zero at what appears to be a timeout period)

DS1Z_QuickPrint6.png

 

2) Signals when I attempt to generate them: (High at +5V and Low at 0 V). Starts at around 2.5V.

DS1Z_QuickPrint7.png

I have added technical details on the block diagram on the VI.

Any help is much appreciated! Thank you for reading.

0 Kudos
Message 1 of 2
(962 Views)
Solution
Accepted by topic author XM43

I figured it out,

 

So if it helps any one like me. Do not ignore parity settings 😑 that changes how your serial output data would look like. I had my parity selected wrong and had some missing bits. Once I fixed that, I just had to simply recreate one bit at a time I am sure there are better and more educated way to do it.

But this is what worked for me and I am having a happy Monday.

0 Kudos
Message 2 of 2
(887 Views)