LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial communication

Solved!
Go to solution

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

0 Kudos
Message 1 of 25
(3,142 Views)

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.

 

Message 2 of 25
(3,139 Views)

Hi 23483 here is a code that use to comunicate with a max 232.

 

Rs232.JPG

 

 

 

 

0 Kudos
Message 3 of 25
(3,099 Views)

Are you using an older version of LabVIEW, such as 6.0 or 5.1?

0 Kudos
Message 4 of 25
(3,093 Views)
No i am using Labview 2010 but i am new to it and i have an important project that am trying to run
0 Kudos
Message 5 of 25
(3,090 Views)

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

0 Kudos
Message 6 of 25
(3,088 Views)

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


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 25
(3,086 Views)

 


@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!

 

0 Kudos
Message 8 of 25
(3,079 Views)
0 Kudos
Message 9 of 25
(3,075 Views)

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

 

0 Kudos
Message 10 of 25
(3,042 Views)