Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding old Code On GPIB TNT. Check Status

Hello I am upgrading an old instrument which talked to GPIB TNT in VB 3 I need to do same thing in .Net API Can anyone show me how to 'Peek' the line to see if Data Is available and not read if it is not?

 

The code is this short

Do While (IEEEStatus And 1) = 1

   IEEEStatus = IEEEStatus And &HFE 'Clear IEEEStatus bit

   Inbuf = Inbuf & Chr$(Inp(&H2B8)) 'Read one character

   Call GetStatus

Loop

 

Sub GetStatus ()

'****************************************************************************

'* This routine is called before receiving or transmitting over the IEEE-488*

'* bus to determine the present status of the bus. *

'****************************************************************************

  IEEEStatus = IEEEStatus Or Inp(&H2B9)

End Sub

0 Kudos
Message 1 of 2
(5,592 Views)

Hi Mark,

 

You'll be able to find examples for .NET and the 488.2 driver here:


C:\Users\Public\Documents\National Instruments\NI-488.2\Examples\DotNET3.5

 

Specifically, there is a SimpleReadWrite example that will get you started.  You can also find the .NET function reference here

 

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\National Instruments\NI-488.2\NI-488.2 .NET Framework 3.5 Help

 

I hope this helps out!

 

Regards,

Dustin D

0 Kudos
Message 2 of 2
(5,581 Views)