Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

12 bit D/A converter and hexadecimal numbers

Hi 

 

I would like to send a hexadecimal number to a 12 bit D/A converter , I figured how to send hexadecimal numbers but the problem I want the user to interact by changing a decimal number .

what I mean the user sees a range of integers 0-4095 then what I need is to convert to hexadecimal to send to the converters .

 

the way I will send this is  0x07 0x00 B1 B2 , where the first two hexadecimal numbers are to open the port and notify the converter , and B1 , B2 are the result of user input , B1 is least significant byte and B2 is most significant byte , since it is a 12 bit, I should add zero to the left of the most significant byte . for example  if the user input a decimal number that convert to 21C , B1 = 1C , B2 = 02 .

 

my question is how to do that , do I need to use array to read the conversion and somehow stack the bytes in a buffer that can serve as a control for the sending function , how I can build such an array of bytes or use other VI if needed .

 

my experience with lab view isn't very much , can some body help me with this ?

0 Kudos
Message 1 of 3
(4,110 Views)

Hi bmemq,

 

Would you post the code that you are using? I would like to take a better look at your code and understand better what you are trying to do.

 

Regards,

steve.bm
AE | NI
0 Kudos
Message 2 of 3
(4,092 Views)
0 Kudos
Message 3 of 3
(4,087 Views)