From: louis_nichols on
Hi everybody! More VISA troubles, it seems.
 
I have a little module that goes a little something like this.
 
VISA write -> VISA read -> VISA flush -> VISA read again
 
This is because I send a message via a serial converter that loops back the request, so I have to flush it.
 
Now, I use this module (let's call it serial1) in another application that looks something like this:
 
VISA configure serial port > VISA serial break for 25ms > wait 25 ms > serial1 > do actions
 
OK. The thing is that serial1 works on it's own, but when used in the sequence above, I get an error -1073807298 from the first VISA read in serial1.
 
This is very puzzling and unexplainble to me.
 
Does anyone know why this might be?
From: louis_nichols on
Hi Jason! Thank you again for your answers and interest.
My answer comes later because I was assigned to another project this week and got back to my problem just today. I managed to solve that problem, it seems and I think I know the cause of it, too.
Long story short, the current, working solution can be seen in the attached image.
<img src="http://forums.ni.com/attachments/ni/170/216920/1/aaa.JPG">
before I didn't use that while loop before doing the VISA read and I think the error was because, at the time it was trying to read, the required number of bytes was not present in the buffer. I think...
Anyways, that works now. I have another problem, though. After the sequence aabove, I perform another read using this sequence.Message Edited by louis_nichols on 11-23-2006 09:08 AM


aaa.JPG:
http://forums.ni.com/attachments/ni/170/216920/1/aaa.JPG


bbb.JPG:
http://forums.ni.com/attachments/ni/170/216920/2/bbb.JPG
From: louis_nichols on
Sorry about that! It won't let me edit the message anymore. The block diagram for the read is this one:
<img src="http://forums.ni.com/attachments/ni/170/216920/3/bbb.JPG">
as I said, it won't read the whole message sent by my peripheral device...
From: louis_nichols on
Hi TonP! Thanks for your suggestion!
The format and length of the message can indeed be deduced from the header. But it would involve more processing that I am hoping to use at this level of my application. I am trying to find a way to receive the message without performing any processing of its contents.
 | 
Pages: 1
Prev: Multiple DDE Servers open
Next: USB 6009