From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Hexadecimals in ibwrt() GPIB

Hi 

i need to write the following Hexa Decimal data to my GPIB instruement.

4 ,4d ,6a ,f8 ,e6 ,f5,a9 ,2d ,e8,f ,6f ,26 ,f8

 

Curretly am using CVI for my Project

 

I have all above numbers in a integer array, i need a data on bus as like the attached analyzer data.

 

i tried converting these to char's and send in ibwrt() but i coudnt get ther Result as desired.

 

please do let me know ,how the above hexadecimal values can be write in GPIB bus as like the attached analyzer data?

also please let me know how the conversion can be done for char array for the above numbers.

 

Thanks in advance

 your help is highly appreciated.

 

0 Kudos
Message 1 of 4
(4,313 Views)

Thanks for your reply.

 

I have a series of hexa 0 to be send along with other numbers.

 

i converted all of them to char and transmitted using ibwrt function,

since the zero's are getting converted to NULL its not getting transmitted.

so please do let me nkow how the 0's can be transmitted as chars.

or i need to follow some other way to the 0 transmit.

 

Thanks in advance

0 Kudos
Message 3 of 4
(4,272 Views)

"/x" could be a better solution if i write the data staically in the ibwrt() function.

but my soultion requires a dynamic data reading from a file and writr in GPIB.

i have read the file contents as a hexadeciamls in a array.

and converted those to ASCII and transmitted it works good.

but when i encounter '0' it is converted as NULL and am not able to send tht.

can you please suggest a way to store the '0' in a char array and transmit in the GPIB.

 

 

THanks in advance

0 Kudos
Message 4 of 4
(4,264 Views)