Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make byte serial communication in LABVIEW

Hi,

     i am doing a project in LABVIEW regarding making a GUI for controlling SMPS. I have to comunicate with ATMEL8U for getting the information of Vout,Vin, Iin,temprature and i have to moniter the SMPS by writing the input parameters. Today, i made a serial interface which will take string and i designed blocks to convert that string to numbers. But that gone in vain due to my instructor. He wants a byte communication which is easy to send and makes microcontroller not busy. Now, I feeling tense and may be i need help.

 

    Please any one can tell me how can i make inteface as byte communication that too serial. i dont weather that is right or wrong. i am totally new to LABVIEW and this king of designs. PLease give me any idea or link that having example blocks.

 

                                 Thank you,

0 Kudos
Message 1 of 21
(6,312 Views)

Which is your serial interface? Is it RS-232? In this case, simply use the VISA write vi. Enter the address of your serial port (COM1, COM5, whatever), and wire the data you want to write. You may need also VISA configure serial to set up parameters like baud rate, parity, and so on.

0 Kudos
Message 2 of 21
(6,288 Views)

I am connecting to an USB. My doubt is i created a interface but i fell that reads only string from the USB. is it right. first see the attchment of created inteface. weather it is correct or not. but how can i communicate with the coming byte data or wether it takes byte data or not.i am just confused. i fell it takes only string data. wether it is correct or not. first attchment i followed is based on the given secong big attchment.

 

    Clearly, i want communicate with USB like taking mostly 6bytes of data and sending some 6 bytes of dat again for controlling the SMPS.So, tell me that created short form of GUI is ok for that communication need any other kind.

 

 

Download All
0 Kudos
Message 3 of 21
(6,284 Views)

You only read the bytes sent one time.

You need to add a while loop around your case and use the string to byte array to convert a string to an array of bytes.

after that you can use index array element

greetings from the Netherlands
0 Kudos
Message 4 of 21
(6,259 Views)

Hi,

     why again you are confusing me. i want byte communication that to serially. i confused with that given attchment wether it doing byte communication or string communication. i really need a difference between them. its hard to know about that. after receiving the data in byte i have to create a GUI for collecting the data inti smaller checkboxes and sending some date from checkboxes to front panel write box. then from there it automaticlly deliver to the USB. is that possible. if you have any such kind of GUI with you, please post it give me any example. i am totally new this environment.

 

                                         Thank you.

0 Kudos
Message 5 of 21
(6,258 Views)

Can you tell me why you want byte communication?

I told you how to convert strings to bytes and the other way is also available.

VISA only transfers strings.

What els do you want to solve your problem?

greetings from the Netherlands
0 Kudos
Message 6 of 21
(6,255 Views)

Hi,

       I know that we can convert strings to bytes by using match pattern. But any way my instructor dont want to send strings to Labview. He need only byte communication. So, USB can send only bytes to serial port. So, noe in that sitsutation the given VI is OK or need any other change..

                                        Thank you.

0 Kudos
Message 7 of 21
(6,254 Views)

dont' use match pattern but "byte array to string" or "string to bytearray" !

And your teacher should learn programming instead of asking stupid questions, or is he trying to ask stupid questions to emulate a real customer.......

greetings from the Netherlands
Message 8 of 21
(6,250 Views)

hi now i will attach my VI and can tell what communication is going on with connected USB. wether it is byte or string . i am totally confused . please help me. if it string then i dont want to do that. i need a byte communication.

0 Kudos
Message 9 of 21
(6,249 Views)

if it is string communication with the connected USB. Then, is there any possibility to make byte communication means getting the data what coming in and writing the data in bytes.

0 Kudos
Message 10 of 21
(6,248 Views)