LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rs232 not working on new computer?

Solved!
Go to solution

Ok you beat me to it.

 

It looks like your port settings are ok.  use a 13 for the term char and remove the 13's (CR constants)

 

Also check the pump settings: the address (00) and baud rate of the pump must match your code and has to be set from the pump's config menu.


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 32
(1,580 Views)

Why are you reading back in the number of bytes that you just wrote out?  What says that if you write out X bytes in a message, the response is also going to be X bytes?

 

Also, it is not a good idea to have 3 parallel VISA write read pats for a single VISA resource.  How do you know that the read message you get is in response to the message you just wrote.  The 3 parallel paths could be stepping on each other.

Message 12 of 32
(1,581 Views)
All the pumps have a different address, and the pump has an in and an out port on it so you can connect them all together. So only one pump communicates with labview directly. Where do i make the term char 13?
0 Kudos
Message 13 of 32
(1,580 Views)
OK i set the term char to 13, and all the addresses, bauds, etc are correct however i still get the error.
0 Kudos
Message 14 of 32
(1,575 Views)

This should work better. The pump sends CR LF as termination char. The termination char is set to 13. But the LF will still be in the read buffer. What is why I have included a dummy read to empty the buffer

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 15 of 32
(1,572 Views)
Still getting the error im afraid. Ive attached the screen shot.
0 Kudos
Message 16 of 32
(1,570 Views)
It is also important that for every write to the pump. Read the full replay from the pump. If the replay from the pump is not read. Else it will stay in the read buffer. And how often do you need to check the pump rate. Now you are doing it very frequent. Put a wait in your loop.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 17 of 32
(1,553 Views)

OK that was a lot of information I did not fully understand. I am pretty new to labview can you make it simpler for what i need to do? thanks

 

0 Kudos
Message 18 of 32
(1,549 Views)

This is just a guess.  Try putting a small delay between the write and the first read inside your loop.  Another suggestions is to use the Bytes At Port function before the read.  Then connect the number of bytes output from Bytes At Port to the Bytes to Read input on the read function.

 

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 19 of 32
(1,536 Views)

Did you read my post?

 


Ravens Fan wrote:

Why are you reading back in the number of bytes that you just wrote out?  What says that if you write out X bytes in a message, the response is also going to be X bytes?

 

Also, it is not a good idea to have 3 parallel VISA write read pats for a single VISA resource.  How do you know that the read message you get is in response to the message you just wrote.  The 3 parallel paths could be stepping on each other.


 

0 Kudos
Message 20 of 32
(1,527 Views)