Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

please help me in writing to visa write

Hi,

       I am communicating with my AVR32 which will give response when it reads(if(uart_char[0]==0x20) and if(uart_char[0]==0x10) lot more like this). I have taken for loop and using the indexed counting for writing the char. As long as i am not getting any reply if do with for loop.

       But i am getting reply if i do with indexed array constant as like below picture. I did not undestand where is the problem. i think probablly, with space infront fo the characyer incase of for loop.

 

Please some suggest me.

0 Kudos
Message 1 of 8
(3,505 Views)

here is the attchment.

0 Kudos
Message 2 of 8
(3,504 Views)

What happened to NI forum, is any one angry on me. I am really helpless and cursed by Ni forums. Please some say anything.Smiley Sad

0 Kudos
Message 3 of 8
(3,496 Views)

Well, I for one do not understand what your question is or what the images are supposed to show. You are typecasting to 4 bytes. Perhaps that is your misunderstanding?

0 Kudos
Message 4 of 8
(3,492 Views)

yes, how can I send with one byte and in the form ascii charcter. How can I convert the decimal loop count(for loop) to one byte ascii character. Yes, the type cast function is giving 4 byte after convertion but i don't know how to change that decimal number count(each iteration count) to one byte ascii. Is there any way for this. can you help me.

0 Kudos
Message 5 of 8
(3,483 Views)

Why so difficult, Why not sending characters to visa write, Why hex? Hex is just for humans not machines.

greetings from the Netherlands
0 Kudos
Message 6 of 8
(3,477 Views)

Hi,

      I am sending ascii only to write visa. Problem is before i am sending 4 bytes to write visa instead of one byte ascii character. now it is ok and no more problem with that. I am facing problem with combo box. you can help me here http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Combo-box-help/m-p/1509960........

             Thank you all and a special thanks to dennis.

0 Kudos
Message 7 of 8
(3,476 Views)

To send a single byte, you simply convert the value from the iteration terminal to a U8. Take care on how often the for loop iterates, of course.

0 Kudos
Message 8 of 8
(3,473 Views)