03-08-2016 08:39 AM
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:
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
Solved! Go to Solution.
03-08-2016 01:47 PM
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.
03-09-2016 06:39 AM
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.
03-09-2016 07:26 AM
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?
03-09-2016 08:18 AM
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.