09-22-2010 08:25 AM
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
09-23-2010 09:22 AM
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,