LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rs232 Serial Communication VISA Write not working

Solved!
Go to solution

I am trying to send a HEX command of 5003 01 to my PCB that I am connected to via Rs232. This command should get my PCB to switch reading modes.

 

I posted about this problem before thinking it was a problem with it not being sent in HEX:

 

http://forums.ni.com/t5/LabVIEW/Rs232-Serial-Communications-VISA-using-HEX-Values-seem-to-be/m-p/326...

 

That was not the problem.

 

I am using the CTS line for flow control. I know the CTS signal is reaching the computer from my PCB as I tested it and I know the PCB can send data to the computer as I am getting the correct 4 byte response in HEX when I use the read visa to get the data from my reader PCB.

 

I get an error -1073807339 when I try to write even when the read function is off.

 

The only thing I can think of is that LabView is not recognising the CTS signal going low and therefore time's out.

 

I am using the correct 9600 Baud Rate, 8 data bits, no parity and 1 stop bit. I am using RTS/CTS flow control but the RTS channel is not connected. I dont think this should be a problem as RTS is used to tell the board when to send data to the PC to my knowledge and that doesn't matter.

 

FYI the written string section of the VI is unused. String to write is where I am inputting my "5003 01" command.

 

Thank you,

 

Kyle

0 Kudos
Message 1 of 5
(4,010 Views)

What is wrong with having no synchronization?  You just read 4 bytes whenever you think there should be data available and you send it whenever you need to.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,977 Views)

I need to have synchonization to send the command to the PCB as it will only accept commands when the CTS line is low. No synchronization is needed for the output. I only need it for the input hence the use of the CTS line. I does not send however and I dont know why.

0 Kudos
Message 3 of 5
(3,937 Views)

Can you give a diagram of how you have this wired up?  And where did this PCB come from?  Is it a UART you have control over?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(3,915 Views)
Solution
Accepted by topic author KyleF.LabView

I just figured it out. I had messed up the wiring of the CTS line. It was inputting the RTS line i think. I thought I had it correct as the Tx line was correct. Thank you for your help on the HEX problem.

0 Kudos
Message 5 of 5
(3,901 Views)