LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA function SScanf

One of our programmers, now gone on to better things, left us with a
driver that makes liberal use of ViScanf() calls. But now we're in
integration, and I need to replace ViScanf() with viRead() followed by
something to parse the device response. I've tried using ANSI C
sscanf() but it doesn't work very well. I'm guessing that a lot of the
format specifiers aren't ANSI-C.

The NI-VISA Programmer Reference Manual, March 2000 Edition, describes a
function described named viSScanf() that sounds as though it does just
what I need. Trouble is, when I code it and try build my project, the
compiler/linker insists there's no such function. I'm using
LabWindows/CVI with NI-VXI 2.1.1 and NI-VISA 2.1 under WinNT 4.0 SP6.

Can anyone help me
get viSScanf() to work? Or offer an alternate
solution to parsing the device response string?


TIA for any help ...


B
0 Kudos
Message 1 of 4
(3,545 Views)
BA wrote:

> One of our programmers, now gone on to better things, left us with a
> driver that makes liberal use of ViScanf() calls. But now we're in
> integration, and I need to replace ViScanf() with viRead() followed by
> something to parse the device response. I've tried using ANSI C
> sscanf() but it doesn't work very well. I'm guessing that a lot of the
> format specifiers aren't ANSI-C.
>
> The NI-VISA Programmer Reference Manual, March 2000 Edition, describes a
> function described named viSScanf() that sounds as though it does just
> what I need. Trouble is, when I code it and try build my project, the
> compiler/linker insists there's no such function. I'm using
> LabWindows/CVI with NI-VXI 2.1.1 and NI-VISA 2.1 under WinNT 4.0 SP6.
>
> Can anyone he
lp me get viSScanf() to work? Or offer an alternate
> solution to parsing the device response string?
>
> TIA for any help ...
>
> B

I might check the NI website.
It looks to me that VISA is version 2.5 (at least on Win95).

Kevin Kent
0 Kudos
Message 2 of 4
(3,545 Views)
"Kevin B. Kent" wrote:
>
> BA wrote:

[edited]

> > Can anyone help me get viSScanf() to work? Or offer an alternate
> > solution to parsing the device response string?
> >
> > TIA for any help ...
> >
> > B
>
> I might check the NI website.
> It looks to me that VISA is version 2.5 (at least on Win95).
>
> Kevin Kent


Thanks, it turns out that wasn't the problem. We had a 'messy' earlier
install of CVI, and when we updated VISA the CVI-related files went to
the wrong place. The panel in the install for VISA isn't at all clear
on what files it's going to install, when it asks for the directory. So
on one of our attempts I just gave it a new, empty file to install to.
Then I did file searches to find older versions of those same files,
moved the newer versions i
nto place, and it worked!

(BTW, on the web site National's "current version" of VISA shows as 2.1,
although 2.5 exists at their ftp site.)


B
0 Kudos
Message 3 of 4
(3,545 Views)
BA wrote:

>
>
> Thanks, it turns out that wasn't the problem. We had a 'messy' earlier
> install of CVI, and when we updated VISA the CVI-related files went to
>

[snip]

>
>
> (BTW, on the web site National's "current version" of VISA shows as 2.1,
> although 2.5 exists at their ftp site.)
>
> B

Glad you found the solution, maybe NI will fix the problem.
I seldom pay attention to the web site I generally dive to the ftp first.

I installed Labview 6i on a virgin machine and got VISA 2.5
Oh well
Kevin Kent
0 Kudos
Message 4 of 4
(3,545 Views)