Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all 5698 articles
Browse latest View live

element in array to time format

$
0
0

Hello i am trying to convert a element in array to time format to plug into a build waveform. I tried a few functions but no luck

the data is coming from uart. If the data coming in is for example in the format

2,4,6,8,10,126050.76.

and the last number is the the time from the serial data cant figure out how to convert to time format that waveform will accept and the format the time is first two digits of last element hour,then next two minute, then next two seconds. and after the decimal milliseconds. I have attached code snippet the second subarray goes into timestamp fo waveform. The time also is in that format exact no colon in the middle of each.


Control two devices with RS232 splitter

$
0
0

Dear all. I made a VI that control (a part from many other things)  a PI stage and a Thorlab shutter. The problem is that both need an RS232 connection and my computer has only one port. 

 

I bought an RS232 Splitter and now both are connected but once the first enstablish a connection the second doesn't. Do you have any idea of what I am doing wrong? Is anyone already done something similar? The two devices have different baudrate but the problem is that running the "initialization" VI for both, if I establish a connection with the first (using the correct parameter), the second won't work (even if the parameter are correct). I think that the problem is on some sort of conflict in the port but I don't know how to solve it.

 

Thanks

 

Peppe 

9206 connector analog input connector

$
0
0

 

have a bunch of 9206, well,  need to get more

 

wiring is not trivial wtih these connectors, have to stick in screw driver to get enogh slack to insert the wires

have to repeatly change the wires often for what Im doing..  and then with 5 modules might spend all day doing the wiring.

 

am thinking of making a connector system for this

anyone have any ideas on connectorizing for it

 

maybe a PCB interface board that can slide into the 36 pin port?

maybe pull out the 36 pin ide type inferface connector (V2L 3.55) and put ina  new connector that can mate with it, but then i have access to all the IC from otehr end of the cable?

maybe spice an IDE cable and connect that with the 9206, then with the connectorized end, can use that to mate with other parts in rapid manner

 

anyone ever try this before?

never had to do rapid connections before, this might not be the right system for it but do want to have direct connections from my system to this system

Questions regarding building my first instrument control system

$
0
0
Hello, I have never built a control system from scratch before so I need some assistance in determining what kind of hardware I need to use. I have three instruments, which use combinations of BNC and RS232 serial for data output, and use RS232 serial for inputting commands to the instruments. I am building a system that monitors the outputs and sends inputs. Now, I am on a very limited budget. What kind of hardware do I need? I've looked through the National Instruments website but I'm still confused.

How to acquire fast direct-current signal using Keithley 6485 using Rs-232

$
0
0

Keithley 6485 Picoammeter, DC signal (fA-pA), RS-232, Fast acquisition: reading per 0.01s

 

I am new to instrument programming and Labview. I am trying to do fast current measurement at the speed of some 100 readings per second (let us say). Is it possible to do this over Rs-232, reliably? Can I program and use my instrument with aid of Labview to this task?

 

All kinds of help, advices appreciated.

GPIB-ENET/100 does not show up in add GPIB Hardware Wizard (Scientific Linux 6)

$
0
0

Hi everyone,

 

I am working with a GPIB-ENET/100 device on a Scientific Linux 6 (Red Hat derivative) machine. No matter what I try, the NI-488.2 'Add GPIB Hardware Wizard' does not find the device.

 

My Setup:

Both the computer and the GPIB-ENET/100 are connected to an Allied Telesyn AT-FS705L ethernet switch which is in turn connected to my university's ethernet. The GPIB-ENET/100 has been assigned a static IP address. I have setup the GPIB-ENET/100 with the following settings:

 

Hostname: NIENET

Use DHCP: Unchecked

IP Address: The provided static IP address

Subnet Mask: 255.255.254.0

Gateway: 128.180.17.254

DNS Server: 0.0.0.0

 

NI-488.2 version: tried both 3.2 and 15.1.0

NI-VISA version: 15.0.0

 

What Works:

- I am able to ping the device successfuly at the provided static IP

- arp -a command finds the device (matching MAC address at the provided static IP)

- I am able to enter the configuration menu from the 'Add GPIB Hardware Wizard' by inputting the static IP and clicking configure, but when I try to apply any settings it tells me the the device needs to be placed in configuration mode. When I attempt this, it does not recognize that the device is in configuration mode and eventually stops recognizing the device altogether (I cannot configure it anymore until I restart the GPIB-ENET/100)

- The GPIB-ENET/100 works perfectly on a windows machine with the same drivers installed and the same physical ethernet setup (this is how I was able to configure it)

 

What Doesn't Work:

- The GPIB-ENET/100 does not show up in the 'Add GPIB Hardware Wizard' in the 'List of GPIB-ENET/100 on the local subnet' 

- The GPIB port/device does not show up when I try to search for it (I am using pyvisa for this, which uses the NI-VISA drivers)

 

Any help is appreciated, this has been a huge headache for me...Thanks!

 

Michael

GPL-incompatible module nikal.ko

$
0
0

With NI-VISA for Linux version 15.0.0f1 on openSUSE Leap 64 Bit 42.1.20151028, the following error occurs during installation: 

 

Warning: nikali post installation failed! /tmp/nikaliPostInstall.log follows:
Configuring NI-KAL for kernel version 4.1.12-1-default...
Building module nikal...
nikal:   CC [M]  /var/lib/nikal/4.1.12-1-default/nikal/nikal.o
nikal:   Building modules, stage 2.
nikal:   MODPOST 1 modules
nikal: FATAL: modpost: GPL-incompatible module nikal.ko uses GPL-only symbol 'pgprot_writecombine'
nikal: scripts/Makefile.modpost:93: recipe for target '__modpost' failed
nikal: make[2]: *** [__modpost] Error 1
nikal: Makefile:1413: recipe for target 'modules' failed
nikal: make[1]: *** [modules] Error 2
nikal: Makefile:32: recipe for target 'nikal.ko' failed
nikal: make: *** [nikal.ko] Error 2
nikal: ERROR:  failed to build nikal
nikal: ERROR:  NI-KAL update failed.
nikal: ERROR:  make of nikal kernel module failed, not installing kernel module.
nikal: ERROR:  updateNIDrivers should be called again after fixing the problem.
nikal: ERROR:  Logging failure...
nikal: ERROR:  Include the file /tmp/niSystemReport.out.gz when contacting
nikal: ERROR:  National Instruments for support.
nikal: ERROR: Update of National Instruments drivers failed.
..................................................

please provide a solution.

Why data from WriteMeas Read instrument driver is not continueus

$
0
0

Hello Everyone,

I have a challenge for you,

My Labview code works prefectly communicating with motorized stage and a photometer (Konica Minolta CS100A), but read and write parts are not working smoothly, it reads three different type of data ( intensity, x, and y) but it does not record them or write them.

In error out, I can see there is no error, but I can see ther error code is different for each sequence,

Photometer is connected to PC through RS-232.

the data is zero at decussate format (please see below table), the error out shows status ok all the time, for row with zero data the error code is nothing, and for rows with the data there is an error code "107367629"

I also attach the program and some pictures, could someone help?

AngleIntensityxy error code
0340.10.4430.405 107367629
10000 0
20345.990.4430.405 107367629
30000 0
40343.330.4430.406 107367629
50000 0
60335.730.4430.406 107367629
70000 0
803230.4430.406 107367629
90000 0

USB-8451 header file is missing function definitions to Get and Set Polling Timeout on I2C bus

$
0
0

Not sure where to post this.  There doesn't seem to be an I2C board. 

 

I'm using a NI USB-8451 device to write to an EEPROM.  It sometimes gives an error that suggests I increase the ACK Polling Timeout.  The manual describes a function calls to get and set the ACK timeout along with other functions that are not included in my header file.  What am I missing?

 

Thanks in advance,

Nick

Writing different measurments to a PIC

$
0
0

I have been working with recieving serial data via uart to labview parsing that data to reconstruct a AC signal then doing analysis on that signal to get amp and phase. The phase is incorrect cause of no time reference im working on that so for now im just using the tone measurment function to get a phase from my data. Then after that i want to write these measurments back to my PIC. My micro expects the values to be formated as follow.

 

A123P123

 

when my micro detects an "A" it knows the amplitude, and "P" for phase so im using the "format into string" to append the "A" and "P" to the amplitude and phase values.

 

My question is can i use the visa write in the consumer loop like the attached picture of my code while i have the visa read in the producer. Also will the format into string work.

VISA and run time engine

$
0
0

I have two questions:

 

1. After installing an exe on a non-developer (i.e.  no labview) machine with multiple runtime engines previously installed, is it possible to easily identify which run time engine(s) is being used? Will the exe always use the latest version of the RT engine, providing it matches or predates the LabVIEW version used to build the exe?

 

2. Also are there known issues with VISA control for runtime engine 2010 vs 2013? I installed and exe built using 2013 labview and created installer with 2013 RT engine on a non-LabVIEW PC to control a cryogenic bath. The VI worked perfectly on the development PC and it started off good using the exe on the non-Labview PC. However, after 1 - 3 hrs the communication would be lost with bath. The timing of the fault was not consistent, but there was obviously a VISA error. However, when I build using labview 2010 with RT 2010 embeded in the installer, I seem to have no trouble. I have tried installing the VISA run-time 5.2 with 2013 and no success.

 

Cheers,

 

Grant.

problem with bytes at port read in VISA

$
0
0

Hi guys,

I'm trying to read data from device using usb-BT dongle. It creates the virtual port and read without problem. 

My problem is the device send packets of 428 bytes, inside of this block i have 400 bytes of data from byte 9 to 409. The first 3 bytes of each block is the same.

4D45 50 -- MEP, they are the first 3 bytes of each block of 428 bytes. 

 

Ok, if you check the vi, I config the visa and send Setting data to device, read the response and it sends the data to start to sendding data.

Well, I try to read each block of 428 and show in one graph.

The problem is sometimes bytes at ports are 428 and anothers shows 23, 2, 125,... is not continous 428 bytes each iteration and destroy the data graph.

IF I check the graph outside of main loop I see the graph correct. Outside of mainvi I collect whole data and separate in 428 blocks, extract the 400 bytes of data and parse the signed 16bits to integer and show in graphs.

 

So, I dont know the best way to get 428 bytes in each iteration.. I tried to directly read 428bytes but sometimes fail again, reading very low bytes... putting time to wait before to read bytes in each iteration... I need any way to get 428 values before to get the 400 data readings. Even I could probe each block start with the 4D4550 HEX bytes to pass and got the data... 

Maybe it would be better using queue? or using any while loop to wait until I got 428 bytes??. Any help will be apprecite.

 

Regards, Fred.

 

GPIB instrument legacy Microlink 4000 using GPIB-USB-HS

$
0
0

Hello all,

 

I'm dealing with three ancient data loggers, Microlink 4000, connected by GPIB and interfacing with my PC via GPIB-USB-HS.

There are no drivers for the data loggers...

 

Their primary addresses in MAX are displayed and I'm able to send commands but I'm unsure what to do next to begin reading the data logged by each module.

I suspect I'm simply not accessing each module's secondary address or using the wrong commands. I have scoured the web for 488.1 manuals or commands but they're not working in VISA interactive control.

i.e. (Hex 0xBFFF0015) Read error occurs whenever I'm querying the devices...

 

 

System specification:

  • 3 x 4301 power units
  • 3 x 4300 control units
  • 1 x 4010 timebase unit
  • 34 x 4030 (12 Bit A-D converters)

I apologise if I've not attached enough information still very new to LabVIEW and MAX.

 

Please advise!

 

Many thanks,

JChan

How can I control equipment from Excel VBA using NI-VISA GPIB and USB?

$
0
0

Firstly, apologies if this is discussed elsewhere, but I haven't been able to find it.

 

I used to have a load of Excel macros that would control and read data from equipment over GPIB.  However, for some reason this has stopped working since a recent update to NI-VISA 15.0.  I tried downloading NI-VISA 3.0 but it would not install, I guess on the basis that a later version is already on the pc, or maybe because I'm on Windows 10.

 

I have added references to VISA.COM 5.5 and VISA COM 488.2 Formatted I/O 5.5.  Now when I try to run the macro, I get the response "User-type not defined" to the line:

 

Public defaultRM As ViSession

 

If this is no longer supported, I think that it's a shame as it was very useful being able to get data straight into Excel from a spectrum analyser using single Ctrl+key-press.

 

Thanks for any help.

My code is not responsive to function generator

$
0
0

I am currently using an Agilent 33120A 15MHZ Function generator and when I change the parameters (amplitude, frequency, etc.), my code does not reflect the changes. What I am doing wrong?


NI MAX not communicating with GPIB instrument

$
0
0

I have an issue with MAX.    I have hooked multiple instruments to a GPIB -USB-HS.  When I open MAX and go into Devices and Interface, I see the GPIB-USB-HS, but I don't get the "Scan for Instruments" or the "Interactive Control".  ALL the instruments are there at the proper address, but when I click on them, I don't get the "Communicate with Instrument" or the "Interactive Control".  I only get the Refresh button which does nothing.

 

I have tried resetting the configuration and I have gone to just a single instrument.  This setup was working a few months ago.

 

Has anyone seen this before?

Lab::VISA installation using Windows 7

$
0
0

I am trying to install Lab::Visa using strawberry perl and I get the following error. What am I doing wrong? I am a novice to perl and Visa module.  Any help is greatly appreciated.

 

I tried following the instructctions from the link here, however the path to visa32.lib seems to be correct in my Makfile.PL.

http://search.cpan.org/dist/Lab-VISA/lib/Lab/VISA/Installation.pod

 

C:\Strawberry\cpan\build\Lab-VISA-3.02-T3pLOd>dmake
Skip blib\lib\Lab\VISA.pm (unchanged)
Skip blib\lib\Lab\VISA\Installation.pod (unchanged)
Skip blib\lib\Lab\VISA.pod (unchanged)
Running Mkbootstrap for Lab::VISA ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "VISA.bs"
gcc -c "-IC:\Program Files (x86)\IVI Foundation\VISA\WinNT\include" -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -f
wrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"3.02\" -DXS_VERSION=\"3.02\" "-IC:\STRAWB~1\perl\lib\CORE" visa_wrap.c
dlltool --def VISA.def --output-exp dll.exp
g++ -o blib\arch\auto\Lab\VISA\VISA.xs.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" visa_wrap.o "C:\STRAWB~1\perl\lib\CORE\libper
l522.a" "C:\Program Files (x86)\IVI Foundation\VISA\WinNT\lib\msc\visa32.lib" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmoldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkernel32
.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuser32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinspool.a" "C:\STRAWB~1\c\x86_64-
w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libole
32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libuuid.a" "C:\STRAWB~1\c\x86_
64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libmpr.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversion.a
" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libcomctl32.a" dll.exp
visa_wrap.o:visa_wrap.cSmiley Sad.text+0xb7d): undefined reference to `viClose'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0xcbd): undefined reference to `viClear'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0xde6): undefined reference to `viOpenDefaultRM'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0xf98): undefined reference to `viSetAttribute'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x11c4): undefined reference to `viGetAttribute'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x1430): undefined reference to `viGpibControlREN'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x17b2): undefined reference to `viReadSTB'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x197a): undefined reference to `viFindNext'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x1b9f): undefined reference to `viWrite'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x1e7b): undefined reference to `viOpen'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x216c): undefined reference to `viRead'
visa_wrap.o:visa_wrap.cSmiley Sad.text+0x23f4): undefined reference to `viFindRsrc'
collect2.exe: error: ld returned 1 exit status
dmake: Error code 129, while making 'blib\arch\auto\Lab\VISA\VISA.xs.dll'

How to do request/response from the serial port communication

$
0
0

I have connected my laptop to the HW which is communicating through RS232 and i want to extract possible request/response from the port. For example:

 

If i send

Request: 3B 16 07 xx xx xx

 

i would expect the response which will read approx 50bytes of data in format

Response: 3B 16 01 02 03 04 05 .................................................... till 50 bytes

 

Any information on how to do this would de really helpful.

 

Thanks

pololu jrk motor control

$
0
0

Hi 

I am working on a project where i need to control upto 6 12v brushed DC motors with built-in feedback potentiometers (2amp current draw) and 1 12v dc motor up to 10 amp current draw were i need to regulate the speed.I need to use labview as an interface.

I have been looking at the Pololu Jrk 21v3 usb motor controlers with feedback for this application and was wondering has anyone used these before through serial usb connection with labview.Also if anyone could recomend a suitable motor controler with labview drivers (VIs) for this application it would be much appreciated.

https://www.pololu.com/product/1394  

https://www.pololu.com/product/1377

 

Thanks 

 

how to acquire all TM from oscilloscope DPO7104 in a txt file ?

$
0
0

Hello,

I would save TM from oscilloscope (rise time, fall time, Vhigh....) in a txt file.

I work with a Tektronix DPO7104 but i don't konw how to acquire all the telemesures in txt file via Labview 2012.

Could you help me please ?

 

thank you

Viewing all 5698 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>