03-04-2013 05:50 AM
I have a problem I need to read every 3 bytes which I do but because of the set 3 I can't write at the same time. There is a big delay which is really unwonted.
Pleas help me set the writing or change the read so it will still read vary 3 bytes to one place but will be able to write as well
03-04-2013 08:28 AM
I don't understand your question. What do you mean by "because of the set 3"? What delay are you talking about?
"Read vary 3 bytes"???
03-04-2013 08:37 AM
Avery 3 bytes read form data. thet`s why on the read of the visa I set 3 bytes to be read.
Before I did that the reading and writing worked well.
After I set the visa read to 3 bytes the write is suffering from a dilay of several seconds I gees seens the read is trying to read all 3 bytes first.
The 3 byte read is necessary.
So IM asking if its possible to solve the write delay problem.
Thanks
03-04-2013 08:46 AM
Instead of just "Read 3 bytes" you can use the Visa Check characters at serial ports and check if there's 3 or not.
/Y
03-04-2013 08:49 AM - edited 03-04-2013 08:50 AM
Of course it's going to wait until all 3 bytes are available if you are asking it to read 3 bytes. But it shouldn't take that long for 3 bytes to come in.
Why do you think you have a delay on your write?
You haven't told us anything about the equipment you are communicating with, or how it is supposed to function. Do you need to send the write command each time in order for the 3 bytes to be sent? If so, why do you have the Write in a case structure that is tied to a button with latch action? That means it will only send the command to write each time you actually press the button.
Why do you have 2 write buttons?
03-04-2013 09:01 AM
2 write buttons are just me trying to set the write to work.
The system is working via xbee and I have to send sorten commands. After which I am receiving samples to my system and display them on a graph
the bytes at port was my original option but I have to get 3 bytes
03-04-2013 09:35 AM - edited 03-04-2013 09:37 AM
That's all well and good, but you still didn't answer most of my questions.
Why do you think you have a delay on Write?
Is it a Write command/Read response type communication with the device?
Why do you have a latch action on the write buttons?
I would suggest straightening up the architecture. I think the multiple write buttons buried within case structures are causing you more problems than you think it is helping.
03-04-2013 11:59 AM
Alex,
Why not post what you have implemented so far so that we can see what you are doing.
You can post a snippet of your code (Edit menu).
03-04-2013 12:18 PM
im ataching it again ,,,
03-04-2013 12:24 PM - edited 03-04-2013 12:25 PM
And the answers to my other questions .....
??