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

NI VISA write function different versions of different

$
0
0

我现在在用labview做标准仪器通信接口,电脑安装的是labview2014+NI VISA 16,使用LAN接口,VXI11协仪,labview是客户端,linux应用程序是服务器我在网上下载了一个程序,用labview 2007写的,VISA版本应该是3.x或4.x,我用labview2014打开,可以和我写的服务器正常通信,程序是着样的

1.png

 

抓包发现VISA write的数据发给了服务器,服务器也正常接收了

3.png

注意看图中的VISA write是着样的,

2.png

而我使用NI VISA 16中的VISA write将程序中的VISA write替换后,就不能和服务器正常通信了,

4.png

抓包发现VISA write这个函数好像根本没执行一样,其它的包都是一样的,就少了VISA write这一步

5.png

现在,VISA write的图标是着样的

6.png

右上角多了一个时钟图标,求大神解答一下,这2种VISA write有什么区别吗?谢谢


NI PCIe-8372

$
0
0

Hi

I'm pretty much lost as where to post this question, but this looks to be the closest forum.

I have a PCIe-8372 4-lane cablePCIe PCIexpress card. It is connected via cable to custom hardware. When operating in 4-lane mode the system (NI board, cable, and our custom board) work fine.

If we lower the lane width to x1 on our board (simple FPGA re-programming), then the host PC will not 'see' our hardware and the PCI-8372 does not even attempt to negotiate a connection.

Is this normal behavior? Must the 8372 always be operated in x4 mode?

Thanks.

Will a PXI-8360 work with a PCIe-8361?

$
0
0

Hello,

 

Would a PXI-8360 work with a PCIe-8361 in a 1062Q chassis? A broader question would be, can I match PXI and PCIe hardware?

 

Thank you.

 

 

Letter of Volatility for 779163-01 and 778032-01

$
0
0

I need the Letter of Volatility of the following items:

NI VXI-USB Slot O Controller (USSB 2.0 to VXI), P/N: 779163-01
NI PCI-GPIB Interface Card, P/N: 778032-01

RS232 port problem of CompactRIO

$
0
0

Hi everyone,

 

I have a problem in communication of CompactRIO 9025 with third party hardware. Let me explain you what my problem is;

 

I connected my Ethernet cable in between my computer and CompactRIO. I can collect data in this way. There is no problem. But when I connect third party hardware to the RS232 port of CompactRIO, I can not communicate with the hardware.

 

To find out what happens, I tried to make loopback testing. I shorted RX and TX pins of the RS232 and observed. But when I sent a command which is for example 5-byte, I read 0 byte from the VISA Read function and the program gave me no error.

 

In MAX, I can not see com ports. Also I can not see com ports on Device Manager menu.

 

I really do now know what is going on. Any help please?

64-bit NI-IMAQdx C library file

$
0
0

I'm currently trying to write camera control code in C/C++ using the NI-IMAQdx functions (Hamamatsu, Orca R2). The header file for the IMAQdx function prototypes are fine, but I'm running into "unresolved external symbol" errors. The only thing I can think of is that the niimaqdx.lib file is 32-bit and not 64-bit. I've read around Google and found some posts in 2008 that this is because the old NI Vision/CVI software that the library file is a part of is only available in 32-bit. However, this being almost ten years later, I would hope that this is no longer the case.

 

Is there any chance that I've missed some download somewhere for the 64-bit version of the niimaqdx.lib file?

 

Running NI-VAS 2015 as well as compiling in Visual Studio Express 2015, by the way, if it helps.

 

Hopefully, this is the right place to post this question.

 

Edit:

Here's the old post: https://forums.ni.com/t5/Machine-Vision/64-bit-niimaqdx-lib/td-p/1148730

maximum sampling rate

$
0
0

hi, 

    I am using a Picoscope 4423 using USB and creating a virtual oscilloscope in labview. I want to know what is the maximum sampling rate i can get. As of now i am unable to get more than 1M samples per second or in other words a sample interval of 1us. Is this the limitation of hardware or labview or my programming? I am able to reach a maximum frequency of 500KHz.

 

i have attached my .vi files below

How to change GPIB device primary address

$
0
0

Hello ;

       I'm new comer to GPIB filed. We want to integrate one device into our antomatic test enviorment.

The GPIB primary address of the device is shown as 25 in NIMAX(seen as attached). We intend to change the primary address to 4. Could someone tell me how to change the primary address of this device?

 

thanks!

 

BR//jackie 

  


Controlling ADALM1000 (M1K) from Analog Devices

$
0
0

Hi everyone,

I am trying to use the ADALM1000 device from Analog Devices as a SMU, by controlling it with LabVIEW. This device has two channels from which you can chose to measure a voltage, source a voltage and measure a current, or source a current and measure a voltage.
There is a software (PixelPulse) that allows to do all of that but I need to be able to do it in LabVIEW, at least I need to be able to source a voltage and measure a current to plot IV curves. 

So I was wondering if anyone has been able or tried to do that yet?

 

Up to now, I went through the source code of PixelPulse (which is available on the github of analog devices), to understand how to control the device. Since I am not really good in C, I still don't get everything but I know what library it is using (libsmu).
I was thinking of using this library in LabVIEW using those instructions (http://forums.ni.com/t5/Example-Program-Drafts/Using-Existing-C-Code-or-a-DLL-in-LabVIEW/ta-p/3499233), but I don't know if this is a good solution and if I will be able to use it afterwards.

Thanks in advance for you opinion on the matter! 

Sharing COM PORT MOXA

$
0
0

Hello

 

I am using 3 computers which run the same VI.

They are connected on Ethernet and then, I have a MOXA (Nport 5150) connected to my RS232 device.

I configured 3 different COM PORT number depending on which computer needs to have access to the COM PORT.

COM 1 = PC 1

COM 2 = PC 2

COM 3 = PC 3

 

They are not using the COM PORT all time and never at the same time. But soon one PC has used the COM PORT, the other 2 com port on other pc are not usable (I can see it in NI MAX). And I do ask to close the VISA com port in my software...

 

So is that because I don't close the port properly ?

Or because it is not possible to share on COM PORT with a MOXA ?

 

Thank you

Agilent 82347B GPIB-USB connection problem

$
0
0

Hey

 

I'm trying to connect to a DS345 function generator with Agilent 82347B GPIB-USB.

Let me first start by saying, I've read most posts i found on this board and others regarding this topic and could not find a solution to my problem.

 

After following the installation steps (here) and settings (here) when trying to run an auto scan in connection export (ver 18.0 i've also tried older version down to 15)  the GPIB interface is recognized, but the devise connected to it is not recognized (I've tried to use SRS DS345 and SRS SR865). If I go to NI MAX (ver 17) I can see the interface but again no instrument (of course i verified the GPIB address in my device), if I manually add the devise in connection expert only then can i see the instrument both in connection expert and ni max. But I cant even sent *IND? command both in NI max (Hex 0xBFFF0015) and connection expert (0xBFFF0015). Also if i try to use NI Max VISA interactive control I get an error message ( 0xBFFF003A) see attached files for all the errors I get.

 

In the past I had no problem connecting to this device with the same setup (older versions of NI MAX and connection expert), since, I've installed an optical design program called OSLO by Lambda Research and in order to install it's security usb dongle I had to follow these instructions to activate it. The first thing I tried to fix this possible conflict was to remove the logos.ini  file i've created but no luck there.

 

I'm not sure if the last part have any connection to the problem, but i'm really lost here.

Appreciate any help!  

  

Assigning parameters for write_ascii_values in pyvisa for serial port

$
0
0

Hi all,

 

I want to control my Keithley 6485 Picoammeter externally by connecting it via RS232toUSB to my Linux PC (CentOS 6.9) and writing a code in python (version 2.7.13) with pyvisa:

 

import sys
import visa
from visa import constants

rm = visa.ResourceManager('/usr/local/vxipnp/linux/lib64/libvisa.so')#open serial connection and set baud to 9600,8 data bits, CR termination, one stop bit, none parity, no flow control
amm = rm.open_resource('ASRL2::INSTR', baud_rate =9600, data_bits =8, write_termination='\r', read_termination ='\r')
constants.VI_ASRL_STOP_ONE     
constants.VI_ASRL_PAR_NONE
constants.VI_ASRL_FLOW_NONE                  
amm.write("*RST")# Return 6485 to RST default
amm.write("SYS:ERR:ALL?")# Return error message 
amm.write("TRIG:DEL 0")# Set trigger delay to zero seconds
amm.write("TRIG:COUNT 2500")# Set trigger count to 2500
amm.write("SENS:CURR:RANG:AUTO OFF")# Turn auto range off
amm.write("SENS:CURR:NPLC .01")# Set integration rate to NPLC 0.01
amm.write("SENS:CURR:RANG 2e-7")# Use 200 nA range 
amm.write("SYST:ZCH OFF")# Turn zero check off
amm.write("SYST:AZER:STAT OFF")# Turn auto zero off
amm.write("DISP:ENAB OFF")# Turn Display off
amm.write("*CLS")# Clear status model
amm.write("TRAC:POIN 2500")# Set buffer size to 2500
amm.write("TRAC:CLE")# Clear buffer
amm.write("TRAC:FEED:CONT NEXT")# Set storage control to start on next reading
amm.write("STAT:MEAS:ENAB 512")# Enable buffer full measurement event
amm.write("*SRE 1")# Enable SRQ on buffer full measurement event
amm.write("*OPC?")# operation complete query (synchronize completion of commands)
amm.write("INIT")# start taking and storing readings wait for GPIB SRQ line to go true
amm.write("DISP:ENAB ON")# Turn display on
print(amm.query_ascii_values("TRAC:DATA?"))# Request data from buffer

The problem when I run this script I just get "1" as the print output, although it should be returned in ASCII like this: Reading, Timestamp, Status and the error message after amm.write("*RST"): -113 undefined header. So I think the messages and not transferred correctly.

I know over the RS-232 interface, only the ASCII format is allowed. But when I follow the example in the pyvisa instruction with write_ascii_values(text, values) and assigning it a list, I only get an error message from the device -100 Command error.

Can somebody please tell me how to set the variables in write_ascii_values correctly or what I am doing wrong? Are my settings for the serial device wrong? Sometimes when I execute 2 times I get the error "VI_ERROR_ASRL_FRAMING (-1073807253): A framing error occurred during transfer ." too. I just do not know what to do.

Thank you!

Regards, Roland

Delay in output signal (unwanted)

$
0
0

Hello,

I'm new to labview.
I'm trying to make a program that will read an input, and if the input is 1 then it will output a sinusoidal wave or if it is zero it will output zero.

I am successfully reading the input, and  can output the sine wave, however when I am reading the signal on the oscilloscope, there is a 5-10 ms 'delay' once every second and if I change what the input signal is, it will only update after 1s. I have attached pictures of my program and the output.

Is there a way to output the signal continuously (without the delay)?

Is it possible to have the wave update in real time?

Thank you

 

 

Multiple barcode scanner RS-232

$
0
0

Hello All,

I will be using 5 RS-232 barcode scanner with RS-232 to USB converters.

I want to read the barcodes/string only when the operator triggers the barcode scanner, i.e. dont want to read the port all the time.

how can I do it ??

 

Thanks

data adquisition

$
0
0

I have a "GCTS" data acquisition system and I need to read data of strain, pressure and deformation, the problem is that my daqassistant does not recognize the device, What is the best method to perform a data acquisition?, i use labview 7.1


Controlling one intrustment with two applications using VBA

$
0
0

Hi everyone,

 

I am writing two programs to control a signal generator using VBA

The problem is these two programs can't run parallelly, sometimes it got stuck

Even if i use two PCs, it still happen

 

How i can solve the problem?

 

Thank you and best regards

Programming Configuration (.ini) File to Call Specific RS-232 Hexadecimal Commands during Simulation

$
0
0

Hello, 

 

I have two separate VI's, one for sending and receiving Hexadecimal commands using text files over RS-232 comms and the other VI uses a Configuration (.ini) file for manipulating compact DAQ channels, (Analogue Outputs/Digital Output modules).

 

What I want to achieve is for both VI's to operate as one program, whereby as the channels are set and active in hardware, can be programmed to fire a specific RS-232 command (equivalent to a sub-routine) and receive a response. I want to accomplish this so that I can track the parameters set in the motor controller and make sure that everything is 'bug' free.

 

I think my main concern is whether both these VI's are compatible with each other? At this stage I have two separate programs running with different formats, one using .txt and the other using .ini.

 

I need to be able to call a subroutine from .ini or in the VI somehow to fire a specific hexadecimal .txt command depending on what is being exercised on the cDAQ modules.

NI-Spy and NI I/O Trace: How it work?

$
0
0

Hi everyone,

 

I want to write a program that work similar to NI-Spy or NI I/O Trace using VBA

Could anyone explain me how they work? or which API should i use?

 

Thank you so much

IVI - Errors when using GetSpecifiDriverCHandle

$
0
0

Hello,

i created a C++ DLL for the IviDmm class and i am calling the Keysight 34980 ivi driver. This custom C++ Dll contains all generic functions of IviDMM and is working fine..

Now i wanted to run a specific function of the 34980A-driver. For this execute "iviDMM_GetSpecifiDriverCHandle" which returns a numeric handle without error.

 

Then i run a function of another custom C++ DLL where i call some specific functions.

For example:

viStatus = Ag34980a_SetAttributeViBoolean (Vi, Channel, AG34980A_ATTR_OUTPUT_STATE, State);

 

For the parameter "Vi" i pass the specificDriverCHandle that was created by the other DLL.

 

But the function returns:

-1074135040 = Failure cannot recover.

 

What is the error here?

Same error occurs also in Simulation mode

Thanks

 

NI MAX 16.0.0f0

ICP 16.0.1

IviSharedComponents 242
Driver setup in MAX: DMM=true, slot1=34932A, slot2=34932A, slot3=34932A, slot4=34932A, slot6=34941A, slot8=34937A

Keysight driver: 1.5.7.0

 

 

Agilent 34972 EZ examples freeze DAQ

$
0
0

I'm playing with Labview and the Agilent 34972 to get a feel for instrument control.  I am using two of the example EZ blocks from the pallette, pictured below.  My simple vi runs fine using just one EZ, either one.  However trying both together freezes the daq.  I think I am initializing incorrectly...?  Any help is appreciated.

 

agilentvi.PNG 

Viewing all 5685 articles
Browse latest View live


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