Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB/VB6/WIN2K problems

I'm writing some code where the PC will be used as a device @ address 1.
I used ibdev() to find the board and afterwards ibconfig(ibcsc,...) to change
PC into device.
Problem is that ibconfig always returns an error with iberr, EARG, meaning
arguments invalid. I tried MANY things and no way to get around the error.
If needed I can post the EXACT code.
I'm using VB6/sp4, GPIB/PCMICA card,
NI s/w V1.60 and win2k.

Any idea's ??

TooN
0 Kudos
Message 1 of 4
(3,566 Views)
Antoon

The synatx for ibconfig is ibconfig(int ud, int option, int value). So doing
ibconfig(ibcsc,...) would lead to an error.

In any case, if you know you want to use the board as a non-controller, here's
what you can try:
A Talker/Listener application typically uses ibwait with a mask of 0 to
monitor the status of the interface. Then, based on the status bits set in
ibsta, the application takes whatever action is appropriate. For example,the
application could monitor the status bits TACS (Talker Active State) and
LACS (Listener Active State) to determine when to send data to or receive
data from the Controller. The application could also monitor the DCAS
(Device Clear Active State) and DTAS (Device Trigger Active State) bits
to determine if the Controller ha
s sent the device clear (DCL or SDC) or
trigger (GET) messages to the interface. If the application detects a device
clear from the Controller, it might reset the internal state of message
buffers. If it detects a trigger message from the Controller, the application
might begin an operation, such as taking a voltage reading if the application
is actually acting as a voltmeter.

Ram

Antoon M wrote:

> I'm writing some code where the PC will be used as a device @ address 1.
> I used ibdev() to find the board and afterwards ibconfig(ibcsc,...) to change
> PC into device.
> Problem is that ibconfig always returns an error with iberr, EARG, meaning
> arguments invalid. I tried MANY things and no way to get around the error.
> If needed I can post the EXACT code.
> I'm using VB6/sp4, GPIB/PCMICA card,
> NI s/w V1.60 and win2k.
>
> Any idea's ??
>
> TooN
0 Kudos
Message 2 of 4
(3,566 Views)
Ram wrote:
>Antoon>>The synatx for ibconfig is ibconfig(int ud, int option, int value).
So doing>ibconfig(ibcsc,...) would lead to an error.>>In any case, if you
know you want to use the board as a non-controller, here's>what you can try:>A
Talker/Listener application typically uses ibwait with a mask of 0 to>monitor
the status of the interface. Then, based on the status bits set in>ibsta,
the application takes whatever action is appropriate. For example,the>application
could monitor the status bits TACS (Talker Active State) and>LACS (Listener
Active State) to determine when to send data to or receive>data from the
Controller. The application could also monitor the DCAS>(Device Clear Active
State) and DTAS (Device Trigger Active State) bits>to det
ermine if the Controller
has sent the device clear (DCL or SDC) or>trigger (GET) messages to the interface.
If the application detects a device>clear from the Controller, it might reset
the internal state of message>buffers. If it detects a trigger message from
the Controller, the application>might begin an operation, such as taking
a voltage reading if the application>is actually acting as a voltmeter.>>Ram>>Antoon
M wrote:>>> I'm writing some code where the PC will be used as a device @
address 1.>> I used ibdev() to find the board and afterwards ibconfig(ibcsc,...)
to change>> PC into device.>> Problem is that ibconfig always returns an
error with iberr, EARG, meaning>> arguments invalid. I tried MANY things
and no way to get around the error.>> If needed I can post the EXACT code.>>
I'm using VB6/sp4, GPIB/PCMICA card,>> NI s/w V1.60 and win2k.>>>> Any idea's
??>>>> TooN>
0 Kudos
Message 3 of 4
(3,566 Views)
I have a similar problem when I was using the El9012.c in its driver software. It uses ibwait with mask c04f & return iberr = 4 invalid argument in function. I have to change the mask to 0 to get a measurement. What is this function it is reffering to?? What argument?? Please help. Still curious for solution.
JP
0 Kudos
Message 4 of 4
(3,566 Views)