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

RS485 Transceiver Mode setting resets after closing VISA session

$
0
0

I have a PXIe-8431/8 that I am trying to use in 2-wire Auto mode on all ports.  I know I can change this setting from the default 4-wire in MAX when running as Administrator, as well as with Device Manager.  However, I would like to do this programatically (my serial communication is implemented using the .NET SerialPort class, but I can use C++ or TestStand to change this setting if needed).  I've tried using DeviceIoControl as well as viSetAttribute.  In both cases, if I read the setting back after writing it, it is correct (RS485_MODE_2W_AUTO (3)).  If I close the CreateFile() handle or the VISA session I used to change the setting and then open a new session or handle, reading the Transceiver Mode attribute returns the default of 0 (RS485_MODE_4WIRE).  I have tried running my code as Administrator with the same results.

Since the transceiver mode can be changed in MAX or Device Manager, I know this setting can be persisted across multiple sessions.  How do I save this setting across multiple sessions programatically?

 

Thanks,

 

Brandon


Cannot install new VISA TCP/IP Resource

$
0
0

Hello everybody,

 

I've got a Problem in my NI MAX.

I cannot rightclick with the mouse for adding a new VISA TCP/IP Resource.

Does anyone know what the Problem could be?

VISA and Labview 2017?

$
0
0

Hi,

I am trying to update my programms from Labview 2009 to Labview 2017. However, all commands adressing the serial ports do not work any more. I have installed the 2017 professional development system including drivers and therefore I assume all the VISA drivers should be included. However, my VIs do not show my PC's COM ports in the VISA resource control any more. The programs run under Labview 2017, but no command to the serial port works any more.

In the installer I also miss the option to include the VISA run-time engine, that the users will nedd to run the executable.

What is missing?

How to connect TSI Mass Flow Calibrator 4040 with NI DAQ 6009 and lab view.?

$
0
0

I am new to Labview i am from Different stream of engineering i don't know how to connect this with Labview software so please help me in this regard and if possible send some model circuits......

THORLABS LTS150M Control

$
0
0

I'm new to LabVIEW and I want to make a program to control a Thorlabs LTS150M Linear Motion Platform to realize a cycling motion. I don't quite understand the example provided by Thorlabs so I cannot modify it. I really hope someone could help me. Thank you!

Is there a GPIB max message length (using C driver ni4882)?

$
0
0

Hi all,

is there a Maximum message length for GPIB Messages?

I didn't find any Information on this but when I pass a buffer that has a length of 10k to ibrd, the Driver sometimes doesn't receive data any more. What happens is that all messages are received from the Instrument, but the data is either all 0's or all FF's - even when checking the responce in NI Spy). Sending data is fine. I can check the data leaving the Instrument and it is correct. When I reduce the size of the buffer that I pass to ibrd()  to 2k it all works fine.

 

char readBuffer1[10000+1]; // leave extra space for /0

char readBuffer2[2000+1]; // leave extra space for /0 

ibrd ( deviceDescriptor1, readBuffer1, 10000); // this sometimes goes wrong

ibrd ( deviceDescriptor2, readBuffer2, 2000); // this works

 

Yours,

Marc.

 

 

NRP-Z91 Not Showing in MAX

$
0
0

Hi All,

I have a Z91 sensor that registers within Device Mgr, and using the latest NRP Toolkit and drivers yet NI MAX cannot see it. NI MAX 17.0, NRP Toolkit 4.12

 

Any help would be greatly appreciated!

retrieve header and library files?

$
0
0

Hi, 

 

I have an issue on the GPIB connection for my new power supplies (Keysight N8700A series).

 

Previously was using old model of power supplies which is obsolete, thus these series of power supplies is the new replacement. 

 

I have Keysight IO library which is able to detect and connect my existing power supply, I can retrieve my header and library file in keysight folder in my PC but when I change to new power supply, I cannot see any header nor library files. 

 

I need these files for my Labwindow CVI programming

Anyway to get the files from the folder ?


Primary address to use in NI MAX when using a GPIB-USB-HS+?

$
0
0

I'm pretty much an NI / LabVIEW newbie and I'm trying to debug a system someone else set up.

 

I'm using an NI GPIB-USB-HS+ cable to connect from my Windows 7 PC to a Keysight 34420A Nano-voltmeter.  The 34420A is at GPIB address 22.  (Verified from the front panel.)

 

I was trying to set up NI MAX to examine the system.  It correctly identified the GPIB-USB-HS+ at GPIB0.  However, when I set the NI MAX's GPIB Primary Address to 22 and did a scan for instruments, I got a "No instruments were found during the instrument scan" message.

 

More-or-less by chance, I discovered that if I set the GPIB Primary Address to anything OTHER than 22 in NI MAX, the 34420A is found, with an address of "GPIB0::22::INSTR".  See below.

 

Could someone explain to me why I have to set the NI MAX GPIB Primary Address to something other than 22 in order to find an instrument at address 22?  Is the GPIB Primary Address in NI MAX associated with the GPIB-USB-HS+ interface itself?  Am I having a newbie lack of understanding?  Something else?

GPIB_Primary_Address_2.PNG

How to use viOpenDefaultRM() to open default resource manager via visual basic

$
0
0

hi all ,

my OS is windows 7 64 bit , and i want to control Tektronix oscilloscope via visual basic 6.

I installed NI-visa 17 driver and in installed path "....\IVI Foundation\VISA\WinNT\Include" i found visa32.bas . 

Then two questions :

1. what should i  input when i call function ViOpenDefaultRM(sesn&)    ?

    in NI-visa help i see this parameters is unique logical identifier to a default resource manager        session and direction is out . but how should I know this session and its value ?

     and the direction  --out is mean this parameters is transfered by address , right ?

 

 

2. in NI-VISA help  write if i want to use data type ViSession , ViStatus and so on ,l need to         reference visa32.dll file in system32 content. but when i reference this file , i was informed that :

bad reference. Could not load file or assembly "file :////C:\windows\System32\visa32.dll" or one of its dependencies. The module was expected to contain an assembly manifest. 

 

so do i really need to reference this visa32.dll ?

if so , why i can not reference this file successfully ?

and when i change language to vb.net , also can not reference this file

Option Explicit
'#Uses "C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Include\visa32.bas"
'#Language "WWB.NET"
Sub Main
  '@TODO: enter code here

Const MAX_CNT = 200
Dim state As Long
Dim dfltRM As Long
Dim sesn As Long
Dim retCount As Long
Dim buffer As String
Rem Begin by initializing the system
state = viOpenDefaultRM(0)
If (state < VI_SUCCESS) Then
Rem Error initializing VISA...exiting
Exit Sub

End If

.

 

 

 

Matlab control of linkam T95

$
0
0

Hi everybody,

I'm trying to control the linkam T95 from a matlab program but I couldn't even communicate with it. Any help please???????

 

thank you in adavnce

Serial port remains blocked

$
0
0

Dear NI forum members,

I'm trying to connect a power meter of Siemens (slave) to PC (master), eventually read out power values from LV. I use Modbus RTU for the communication between the master and the slave. The device has RS-485 output, and I use a Siemens-verified RS-485 to RS-232 converter. The problem is that the serial port (COM3, this is a real serial port) remains busy and unreachable after one successful operation at the beginning. When this problem appears once, I can communicate with the device neither via NI-MAX nor a Modbus communicator software (Simply Modbus 8.0.6 and the vendor's own software Siemens Parametrization Software). I cannot find out what is causing this blockage despite all my trials. The different things (or various combinations of them) I did for solving this problem:

- Making sure the connection configurations are correct (baud rate, parity etc..)

- Closing the VISA session with a VI

- Resetting the device and the PC

- Making sure that there is no other program using the serial port (vendor's own software, another open/running VI, firewall). I also checked from the Procexp by searching for "Serial", and nothing appears. 

- Change the setting at: LabView Tools->Options->Environment->Automatically Close VISA sessions to make sure all VISA sessions are closed

- Tried with another serial port (virtual and non virtual)

- Tried with another PC

- Reinstalled all the drivers

- Changed the LabView from 2011 to 2016

- Bought a new PCIe card with two real COM ports (by hoping that they have more buffer and won't get "choked" by data coming from an unidentified mysterious serial source)

- Went from Windows 7 to 10

 

The problem did not appear only once when I made a completey new system. Afterwards same thing happened. I cannot perform a loopback test via NI-MAX. NI-MAX recognizes the device but cannot communicate (see picture 1). The log of the NI-I/O Trace is at the Picture 2.

I'd be very happy and thankful to hear any of your comments,

Kind regards,

Kaya

 

GPIB card or GPIB to USB

$
0
0

Hi,

I am not an experienced LabVIEW developer. Currently I have a job of acquiring waveform form Tektronix TDS380 Oscilloscope (GPIB interface) with LabVIEW. I found a IVI Driver from nhttp://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=E3B19B3E960D659CE034080020E74861.

I noticed that the driver type is IVI. Does it mean I could only install a GPIB card on PC instead of using a GPIB to USB cable to finish the job.

Thanks! 

VICI Valve Conrol/ SP Driver.vi

$
0
0

Hi all,

 

I'm trying to control a VICI microelectric actuators for Selectors (Multiposition Valves).

I have try the example Simple Serial.vi and it works well. I found this file from the forum but it missed some *.vi, like SP Driver.vi and SP parameters has some problem. Is this because the version issue or where I can find this vi.

 

Best,

ChrisY

Connection Signal Generator to NI?

$
0
0

Dear All,

 

I have a question.

 

How to connect the Signal Generator (E8257D) with National Instrument?

Which part in the National Instrument should be connect to the Signal Generator?

Is any change to connect both of them to computer? I imagine if I could use computer as the virtual osciliscope. But, I don't know the way to do all...

 

Could anyone help and share the experience?

Best regard, 


How to understand time column in text file saved by Labview with instrument Rigol oscillsoscope

$
0
0

Hi there, i am using RIGOL oscilloscope DS1052E to get data and saving in Lab View 2016 (Version 16-32 bit). I am getting time and voltage column, voltage values are understandable but time column values are in 10E-8 or 10E-09 which is not understandable.

Can i use this data to get time values for the said voltage values? I am using only 1 channel of scope.

VI file and 2 sample measurement files are attached.

 

Is there anyone to help please?

Driver for flame spectrommeter ocean optics

VISA Serial Read and Write on same MyRIO Channel

$
0
0

I'm working on a project where I'm trying to get three ground drones communicating with a central control computer (that runs LabVIEW also) using XBee antennas on NI MyRIOs to do a CRC. I would like to keep transmitted messages as simple UART serial strings. I was wondering if there was a way to configure a UART port on a MyRIO to where it could send and receive on the same channels automatically through the XBee antenna.

 

I found this example vi (serial_exercise.vi) (http://www.ni.com/example/27423/en/) to where it sends and receives the message on the same port, but its dependent upon using a boolean to switch between sending an receiving messages.

serial_exercise_vi.JPG

VISA Serial Read and Write on same MyRIO Chanel

$
0
0

I'm working on a project where I'm trying to get three ground drones communicating with a central control computer (that runs LabVIEW also) using XBee antennas on NI MyRIOs to do a CRC. I would like to keep transmitted messages as simple UART serial strings. I was wondering if there was a way to configure a UART port on a MyRIO to where it could send and receive on the same channels automatically through the XBee antenna.

 

I found this example vi (serial_exercise.vi) (http://www.ni.com/example/27423/en/) to where it sends and receives the message on the same port, but its dependent upon using a boolean to switch between sending an receiving messages.

serial_exercise_vi.JPG

How to transmit serial data with NI 8431 card with a fixed time interval between two frames

$
0
0

Hello,

I'm trying to transmit serial data with NI 8431 card using custom device in veristand, I found there were some time gaps between the data sets transferred. After that I tried using simple LabVIEW code example with timed structure configured with required period, even though I'm facing the same issue.

Please help in resolving this issue.

Thanks in advance.

Viewing all 5665 articles
Browse latest View live


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