01-30-2013 10:56 AM
hi..
i have any problem with serial read. i want to multiple reading in visa serial..fist read i want to read 5x8bit data from uC then if data visa read isnot 'NOT' i will send data to uC as character 'S' end then read data from uC again but data leght is 2x8bit data..
please, help me..
Solved! Go to Solution.
01-30-2013 11:28 AM
There is nothing in that VI that even resembles your question. There's not much in that VI at all. If you want to read 5 bytes then you need a VISA Read with 5 wired to the byte count input.
01-30-2013 11:43 AM
can u give example?
programs or picture?
01-30-2013 12:00 PM
Have you looked at the examples that come with LabVIEW? There is the Basic Serial Write and Read and the Advanced Serial Write and Read.
01-30-2013 12:23 PM
i don't understand with number byte count in read node
01-30-2013 12:35 PM
It's the number of bytes you want to read. You already said you first wanted to read 5 bytes. If you use the VISA Configure Serial Port and set the termination character enable to true, you can set a high byte count and the read will terminate when the termination character is detected. The default termination character is a linefeed. If you set it to false, you can use the VISA Bytes at Serial Port to determine how many bytes are in the buffer and read that number. That is what the basic example is doing.
Have you done any basic debug of serial communication? I would suggest you use a program such as Hyperterminal/Procomm/Putty/.etc before you try to write your own program. It's also difficult to give detailed advice without knowing how you have programmed the micro's serial communication.
01-30-2013 12:56 PM
i have tried in hyper terminal and sukses. fist step i send data in string format as 'ACK' from PC to uC. if uC recieve 'ACK', uC will send data1-5 in binary format, if it doesn't recieve ACK uC will send 'NOT' to PC. and if PC recieve data 1-5, PC will send 'S' as interupt for uC to start process. otherwise uC will return to initial condition