04-18-2011 06:45 PM
Hi , please i need an urgent help..
i am working on a project where i need to send data to a PIC microcontroller, through max232.
the type of data that should be sent is an 8bit binary data. although as i noticed that LABVIEW can not send serially binary bits.
is there any way i can send those Bytes serially to the max232 ??? IF NOT, what block diagram i should use in order to send it ??!?
thx
Solved! Go to Solution.
04-18-2011 07:44 PM
Let's start with the basics...
Are you able to manually communicate with your PIC u-ctrler using a terminal emulator program such as Terraterm, Hyperterminal, etc?
If so, then what do you transmit?
If so, you can go in the Help menu, and look for "Find Examples...", select the search tab (middle one) and enter "serial" as the keyword. You can also double click on "Serial" displayed in the area below. It will offer examples. Two are of interest: "Advanced Serial Write & Read.vi" and "Basic Serial Write and Read.vi"
Have a look at those vi's and try the exact same entry as you would do manually. Remember to configure your serial port exactly the same way as you would for the terminal emulator. And have a look at the block diagram. It should get you started.
You can modify the code to suit your needs and if you still have problems, post the code that you have thus far and ask more questions.
To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
04-19-2011 10:24 AM
04-19-2011 11:26 AM
Are you using an older version of LabVIEW, such as 6.0 or 5.1?
04-19-2011 11:33 AM
04-19-2011 11:36 AM
thanks for this block diagram, but don't we need to indicate the Baud rate? and stop pit..parity bit ..etc. ?
My task is to send data from LABVIEW to PIC16F876A , through the MAX232 , in order to give order to a servo motor to run, so dont i need to configure something before?
What does ur code exactly DO sir ?
I wrote a code on labview, and now i have the necessary BYTES i have to send to the PIC through max232, But i cant figure out HOW .. i am reading about VISA now ..
Thanks for ur support
04-19-2011 12:10 PM
LabVIEW has a shipping example called "Basic serial read and write.vi" You can find it by the Menu Help> Find examples Its listed in the examople finder under Hardware Input and Output> Serial.
You are going the "write" direction looking into VISA
04-19-2011 12:36 PM
@Ray.R wrote:
Let's start with the basics...
Are you able to manually communicate with your PIC u-ctrler using a terminal emulator program such as Terraterm, Hyperterminal, etc?
If so, then what do you transmit?
If so, you can go in the Help menu, and look for "Find Examples...", select the search tab (middle one) and enter "serial" as the keyword. You can also double click on "Serial" displayed in the area below. It will offer examples. Two are of interest: "Advanced Serial Write & Read.vi" and "Basic Serial Write and Read.vi"
Have a look at those vi's and try the exact same entry as you would do manually. Remember to configure your serial port exactly the same way as you would for the terminal emulator. And have a look at the block diagram. It should get you started.
You can modify the code to suit your needs and if you still have problems, post the code that you have thus far and ask more questions.
To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
Excellent list of tutorials. Thank you!
04-19-2011 12:47 PM
Have a look at the code I posted here:
http://forums.ni.com/t5/LabVIEW/Reading-time-interval-of-serial-port/m-p/1529140#M568806
05-05-2011 06:10 AM
Dear Ray, thanks for ur reply.
i learned about the VISA serial, but i am only facing 1 problem.
I WANT TO SEND 2 BYTES ( each byte of 8 bits) to the pic , one byte to drive 1 servo motor, and the other to drive the second.
HOW CAN I SEND 2 BYTES to the input of the visa write knowing that those bytes i have them ready as U8 ????
do i have to convert them to strings? and how can i let them both be input to the VISA WRITE