chiupohsiang Posted June 7, 2007 Report Share Posted June 7, 2007 Now, I want to press "start" button, and then type "start" string, it can start receiving 0~255 A/D data from single chip. When I type "end" string in my "input string" box, it can transmit "end" to my single chip, and then single chip will stop. Why my LabVIEW can not do it? Can you help me? Thank you. P.S.:My single chip program has already passed testing by Windows Hyper Terminal. When I type "start" string single chip can transmit 0~255 to Hyper terminal, when I type "end" string single chip will stop transmit 0~255 A/D data. Now, I just want to design a interface which it function like a Hyper Terminal. Quote Link to comment
Jeff Plotzke Posted June 7, 2007 Report Share Posted June 7, 2007 QUOTE(chiupohsiang @ Jun 5 2007, 11:14 PM) Now, I want to press "start" button, and then type "start" string, it can start receiving 0~255 A/D data from single chip. When I type "end" string in my "input string" box, it can transmit "end" to my single chip, and then single chip will stop. Why my LabVIEW can not do it? Can you help me? Thank you. P.S.:My single chip program has already passed testing by Windows Hyper Terminal. When I type "start" string single chip can transmit 0~255 to Hyper terminal, when I type "end" string single chip will stop transmit 0~255 A/D data. Now, I just want to design a interface which it function like a Hyper Terminal. A few things I see: -You close your VISA reference after you write to the serial port, but before you read. You should leave the port open until you want to stop reading/writing. -This program constantly writes whatever string is in 'input string' every iteration of the loop... So, right now, it does: Configure Serial Port Write String to Port Read 8 bytes from Port Configure Serial Port Write String to Port Read 8 bytes from Port Configure Serial Port ... Is this really what you want? I take your description to be: Configure Serial Port Write String to Port Read 8 bytes from Port Read 8 bytes from Port ... Read 8 bytes from Port Write 'End' String to Port Close Serial Port You'll need to look at the order of what you're executing. I'm guessing you'll want to put the serial read into a while loop to read the A/D data. Remember, you can also use the 'highlight execution' option to follow what your code is doing. Quote Link to comment
nature Posted March 17, 2009 Report Share Posted March 17, 2009 QUOTE (Jeff Plotzke @ Jun 6 2007, 01:59 PM) A few things I see:-You close your VISA reference after you write to the serial port, but before you read. You should leave the port open until you want to stop reading/writing. -This program constantly writes whatever string is in 'input string' every iteration of the loop... So, right now, it does: Configure Serial Port Write String to Port Read 8 bytes from Port Configure Serial Port Write String to Port Read 8 bytes from Port Configure Serial Port ... Is this really what you want? I take your description to be: Configure Serial Port Write String to Port Read 8 bytes from Port Read 8 bytes from Port ... Read 8 bytes from Port Write 'End' String to Port Close Serial Port You'll need to look at the order of what you're executing. I'm guessing you'll want to put the serial read into a while loop to read the A/D data. Remember, you can also use the 'highlight execution' option to follow what your code is doing. hi u have alredy completed rs232 interfacing with hyperterminal.i m trying on dat from 2 weeks bt it showin nothin in hyperterminal.i have set baudrate of 1200 for 16mhz crystal is it k na? i m attaching both dia n code here u plz tel me wat to do? hi...m doin my final sem pro n in dat i want to interact pc with rs232 n rs232 wil get data via 89c51.i want to create such platform in labview..can u plz suggest me hw? i have tried for 2 weeks interfacing rs232 n 89c51 n watching output in hyperterminal bt its nt showin anything. i m attaching hardware n code here u plz check it n tel me whr its wrng? Quote Link to comment
bmoyer Posted March 17, 2009 Report Share Posted March 17, 2009 QUOTE (nature @ Mar 16 2009, 07:18 AM) hi u have alredy completed rs232 interfacing with hyperterminal.i m trying on dat from 2 weeks bt it showin nothin in hyperterminal.i have set baudrate of 1200 for 16mhz crystal is it k na? i m attaching both dia n code here u plz tel me wat to do?hi...m doin my final sem pro n in dat i want to interact pc with rs232 n rs232 wil get data via 89c51.i want to create such platform in labview..can u plz suggest me hw? i have tried for 2 weeks interfacing rs232 n 89c51 n watching output in hyperterminal bt its nt showin anything. i m attaching hardware n code here u plz check it n tel me whr its wrng? Srry, i dn't spk/wrt th sm lngge s u (Sorry, I don't speak/write the same language as you). This is an English forum, so please write in English. Bruce Quote Link to comment
nature Posted March 18, 2009 Report Share Posted March 18, 2009 i am sorry if that shortcut language was not ok.. but can you please give me any suggestion for my project.i have also attached my circuit diagram and the code in previous reply. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.