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

多循环共享一个串口

$
0
0

我要用串口控制一个步进电机,又需要随时知道步进电机的位置,然后让CCD停止采集,

这样需要两个循环的话,会出现资源占用的问题,就不响应,请问一下有没哟好的解决方法。

 


Can't see port in terminal emulator after controlling it with VISA

$
0
0

Hello,

 

I created a LabVIEW VI to control the duty cycle ratios of PWM channels on a FRDM KE02Z microcontroller. The microcontroller, programmed in CodeWarrior, is set up to receive a string from a terminal input and break it down to two parts (channel name and ratio) which are then applied to the PWM. The code works and I tested it with Termite 2.9 and a logic analyzer before controlling via LabVIEW. The problem I've been having, however, is that I have to completely close LabVIEW in order to see the port on Termite again and vice versa.

 

Previously, I had problems with the VI after I opened anything else besides it, even an almost identical VI, so long as it used the same port. I would get errors and be unable to get my VI to work again unless I restarted LabVIEW. I was able to remedy this by adding a VISA Flush I/O Buffer as per an earlier discussion (http://forums.ni.com/t5/LabVIEW/Timing-issues-with-Serial-Read-Write-can-t-acheive-terminal/m-p/2636449) after the configuration of the Serial Port and at least now I can jump between VIs. I am still unable to see the port jumping between LabVIEW and Termite unless I close one; VISA Close and closing the VI aren't enough, I have to close LabVIEW itself. Is it possible to achieve this just within the VI? By using a VISA Flush or VISA Clear at the end (before/after VISA Close) for example? If so, what is the difference/preference between them?

As I mentioned before, the VI is functional but I would like to know what is going on for future considerations. Would appreciate any advice.

Hope to hear from you,
Yusif Nurizade

tektronix dpo 2000

$
0
0

I am using the Labview tektronix DPO 2000 driver to read data from an oscilloscope.  I can easily fetch two channels of data, but they are not simultaneous samples.

The Get Multiple Waveforms routine actually downloads the channels one after the other, and the scope updates the data between scans.

 

How can I do something like pause the scope long enough to get two channels (1,250,000 samples each) that contain simultaneous data?

Turning Arrays On and Off

$
0
0

 

I have been using labview occasionally for more than about 2 years. I am not doing anything majorly intense with it at present. I currently write a few automated test programmes to test LVDT at my company. The test programme controls an Aerotech Linear stage for allowing change in sensor position, The rest of the programme will send serial commands to a relay switch box that connects the LVDT to multiply measurement devices such as DVMs, Wayne Kerr LCR meters, Power supply, Functions generators etc. 

 

The programme compromises of a front screen that has array that store information taken such as distance, Vin, Secondary coil voltages and few sum voltages calculations. At the moment all the arrays are not greyed out. I want the user to be able to choose what array are shown and which are not using a toggle switch located above each array. Seeming as the 1D array are used as indicators and not controls as they show the voltages read is there a way i can use the toggle switch to choose what measurements are shown. 

 

Thanks 

PI algoritm implementation in atmega 32 control by RS-232 (loopback) virtual model in labview

$
0
0

Hi everyone!

I have a problem as follows.In labview virtual device model created using a mathematical equation.This virtual device model is controlled by atmega with implemented PI controller. In labview I can change settings Kp and Ki. The settings are sent through RS232 to atmega  with PI algoritm implemented.After calculating the error value is transmitted back to labview. The crux of the matter. After add and  setting Ki  project crashing (for example, generates graphs setpoint value = 0). The question is - there is in the code correct  implementation setting Ki due to transfer it to rs232? I wonder how is the reception of the two values from the atmega, or you can send / receive one value after another, whether it should be set to some "flag, break in transmission" before reading the other variable (reveice Kp...stop..wait for Ki.. receive Ki...).

Translate of the names at diagram:

ilosc iteracji (how many iterations)

Wartosc zadana temperatury (setpoint final value temperature of the math model)

Czas probkowania (sampling time)

Sygnal (signal from Atmega PI after the calculation) - generates graphs setpoint value = 0 if I add Ki

atmega code fragment:

//---value received from labview Kp---------------
int Kp;
Kp = (int)USART0_Receive();
USART0_Transmit(Kp);

//---value received from labview Ki---------------
int Ki;
Ki = (int)USART0_Receive();
USART0_Transmit(Ki);i

int setpointvalue = (int)USART0_Receive();// value received from labview

 

 

 

Kenwood PA18-3A Power Suppy Driver/ Programming Manual required

$
0
0

Hi, I would like to do remote programming using GPIB for the Kenwood PA18-3A Power supply.

 

Does anyone have a base driver / programming manual for this Instrument ?

 

Manufacturer - Texio Corporation [Japan, formerly known as Kenwood]

 

Kenwood Model # PA18-3A
Output Voltage: 0 to 18V
Output: 0 to 3A
Voltage Regulation: 3mV
Ripple Peak: 0.5mV RMS
Current Regulation: 10mA
Ripple/Noise: 1mA RMS
104 x 147 x 224 (WHD) 5.6 kg

 

Any help will be greatly appreciated.

 

Thanks,

Nikita

Agilent PXA IQ-Analyzer mode

$
0
0

Is there an instrument driver ( for CVI) which supports the PXAs IQ-Analyzer (Basic)  mode ?

A first check on IDN shows the agmxa driver which uses the SA Mode and some PNP driver projects for modes other than IQ-Analyzer.

Agilents AgXSAn IVI-driver doesn't seem to support IQ-Analyzer (Basic)  mode either.

Issue with USB-232

$
0
0

OK - this is probably a fairly simple issue, but it is causing some issues that I am not sure how to resolve.  I am running LV 2013 on a 64-bit Windows 8 machine and I can not seem to get the computer to identify a USB-232 device from NI.  I am running Serial 4.0, VISA 5.4.  When I connect the USB-232 cable, a new entry in MAX under Devices and Interfaces called "NI USB Device Initialization".  I have no idea what this is or if there is something I am supposed to do with this.  Anybody have any thoughts.  All would be welcome.

 

Thanks, Matt


android gps to labview via bluetooth

$
0
0

Hi everybody,
I want to read GPS data from Android tablet.
I have a gps code that is attached below.
Can you help me to test this code ? My problem is that I haven't the android program which is can send gps data to labview via bluetooth.
Please can you try to test this code with your android device if you have the android program, and help me to try it with my android tablet.
Best regards !
Thanks.

Blue Screen of Death

$
0
0

Hi,

 

After a day of successfully testing my program. I restarted my computer and the next time that I tried to run my program I received the blue screen of death. I am running LabVIEW 8.5 on 64-bit Windows 7. I have seen that the gpib-usb-b driver can give the blue screen of death, but that shouldn't be the case for me because according to the windows I am using version 3.1.0 which should be stable right? I also get a blue screen of death when I start NI-MAX. Any thoughts on what could be wrong? Thank you for your consideration!

 

 

GW INSTEK LCR819 LabVIEW Driver

$
0
0

Hi Everyone on the forum

 

     I'm looking for the LabVIEW Driver for a GW Instek LCR 819.

     I had been looking over ther internet with no luck,  even the vendor doesn't have it

     Wonder why?

 

     Currently working on  ATE  for an  Oil Level Senor (Aerospace)

 

    Does any one use it before...   LabVIEW 2012

 

     Best Regards

 

Read multiple GPIB instruments

$
0
0

Hello,

 

I have a time issue when I want to read simultanously GPIB instruments (from 1 to 24 instruments with 2 GPIB cards - GPIB0 and GPIB1).  The user can choose the nomber of instruments he's gonna read.

 

For 17 instruments choosed for example, there's is an array of 17 rows wired to a for loop where the read GPIB is done (See TestVi and For Loop.jpeg). It took about 5 sec to get all data.

But If I juste copy 17 times the read Vi (configured as a reentrant) in a simple vi like in Untitled2.vi, it tool about 1.5 sec to get all data for the same conifguration!!! (See Without For loop.jpeg)

 

How could I read as fast than in Untitled 2.vi with a for loop or something else to allow users to set more or less instruments without copying the read Vi any time the configuration changed ?

 

I tryed to use Call a VI dynamically but it didn't worked.

 

Thank you for your help

Mac

$
0
0

I am having trouble with running NI-488 Explorer under Mac OS 10.9.  (Works fine under OS 10.8)

I get an error message saying I must be "super user".

I tried using disk utility to repair the permissions with no luck.

 

 

How to tell that Resman and NiVisaServer Finished

$
0
0

 Is there a way to programmatically determine when Resman and NiVisaServer has finished running?

 

We are running application code on a Windows XP machine (“machine A”) with NI Visa 4.5.1 and NI VXI 3.5 with a VXI chassis connected via a MXI cable to a MXI PCI card in the PC. The application code is C in Visual Studios 2008.

Another Windows XP machine (“machine B”) connects to “machine A” and issues commands to instruments in theVXI chassis connected to “Machine A”. This of course requires that "machine A" has to start Resman and NiVisaServer

 

Our issue is that when we launch Resman and NiVisaServer with our program on “Machine A”, we have no way of knowing when the programs have successfully completed. This is a particular issue with NiVisaServer…there doesn’t seem to be much documentation on that application.

 

Any guidance/tips/advice is appreciated :smileyhappy:

Problem: Instrument via serial connection

$
0
0

Hello Forum,

 

I am trying to connect my instrument to my laptop via USB through Serial port. I used NIVISAIC and found the Resource name as ASRL3::INSTR. When I was working with Laview I found the following error

 

Error 1073807246 occured at property node (arg1) in VISA configure serial port (Instr.). Reason: The resource is valid, but VISA cannot currently access it.

 

Using the interactive control one of the attribut is in red (Is Port connected: VI_ATTR_ASRL_CONNECTED: Invalid property value

 

Also when I send Identification query using NIVISAIC, it returns the same command.

 

I did not understand much of it. However there is a software for the instrument, using which I could connect to the instrument the first time I switch on the system. When I disconnect it and tried once again, it was not connecting.

 

I had earlier connected Keithley 2400 via GPIB KUSB 488. Is there any problem in connecting two devices. Or is the driver of the software and NIVISA are conflicting with each other.

 

Please find the screen shots.

Please help.

Thank you.


.NET API for NI-SWITCH

$
0
0

Where to download a help file for NI-SWITCH .NET API?

We use C# and class is NationalInstruments.ModularInstruments.NISwitch;

DSO9064通信

$
0
0
我用Labview和DSO9064通信时发命令给示波器。示波器可以接收但如果从示波器读的时候报错时间超出。在MAX里发IDN?也是报错。但给别的设备发就没有问题。如果发IDN?\n就能得到正确的返回.用从NI网上下的示波器驱动VI时也是报错。求指教是驱动不对吗?

IviFgen AM Modulation Attributes and multichannel

$
0
0

Hi,

 

I am modifying an IVI-C function/arb generator driver in CVI from a single channel to dual channel operation.

 

Most of the work has been straight forward but have hit a problem with AM and FM modulation.

 

As an example the attributes IVIFGEN_ATTR_AM_ENABLED and IVIFGEN_ATTR_AM_SOURCE are defined in the IVIFgen standard as supporting the MULTI_CHANNEL flag so I can enable and disable AM/FM modulation on a per channel basis.

 

But, the attributes IVIFGEN_ATTR_AM_INTERNAL_DEPTH,  IVIFGEN_ATTR_AM_INTERNAL_WAVEFORM and IVIFGEN_ATTR_AM_INTERNAL_FREQUENCY do not support the MULTI_CHANNEL flag.

 

I can check the MULTI_CHANNEL  flag regardless and the driver works fine allowing me to set AM_DEPTH on a per channel basis but it fails the IVI Specific Driver Test Suite (sdt.exe) which is part of CVI.

 

So, I was wondering how do I get round this problem with the IviFgen standard - I need to create a compliant driver but as our hardware has completely independant AM/FM generators for each channel I am not sure how to do it.

 

Thanks,

 

Phil

 

 

 

 

Why can't labVIEW communicate simultaneously with all of my six RS 485 devices ?

$
0
0

Hi everyone,

 

i'm writing a VI that is able to read out 8 sensors from 6 devices connected by RS 485. I'm using the VISA subVI for that. 

 

My trouble is, the more devices I connect at the same time, the slower the 8 sensor readings are coming in. One device takes 5 seconds and all six take 18 seconds, when they really should take 5 seconds, too. It seems to me, that labVIEW, the way I use it, can only read and/or write one device at the time. Is there a why to make labVIEW faster ?

 

To be more exact about my diagram. I simply have open/write/read/close structure in a subVI which is called by a subVI that handles progression of the commands and the output strings. This subVI is called 6 times in a one while loop in my main program.

 

I experimented with putting all device-work flows in one sequence structure, but there it became very obvious that more devices slow down the "rhythm" of my VI. 

 

Any help is appreciated.

cheers

 

I attach the middle subVI

Is the Interface to the USB-HS library radically different from the GPIB USB B?

$
0
0

I have a Delphi app that ran against the gpib-32.dll in pre-Windows 7 world. I've just upgraded hardware to the HS and need to retool the app.

 

Obviously the gpib-32.dll is out and the .PAS that was used to access the DLL needs retooling since NI doesn't support that anymore. 

 

I'm currently trying to determine what the new DLL is and if the interface is radically different. I know the commands haven't changed at all when using the NI Trace app so I'm left with questions...

 

1) Can I just reorient my LoadLibrary call to the new DLL because I assume access to ibwrt, etc, etc will not have changed?

2) What is the new DLL? I am currently assuming it's the niGPIBsys.dll in the shared folder but not having luck with that approach when trying to bring the first interface online (AVs)

3) In looking at the code example I cannot find a VB or otherwise example of -HS communication

 

That last one would basically eliminate the first two. In a nutshell, now that gpib-32.dll is gone I cannot find an example of how things are done with the latest device/driver so I can gain some traction on updating the old PAS for my app.

 

Any pointers or thoughts welcome.

Viewing all 5670 articles
Browse latest View live


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