Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement bit function

Dear All,
 
 
I am trying to port some old HP Calculator routines across to vb.net.
 
On the old HP calculator there is a function bit(bit, word), eg  if bit(3, x) = 1 
 
I this example the function just checks if bit 3 is 0 or 1 in a word contained in x.
 
Is there a way to do the same function under vb.net?
 
 
 
Best regards,
Mark
0 Kudos
Message 1 of 2
(3,145 Views)
Hi,

what you need maight be:

function bit(b,w)
bit= w and 2^b
end function

For transferring HP programs with Output/Enter commands, you might also
consider LabTab as a convenient API.
You can experiment Output/Enter with it at: www.labtab.com/ni_gpib0
url.
You need a device at GPIB address 1 and an NI GPIB board declared as
GPIB0.

Regards

FG



FG

0 Kudos
Message 2 of 2
(3,107 Views)