Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : VISA Signal Acquisition and Instrument Control Toolbox details
Login with GitLab

VISA Signal Acquisition and Instrument Control Toolbox

Interface with National Instrument's Virtual Instrument Software Architecture (VISA)
(18779 downloads for this version - 26171 downloads for all versions)
Details
Version
0.9.1
Author
Scilab Enterprises
Owner Organization
Scilab Enterprises
Maintainers
Francois Granade
Clement DAVID
Yann DEBRAY
Categories
Creation Date
February 18, 2016
Source created on
No source archive has been provided for this toolbox version.
Binaries available on
Scilab 6.0.x:
Windows 32-bit Windows 64-bit
Install command
--> atomsInstall("visa")
Description
            This is the version for Scilab 6.0.0 of the VISA toolbox for signal acquisition
and instrument control. 

This toolbox provides an universal interface for measurement device from most of
the device suppliers on the market (National Instrument, Agilent/HP, ... ),
including:

- Digital multimeter (DMM)
- Oscilloscope
- Arbitrary waveform/function generator
- DC power supply
- AC power supply
- Switch
- Power meter
- Spectrum analyzer
- RF signal generator
- Upconverter
- Downconverter
- Digitizer
- Counter/timer


This is a beta version, for community evaluation. 

The Virtual Instrument Software Architecture (VISA) is a standard for
configuring, programming, and troubleshooting instrumentation systems comprising
GPIB, VXI, PXI, Serial, Ethernet, and/or USB interfaces. VISA provides the
programming interface between the hardware and development environments.

Requirement:
Appropriate hardware, in the form of a National Instruments GPIB,GPIB-VXI,
MXI/VXI or serial interface board.
For GPIB applications, install NI-488. For VXI applications, install NI-VXI. For
other hardware interfaces, NI-VISA uses the system’s standard drivers.
NI-VISA distribution media
            
Files (2)
[314.38 kB]
Windows 32-bit binary for Scilab 6.0.x
Windows 32-bit for Scilab 6.0.0 - NI-VISA 5.3
[308.93 kB]
Windows 64-bit binary for Scilab 6.0.x
Windows 64-bit for Scilab 6.0.0 
News (0)
Comments (28)     Leave a comment 
Comment from Stephane Pisani -- February 19, 2016, 05:24:39 PM    
Hi,

I have installed Scilab 6.0; Visa 15.0.1 and visa_0.9.1 (under Windows 7 32bits) and I got
the same error message than previously:
******************************************************************************************

Initialisation :
  Chargement de l'environnement de travail

Start VISA Integration Toolbox
	Load macros
	Load gateways
atomsLoad : Une erreur est survenue au cours du chargement de 'visa-0.9.1-0':
	addinter : La bibliothèque partagée n'a pas été chargée: Unknown Error
------------------------------------------------------------
This is a beta software: 
please report any bug at http://bugzilla.scilab.org.
Thank you!
------------------------------------------------------------
******************************************************************************************

Could you let me know how can I sucessfully use this toolbox ?
Comment from Manfred Mücke -- March 4, 2016, 12:55:00 PM    
Hello,

I installed the toolbox under Win8 64bit and Scilab 6beta1. I get the following message
when 
loading the toolbox:

Start VISA Integration Toolbox
	Load macros
	Load gateways
WARNING: This module requires a Windows x86 platform.
	Load help
	Load demos


findAllInstruments gives the following:

	--> findAllInstruments()
	at line     6 of function findAllInstruments 	
	(xxx\contrib\visa_0.9.1\macros\findAllInstruments.sci line 14 )

	Undefined variable: viOpenDefaultRM

Any advice?

Thanks, Manfred
Answer from Clement DAVID -- March 4, 2016, 12:56:54 PM    
>> I installed the toolbox under Win8 64bit and Scilab 6beta1. I get the following
message
> when 
> loading the toolbox:
> 
> Start VISA Integration Toolbox
> 	Load macros
> 	Load gateways
> WARNING: This module requires a Windows x86 platform.
> 	Load help
> 	Load demos
> 
> Any advice?

Hello Manfred,

The warning indicates that you download the Scilab x86 whereas you should use Scilab x64
(and thus the visa x64 toolbox).

Regards

--
Clément
Answer from Manfred Mücke -- March 4, 2016, 01:43:42 PM    
Hi Clément,
 
> The warning indicates that you download the Scilab x86 whereas you should use Scilab
> x64 (and thus the visa x64 toolbox).

I definitely installed the 64bit version of the toolbox.
First I installed via atoms (atomsInstall('visa')), which gave exactly the result described

above when restarting Scilab. (I assume atoms checks for 32/64 bit and downloads the
correct 
file.)

Then I removed the package again (checked also that the contrib/visa folder was removed), 
manually downloaded visa_0.9.1.bin.x64.windows.zip and installed it.

BTW, atomsLoad with path didn't work:

----------
--> atomsInstall('visa_0.9.1.bin.x64.windows.zip')
at line   170 of function atomsInstall ( xxx\modules\atoms\macros\atomsInstall.sci line 186
)
Invalid index.
----------

but unpacking in /contrib and starting via Menu Tools/visa_0.9.1 worked). But again, I
receive 
the error message described above.

Thanks, Manfred 
Answer from Clement DAVID -- March 9, 2016, 02:08:17 PM    
> Hi Clément,
>  
> > The warning indicates that you download the Scilab x86 whereas you should use
> Scilab
> > x64 (and thus the visa x64 toolbox).

Hi Manfred,

I just updated the visa 0.9.1 x64 for Scilab 6.0.0 beta1 and fixed the issue. In fact I 
just forgot to update the loader.sce to enforce the x64 detection. Could you check after 
an `atomsSystemUpdate` please ?

--
Clément
Comment from Millet Fabien -- March 9, 2016, 09:35:32 AM    
Hi Clément,

I've the same issue of Manfred.

I suppose this is due to the loader.sce function in ..\sci_gateway\c
#####
if win64() then
  warning(_("This module requires a Windows x86 platform."));
  return
end
#####
So this is why when we launch --> findAllInstruments()
	at line     6 of function findAllInstruments 	
	(xxx\contrib\visa_0.9.1\macros\findAllInstruments.sci line 14 )

	Undefined variable: viOpenDefaultRM

It seems that we didn't have done the link between Visa and the function is not
recognized.


If I take out the win64() check then I get an issue with addinter: 
addinter: The shared archive was not loaded: A dynamic link library (DLL) initialization
routine failed.


Could you please help to understand how to make the link with Visa DLL ? 

Thanks, Fabien


PS: I've updated NI-Max to last version and I'm using Scilab 6.0.0 beta 1 in 64bit mode.
Comment from Millet Fabien -- March 9, 2016, 10:56:58 AM    
Added information:

When I load scilab_visa.dll with Dependency Walker, I've got those errors: 

Error: At least one required implicit or forwarded dependency was not found.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in
a delay-load dependent module.


The Scilab_visa.dll which is on the x64 package of the 0.9.1 seems to be indicated a CPU
of x86 inside based on Dependency Wlaker.

Is the scilab_visa.dll for x64 correct ??

Thanks. Fabien
Answer from Clement DAVID -- March 9, 2016, 11:07:08 AM    
> The Scilab_visa.dll which is on the x64 package of the 0.9.1 seems to be indicated a
> CPU
> of x86 inside based on Dependency Wlaker.
> 
> Is the scilab_visa.dll for x64 correct ??
> 
> Thanks. Fabien

Yep in fact the 0.9.1 version for Scilab 6.0.0 beta1 is not build against the x64 visa 
library. I will update the version today.
Comment from Millet Fabien -- March 9, 2016, 02:30:46 PM    
Hello Clement,

Thanks to have updating it so fast. 
Now I have the same error of Stephane: 

atomsLoad: An error occurred while loading 'visa-0.9.1':
	addinter: The shared archive was not loaded: Unknown Error


When I try to read scilab_visa.dll with dependency walker I've got this log: 

Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in
a delay-load dependent module.


core.dll 
output_stream.dll
api_scilab.dll
libntl.dll
ast.dll
vcruntime140.dll
MSVCR90.DLL
API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
DCOMP.DLL
IESHIMS.DLL

seems to not find entry point ... Is this why addinter function returns an error ??
Is it a module or soft that we miss to make the link worked?

I've tried, scilab 5.5.2 (64 bits) and 6.0.0 and always got the same answer (see above). 
How could I know where addinter fails ... to find a solution?

Thanks.
Fabien
Answer from Clement DAVID -- March 9, 2016, 02:45:04 PM    
> Hello Clement,
> 
> Thanks to have updating it so fast. 
> Now I have the same error of Stephane: 
> 
> atomsLoad: An error occurred while loading 'visa-0.9.1':
> 	addinter: The shared archive was not loaded: Unknown Error
> 
> 
> When I try to read scilab_visa.dll with dependency walker I've got this log: 
> 
> Error: At least one required implicit or forwarded dependency was not found.
> Warning: At least one delay-load dependency module was not found.
> Warning: At least one module has an unresolved import due to a missing export
function
> in
> a delay-load dependent module.
> 
> 
> core.dll 
> output_stream.dll
> api_scilab.dll
> libntl.dll
> ast.dll
> vcruntime140.dll
> MSVCR90.DLL
> API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
> API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
> API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
> DCOMP.DLL
> IESHIMS.DLL
> 
> seems to not find entry point ... Is this why addinter function returns an error ??
> Is it a module or soft that we miss to make the link worked?
> 
> I've tried, scilab 5.5.2 (64 bits) and 6.0.0 and always got the same answer (see
above).
> 
> How could I know where addinter fails ... to find a solution?

Hello Fabien,

OK thanks for the information : lets focus on a single platform / Scilab version for now.
On my windows x64 with Scilab 6.0.0 beta1 x64 and visa 0.9.1-2 x64 I have :

 * some dependency walker errors but only for Scilab libraries (CORE.DLL OUTPUT_STREAM.DLL
API_SCILAB.DLL LIBINTL.DLL AST.DLL) as Scilab is not in the %PATH
 * VISA64.DLL is also present on the list
 * KERNEL32.DLL VCRUNTIME140.DLL and some API-MS-WIN DLLs

Comparing to the ones on your system, VISA64.DLL seems present on my setup and missing on
yours, can you confirm ? Could you also give me your visa installed version ?

Regards,

Comment from Millet Fabien -- March 9, 2016, 03:08:15 PM    
Hello Clement,

The list I place before is the one with no entry points.

The other seems to work, or at least the soft has found an entry point. 
So I have entry point for :
VISA64.DLL
KERNEL32.DLL
and some API-MS-WIN dlls

but not for VCRUNTIME140.DLL. (if I compare to your list).


So I don't confirm you comment => I have an entry point for VISA64.dll and I could find
the function we needed. 
I don't get why the link with addinter do not work. 

If I scroll down the Visa64.dll in the dependancy walker software, only one dll seems to
not be there: 
MSVCR90.DLL (under VISAUTILITIES.DLL)
=> if you give me an address mail I could send you a picture ... It could be easier to
explai :-s


Regarding NI software:
- I have Ni-Max 15.3.0f0
- NI-Visa is 15.5
- NI-Visa Runtime 15.5
- NI-488.2 15.5

Thanks.
Fabien
Answer from Clement DAVID -- March 9, 2016, 05:02:11 PM    
> The list I place before is the one with no entry points.
> 
> The other seems to work, or at least the soft has found an entry point. 
> So I have entry point for :
> VISA64.DLL
> KERNEL32.DLL
> and some API-MS-WIN dlls
> 
> but not for VCRUNTIME140.DLL. (if I compare to your list).
> 
> 
> So I don't confirm you comment => I have an entry point for VISA64.dll and I could
> find
> the function we needed. 
> I don't get why the link with addinter do not work. 
> 
> If I scroll down the Visa64.dll in the dependancy walker software, only one dll seems
> to
> not be there: 
> MSVCR90.DLL (under VISAUTILITIES.DLL)
> => if you give me an address mail I could send you a picture ... It could be
easier
> to
> explai :-s

Ok could you try installing the visual studio 15 runtime lib and check ? In the meantime I
will re-compile the toolbox with VS2013 to remove the dependency on VCRUNTIME140.DLL .
Answer from Millet Fabien -- March 10, 2016, 07:14:53 AM    
> Ok could you try installing the visual studio 15 runtime lib and check ? In the
meantime
> I
> will re-compile the toolbox with VS2013 to remove the dependency on VCRUNTIME140.DLL
.

Hello Clement,

I've installed this: 
https://www.microsoft.com/en-us/download/details.aspx?id=48145

and it works. I didn't get the message before. It load the visa correctly.  
I only check findAllInstruments() for now and it has find the instrument which was
connected. 
I will play with it now. 

Thanks for your help.
Fabien 
Answer from Manfred Mücke -- March 16, 2016, 10:49:49 AM    
This answer has been deleted.
Answer from Manfred Mücke -- March 16, 2016, 10:51:32 AM    
Hi Clement,

> I will re-compile the toolbox with VS2013 to remove the dependency on
VCRUNTIME140.DLL.

just wanted to check if there is a new version with reduced dependencies.

Thanks, Manfred
Comment from xu narcy -- May 20, 2016, 04:03:33 AM    
dear scilab, how to use the visa Format I/O in the scilab? 
I pass with the viPrint(), buf fail with viScan().
May you share a example?
Thank & BRs.
Comment from anibal carpio -- October 5, 2016, 11:34:03 PM    
Is there a version to be used with Linux?
Answer from Clement DAVID -- March 1, 2017, 03:28:28 PM    
> Is there a version to be used with Linux?

Hi Anibal, on my linux system ; I am unable to get VISA working :/ . If you are aware of
an open-source (or a working) VISA implementation, I would be glad to build the module
against it.
Comment from Vin Gillette -- February 24, 2017, 09:51:25 PM    
Dear maintainers, 
As it's clearly mentionned in the user 
manual the viWrite command automatically 
provided a carriage return("\n") after 
the scpi command. I'm highly interested 
by remove this special character but i 
guess that to do it i have to go down 
from one layer maybe the dll? Is it 
possible to have access to this 
particular function or do you have an 
alternative method to remove this ending 
character? Thanks per advance guys. 
Comment from Martin Lavier -- March 31, 2017, 05:51:22 PM    
Hi, 

I have an issue with the toolbox. I try to communicate with a device which work at 38400
bauds. I configurated everything on NI-MAX but scilab doesn't seem to use the correct
baudrate anyway. 

Is their any possible way to configurate the baudrate scilab will use to send SCPI commands
?

Looking forward for your insights,
Thanks, Martin
Comment from Cristian Matorra -- December 20, 2017, 07:08:52 PM    
Hello, 
I am using Scilab 6.0.0, and VISA tool box version 0.9.1.
I want to send a command to Tektronix oscilloscope, and Scilab console give me an error
message, "Error: syntax error, unexpected identifier, expecting end of file". 

---
[status, count] = viWrite(idDevice, " :SAVE:WAVEFORM ALL,"E:/INR/Test3"
");
                                                          ^^
Error: syntax error, unexpected identifier, expecting "," or )
---

Is there another way to send this command?
Any advice?

Regards

Cristian
Answer from Clement DAVID -- December 21, 2017, 09:43:51 AM    
Hi Christian,

> ---
> [status, count] = viWrite(idDevice, " :SAVE:WAVEFORM
ALL,"E:/INR/Test3"
> ");
>                                                           ^^
> Error: syntax error, unexpected identifier, expecting "," or )
> ---

There is a syntax issue in your command, to use quotes within a scilab string double it ! 

[status, count] = viWrite(idDevice, " :SAVE:WAVEFORM
ALL,""E:/INR/Test3"" ");
Comment from Pascal Buehler -- April 23, 2018, 09:41:10 AM    
Hi, I have the same Problem like Martin Lavier, i want to Change the Baudrate, but there 
is no SetAttributes documented (but i think implemented). Could you please documend this 
and add some exapmles to better understand the handling of These attributes? And 
following the Dokument of the VISA, the DataType is ViUInt, but is not defined in the 
Toolbox?

M.f.G. Pascal Bühler  
Comment from christophe caillaud -- December 28, 2018, 06:35:24 PM    
Dear maintainers,
I started using this toolbox with scilab 6.0.1 to interact with a agilent oscilloscope and
it is very useful. Thanks a lot for your work.
I only have a problem when recording the waveform of the oscilloscope (using viRead
command, or viRequest, [status, bufOut] = viRequest(instr, ':WAVEFORM:DATA?')) : As the
oscilloscope transmit a continuous series of Byte (a signed 16 bits integer per point),
instead of a series of number, the output of viRead/viRequest bufOut is just a single
string as scilab donesn't understand the binary data. Is it possible to "explain"
scilab
that it is reading binary data to recover it, as in matlab (I know people with matlab
license who use either binblockread function or fread in which they specify they receiv
int16 data fread(AgScope,min(RecordLength-ReadIndex+1,PacketLength),'int16')?
My second question is is it possible to have the source files which create the DLL?

THanks a lot for your work

Regards

Christophe
Comment from James Holland -- April 23, 2019, 12:52:07 PM    
Did you ever resolve the binary read problem? I want to be able to read data from an 
MSOX3204A, I have worked through the example in the Scilab/VISA manual and I can connect 
to the scope and read the ID.
Comment from James Holland -- May 8, 2019, 04:32:55 PM    
I was able to change the serial data format from binary to ASCII so its not a big problem -

- just slower.
Comment from Pascal Buehler -- November 15, 2019, 07:41:53 AM    
Is there a function like in Labview "Bytes at port", because there are some
protocolls, 
who demands that you only take so much Bytes as there are given on the ports. if you ask 
for more, a error will occoure.
Comment from Huang Patrick -- January 24, 2020, 04:03:13 PM    
 Scilab version 6.0.2. I installed visa using atomsGui().

VISA Signal Acquisition and Instrument Control Toolbox version 0.9.1 is installed.

After scilab console starts, following error appears:

Start VISA Integration Toolbox
	Load macros
	Load gateways
atomsLoad: An error occurred while loading 'visa-0.9.1':
	link: The shared archive was not loaded: The system cannot find the file 
specified.

Please help.

Thanks,
Comment from Huang Patrick -- January 28, 2020, 05:15:59 PM    
Dear friends,

Any body has issue with VISA 0.9.1 with Scilab 6.0.2 ?

When scilab console starts, the error message shows:

Startup execution:
  loading initial environment

Start VISA Integration Toolbox
	Load macros
	Load gateways
atomsLoad: An error occurred while loading 'visa-0.9.1':
	link: The shared archive was not loaded: The system cannot find the file 
specified.

Starting the Serial Toolbox
	Load macros
	Load help

Please help. thanks,

Patrick
Comment from Huang Patrick -- January 28, 2020, 09:06:46 PM    
visa64.dll or visa32.dll is not found in my system after I install visa.

which location should I look for this file?
Comment from Huang Patrick -- January 29, 2020, 04:04:48 PM    
Problem fixed:
1. download ni-visa_19.5_online_repack.exe -  install NI VISA driver for windows,
visa64.dll will be created at ...\system32 folder
2. download and install visa_0.9.1-2.bin.x64.windows.zip

it works now. 
Comment from Pascal Buehler -- March 3, 2020, 08:56:48 AM    
Hi, my name is pascal, i have a recent problem with strings. I want to communicate with 
an device from sauter with nummeric commands so i transform it from dec to chars. i have 
6 numbers and it gives me 6 chars as 6 string. so far so good. But with writecount it 
says that i send 10 strings. When i take the string and try it into NI Max, it gives me 
6 bytes count. So where do the 4 addintionall chars come from? is it maybe the /n return 
after the command? But why 4?

M.f.G. Pascal   
Comment from Philipp Mittendorfer -- April 15, 2020, 04:47:03 PM    
Is there any plan to upgrade it to 6.1.0 version and add it to the repository?

Cheers
Philipp
Comment from Daniel Daniel -- April 20, 2020, 11:16:16 AM    
To everyone having problems reading a bunch of binary data in a 1x1 cell sting:

I have encountered the same problem and after a lot of trial and error, I was at least able
to come up with a temporary workaround. I use the viReadToFile-function to store the data
temporarily into a file and then read this stored data back into Scilab using the settings
"binary read" in the mget-function. This allows me at least to read sample counts
up to 28kpts on Ethernet-connection and 7Mpts on USB-connection. See code below:

[status, count] = viReadToFile(idDevice, 'temp_data.bin', INPUT_BUFFER_SIZE);
hFile=mopen(TEMP_FILE_NAME,'rb');
rawData = mget(count, "c", hFile);
mclose(hFile);
mdelete(TEMP_FILE_NAME);




PS: full code can be found in my GitHub-repo -> https://github.com/dadul96/Siglent_SDS1202X-E_VISA_Scilab
Comment from Klaus Debes -- March 25, 2021, 01:07:53 PM    
Salu Yann, Clemente et Fracois,

when I try to install the 64-bit with Scilab 6.1.0, the "line 170" error (as
described 
above) shows up again.

atomsInstall("C:\users\info\Downloads\visa_0.9.1-2.bin.x64.windows (1).zip")

at line   170 of function atomsInstall ( C:\Program Files\scilab-
6.1.0\modules\atoms\macros\atomsInstall.sci Zeile 186 )

Ungültiger Index.  

Au revoir
Klaus
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.