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

How to get real data from serial instrument?

$
0
0

Hello,

I am a new user of Labview. For my project I am using serial instrument for temperature measurement. There I get the hexadecimal value. I want to get the real data. Please help me how to decode my hex result to real data. 

(please look into my labview file which is attached and the result is shown in pink box in block diagram).

Thank you


lib pylibni845x with the NI-8451

$
0
0

Hello everybody,

I want to use the library pylibni845x https://bitbucket.org/amitibo/pylibni845x

And I have a problem by installing this library during the command prompt in the located directory of the library :
We see in the README.md :

 

Download the source files of PyLibNI845x and update 'setup.py' to point to the header and lib files of the NI-845x driver software.
Then, execute 'python setup.py install' from the command line.

 

 

 

I wrote the right location of the 2 files, ni845x.h and ni845x.lib which is installed from the official driver for the NI-8451 :

 

PACKAGE_NAME = 'ni845x'
NI_ICLUDE_DIR=r'C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C'
NI_LIB='ni845x'
IPOPT_LIB_DIR=r'C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C'

 

 

 

And then when I try to install it there is these error :

 

C:\Users\aguillem\Downloads\amitibo-pylibni845x-6e8f790dfa45>python setup.py install
running install
running build
running build_py
running build_ext
skipping 'src\cyni845x.c' Cython extension (up-to-date)
building 'ni845x.cyni845x' extension
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Program Files (x86)\National Instruments\NI-845x\MS Visual C" -IC:\Users\aguillem\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\include -IC:\Users\aguillem\AppData\Local\Continuum\anaconda3\include -IC:\Users\aguillem\AppData\Local\Continuum\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcsrc\cyni845x.c /Fobuild\temp.win-amd64-3.6\Release\src\cyni845x.obj
cyni845x.c
c:\users\aguillem\appdata\local\continuum\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(371): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(371): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(371): error C2146: syntax error: missing ',' before identifier 'ni845xFindDevice'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(371): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(375): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(377): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(377): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(377): error C2146: syntax error: missing ',' before identifier 'ni845xFindDeviceNext'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(377): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(380): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(382): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(382): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(382): error C2146: syntax error: missing ',' before identifier 'ni845xCloseFindDeviceHandle'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(382): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(384): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(386): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(386): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(386): error C2146: syntax error: missing ',' before identifier 'ni845xOpen'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(386): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(389): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(391): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(391): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(391): error C2146: syntax error: missing ',' before identifier 'ni845xClose'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(391): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(393): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(395): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(395): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(395): error C2146: syntax error: missing ',' before identifier 'ni845xDeviceLock'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(395): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(397): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(399): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(399): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(399): error C2146: syntax error: missing ',' before identifier 'ni845xDeviceUnlock'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(399): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(401): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(403): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(403): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(403): error C2146: syntax error: missing ',' before identifier 'ni845xStatusToString'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(403): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(407): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(409): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(409): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(409): error C2146: syntax error: missing ',' before identifier 'ni845xSetIoVoltageLevel'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(409): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(412): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(415): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(415): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(415): error C2146: syntax error: missing ',' before identifier 'ni845xSetTimeout'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(415): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(418): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(428): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(428): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(428): error C2146: syntax error: missing ',' before identifier 'ni845xSpiWriteRead'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(428): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(435): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(437): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(437): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(437): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationOpen'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(437): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(439): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(441): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(441): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(441): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationClose'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(441): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(443): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(445): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(445): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(445): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetChipSelect'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(445): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(448): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(450): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(450): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(450): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetClockRate'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(450): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(453): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(455): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(455): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(455): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetClockPolarity'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(455): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(458): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(460): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(460): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(460): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetClockPhase'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(460): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(463): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(465): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(465): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(465): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetNumBitsPerSample'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(465): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(468): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(470): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(470): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(470): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationSetPort'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(470): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(473): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(475): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(475): error C2085: 'NI845X_FUNC': not in formal parameter list
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(475): error C2146: syntax error: missing ',' before identifier 'ni845xSpiConfigurationGetChipSelect'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(475): error C2143: syntax error: missing ';' before '('
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(478): error C2059: syntax error: ')'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(480): error C2054: expected '(' to follow 'kNI845XExport'
C:\Program Files (x86)\National Instruments\NI-845x\MS Visual C\ni845x.h(480): fatal error C1003: error count exceeds 100; stopping compilation
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

 Is someone knows why there is this problem ?

 

I thank you in advence for your help !

 

Aguillem

 

34465A Freezes on Error Code

$
0
0

Hi,

 

(Duplicate post from https://community.keysight.com/message/86401)

 

A34465A Error Codes seems to freeze LabVIEW after a few hours of operation.

 

I never had this before (in the past 3-4 years). We sent out the DMM  for calibration and now it seems to be an issue. LabVIEW freezes (doesn't seem to be stuck in the while loop but stuck at the receive VISA).

 

Not sure if this is a Driver or Firmware or Harware issue.

 

Products information:

Agilent A34465A

Firmware A.02.08-02.37-02.08-00.49-02-01

Drivers: Agilent 3446X Series.lvlib version 1.1.0.0 (if they update this number))

LabIVEW 2011

 

AG34465A Bug Frozen within Error Query.PNG

 

Thanks

 

 

Problems with serial/usb communication with M-Bus

$
0
0

Hi all,

For reading out the values from a heat meter with M-Bus I'm using a USB converter which is connected to a PC. I am able to confirm it is properly configured and functional with M-Bus sheet software. However, for datalogging purposes I want to integrate this in LabVIEW, but have been unsuccessful so far. I'm using the example Simple Serial.vi to test simple commands (configuration settings are checked to be correct). For troubleshooting I have already consulted a similar topic on the forum: https://forums.ni.com/t5/LabVIEW/Problem-with-M-Bus-communication/td-p/2993583

I have implemented a string control on the 'VISA Write' object and made sure to select 'Hex display' on the front panel. Then I tried to send SND_NKE: 10 40 06 46 16 (n.b. in the string control this is automatically converted to 1040 0646 16). However, I don't get any response whatsoever. Normally, it should return 'E5'. Also, no error is thrown from the serial configuration, write, read or anywhere else. Upon hanging an indicator on the 'Return count' of the 'VISA Write' I do retrieve the value 5.

My experience with programming this, datatypes etc. is quite limited. Hopefully someone can help me figure out what is going wrong.

using cDAQ-9132 USB ports for analog sensors

$
0
0

I want to connect a couple 2-4 sensors to the USB ports on the cDAQ-9132.  The sensors are RS485 to USB but I am fine using an external converter to get RS232 on USB.  But the manual and sales guy says the ports are only for flash drives, which seems suprisingly limited.  So it seems like I should be able to plug in two sensors onto the two ports or use a hub for more sensors and have my application query the devices.  Can anyone tell me if this is doable? 

 

Thanks in advance. 

BALLARD MIL-STD-1553 PCI CARD LABVIEW LIBRARY FILES SUPPORT

$
0
0

HI, I i have inserted MIL-STD-1553 PCI card in slot and installed drivers for LX1553-5 .BTIdriver librarys given with installation drivers are labview 8.6 and labview 2010.But labview version in my pc is labview 2014.I have selected LABVIEW 2010 driver library zip file and included in user.lib in national instruments.

but labview vis not updating in vi library.they are showing blank vis with question mark as shown below.please tell the solution.

Can not set Voltage on a Keithley 2380-500-15

$
0
0

I have been trying to control a electronic load system from Keithley but am unable to set voltage manually or using py-visa. 

Here is some code that just receives errors:

def set_voltage(user_input):
import visa
rm = visa.ResourceManager()
inputs = rm.list_resources()
usb_port=(inputs[0])
keith = rm.open_resource(usb_port)
print(keith.write("*VOLT " + str(user_input)))

set_voltage(1.0)

 

 

import visa
rm = visa.ResourceManager()
inputs = rm.list_resources()
usb_port=(inputs[0])
keith = rm.open_resource(usb_port)
print(keith.write("SYST:ERR?"))

 

Both say status success but then an error appears above the screen. 

Reading large data through rs232

$
0
0

Iam trying to read large file through serial communication(Using  RS232) . If i read small data in a file it works great. when iam trying to read large file means more than thousand lines i am getting this type of error.

1.   "VISA:  (Hex 0xBFFF006C) An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived."(error)

how i overcome this problem.

 


NI-488.2 .NET API - slave / non-controller mode

$
0
0

We want to use your NI PCI-GPIB as slave – I found following entry here

https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/GPIB-Slave-with-NI488-2/td-p/838953

and the noncic.zip ‏application there works as expected

 

But I want to use C# programming language and the .NET library (no wrapper)

 

I also found following function mapping description

http://zone.ni.com/reference/en-XX/help/370628F-01/mstudiowebhelp/html/gpibapimapping/

 

The status can be read by the device class method GetCurrentStatus()

http://zone.ni.com/reference/en-XX/help/370628F-01/mstudiowebhelp/html/31047307/

 

I also found a way to set the current status byte (ibrsv) – also a device class method SetConfigurationOption()

http://zone.ni.com/reference/en-XX/help/370628F-01/mstudiowebhelp/html/a87535c1/

 

Was a little bit tricky, because this method is not visible

       [EditorBrowsable(EditorBrowsableState.Never)]

        public void SetConfigurationOption(int configurationOption, int configurationOptionValue);

 

https://linux-gpib.sourceforge.io/doc_html/reference-function-ibconfig.html

IbcRsv

0x21

Sets the current status byte this board will use to respond to serial polls. Same as ibrsv().

 

 

But how can Idisable the system control capability

ibrsc (_board, 0);

 

Are the any .NET slave examples available?

 

Many thanks for your time.

GPIB-USB-HS does not work

$
0
0

Hello !

 

I just bought a GPIB-USB-HS but it doesn't work. I have all the drivers needed on my computer but i can't use this gpib-usb connecter because my computer can't find it.

When I open NI-MAX, I can't even try to find a GPIB device. My computer detects nothing when the device is put in the computer...

 

Do you have a solution to my problem ?

Is it simply that the GPIB-USB-HS is broken and will never work ?

 

Thanks for your answers !

NI-VISA (Impresora USB Zebra ) instalacion no funciona en windows 10

$
0
0

El problema es el siguiente tengo que dar de alta impresoras Zebra ZT610, pero al momento de correr el Driver Wizard no me deja instalar los drivers. 

Ya se realizaron pruebas desabilitando la deteccion de firma electronica en windows 10, pero al momento de instalar el archivo que genera el Driver Wizard no hace nada, intente actualizar los drivers de la impresora mediante modo manual pero sale un error "windows encountered a problem installing the driver software for your device in windows 10"

VISA Control of Power Supply via Ethernet

$
0
0

Hello. I have been trying to add in remote control for a CAEN R1471E power supply. After several hours I was able to talk to the supply via USB, and I was able to configure the ethernet port of the device. I was able to ping the device via the command prompt, but when I go to add the device in NI MAX I get the attached error. I am unsure how to proceed from here. 

Error 1073807298 on VISA Read Labview when using ethernet connection

$
0
0

Dear all,

I am running the Anfatec203 LockIn Amplifier via LABVIEW using ethernet connection. When i use the VISA interface to read the current values of channels, there appears the error 1073807298 on VISA Read with error message  - Could not perform operation because of I/O error. The code is still running well but the error keeps shown up.

 

Could someone who faced this problem or worked with Anfatec 203 LIA can take a look and explain me the possible reason and how i can get rid of this error from VISA Read in my situation. The real problem happens when i integrate this  into the big LABVIEW program to control several devices at the same time. The error blocks the execution of reading when it is put into a loop.

 

Thanks a lot

Phuong

Measurement and Automation Explorer Issue

$
0
0

I had a problem with my Measurement and Automation Explorer. When I do a right click upon Devices and Interfaces for create a new device nothing happen. I dont know how to solve this. Please if somebody know how to solve it write me an email to rpalonso92@gmail.com because I need it for my carreer.Thanks

Motor and Flow Computer for Volumetric Flow Control

$
0
0

Hello,

I am currently working on creating a closed feedback loop in LabView to control a motor (which controls a stepper valve) based on feedback from a volumetric flow sensor/computer. The motor is an Applied Motion Products' STM 23S-3AE and the flow computer is an Omega FC-22.The system goes as follows:

  1. The user inputs the desired volumetric flow (ft^3/m)
  2. The FC-22 reads the current flow value
  3. Error is determined. Based on this error, the motor turns either CW/CCW to correct the flow to the desired value (the motor will operate at a constant speed in either direction until the flow is at the desired value)
  4. This continues until the user halts the program.

 

I am having a few problems that I could use help with.

 

1. Interfacing the equipment with LabView

I have two issues with this phase:

  1. The drivers for both components are installed and actively communicating with the computer via RS232. Using NI MAX, I am able to validate the flow computer in the serial port configuration, but am unsure what to do next in order to integrate into labview. The function of this component is to measure volumetric flow and report that value back in order to determine what the motor will do. I have read about visa and their functions, but can't quite seem to get the grasp of it.How should I proceed here?
  2. As mentioned above, the driver for the motor is installed and works properly, however when I try to validate it in NI MAX, I get the following error:
    Error opening resource:
    ASRL 4::INSTR
    VISA: (Hex 0xBFFF0072) The resource is valid, but visa cannot currently access it.
    I have tried to validate with both the driver open and closed and got the same results. How should I proceed with this error and once complete, how should I proceed integrating into LabView?

2. VI Construction

LabView isn't something I generally work with, so I appreciate any advice or sample vis to point me into the right direction to construct this feedback loop. The system makes sense to me on paper but I know things can get tricky when programming.

I have attached the hardware manuals for both the motor and the flow computer,  as well as the host command reference for the motor. I am happy to explain anything in further detail if need be. I know this is a loaded post, so if you can only address one part that will still be a great help.

 

https://www.omega.com/Manuals/manualpdf/M2572.pdf

https://www.applied-motion.com/sites/default/files/hardware-manuals/STM23%20Hardware%20Manual_920-0021F-opt-.pdf

https://www.applied-motion.com/sites/default/files/hardware-manuals/Host-Command-Reference_920-0002R.pdf


Speed of Control of Pneumatic Cylinder

$
0
0

Hello,

 

I am trying to control the speed of a pneumatic cylinder's piston using pressure as input. I have a pressure regulator to control the pressure at the top of the cylinder and a passive flow control valve (not based on flow feedback) at the bottom of the cylinder, which I can use to change the resistance to the flow out of the bottom side of the cylinder.

 

My plan is to control the downward speed of the cylinder's piston.

 

I am running the attached labview code and it is giving me trouble. I am measuring the downward speed of the piston using an encoder and a counter (NI 9361). I am controlling the pressure at the top of the cylinder using NI 9263 Analog output, which is connected to a regulator (fast acting) which control the pressure at the top of the cylinder.

 

I am using digitalout (NI 9472) to switch the direction of motion of the cylinder. When I want to go down I, electronicaly, connect top to the regulator and bottom to flow control valve. When I want to go up I connect the bottom to supply pressure and top to atmosphere. I am not worried about stroke going up.

 

Problem durin down stroke: When I run the program, the counter (which measures downward speed of piston) lags the cylinder by a few seconds. SO the feedback control is useless since the piston takes only 0.25 seconds to reach bottom and the lag in the speed in a few seconds.

 

I think it's a programing issue since I can get the counter task itself working without any lag and at 2000 Hz. With the feedback loop, I can hardly get 200 Hz and I still run into buffer issues in about 10 seconds.

 

 

Any help is appreciated.

Remote terminal to bus controller data transfer program

$
0
0

Hello,

 i am using astronics  ballard avionics MIL-STD-1553 data bus.I am new in this area.please provide RT to BC data transfer program.

 thank u.

How to transfer large files via GPIB?

$
0
0

hi:

I want to transfer the picture to the PC via GIPB, but it always fails.

 

status = viVPrintf(vi, ":MMEM:MSIS 'C’" + vbCrLf, 0) 

status = viVPrintf(vi, ":MMEM:CDIR '\USER\DATA\'" + vbCrLf, 0) 
status = viVPrintf(vi, ":MMEMSmiley Very HappyATA? 'FILE.WMF'" + vbCrLf, 0) 

viRead(vi, Buffer, Count, retCount)

Regardless of how large Count is (more than 4096, such as 6000), retCount is always 4096.

If I use viRead,the actual result is only 36 bytes(It should have 59936 bytes):

“#559936淄茪      ??    sW  u ”

 

 viReadToFile(vi, filename, Count, retCount)

If I use viReadToFile, the result is 4096 bytes.and retCount is always 4096 too.

 

 

Then I set the read and write buffer size. Looks like it doesn't work.

status = viSetBuf(vi, VI_READ_BUF, 60000) 
status = viSetBuf(vi, VI_WRITE_BUF, 60000) 

 

 

So I added a wrong judgment. Then it causes the program to enter an infinite loop.So I think it may be that the instrument does not support larger buffers.
If status <> VI_SUCCESS Then
VisaErrorHandler()

End If

Private Sub VisaErrorHandler()
Dim VisaErr As String = "0000"
Call viStatusDesc(vi, status, VisaErr)
MsgBox("Error : " & VisaErr, vbExclamation)
End Sub

 

 

Then I tried to use the loop to read. The result is the same as once reading. Looks like the second reading didn't work

Do
status = viRead(vi, strRes, 4096, retCount) '太长时读出为空,容易卡死
Dim x As Integer = Val(Mid(strRes, 2, 1))
Dim y As Integer = Val(Mid(strRes, 3, x))
strRes = Mid(strRes, x + 3, y)
fanal = fanal & strRes

Loop Until (retCount < 4096)

 

 

Then I try to use the terminator and change the timeout.Looks like it doesn't work.

  status = viVPrintf(vi, "Smiley FrustratedYST:COMM:GPIB:RTER EOI" + vbCrLf, 0)

   status = viSetAttribute(vi, VI_ATTR_TMO_VALUE, 20000)

 

 

What should I do to transfer large files via GPIB?

thanks!

Control Power supply via GPIB-RS232 converter

$
0
0

Hi,

I'm having trouble controlling my Power supply(GWInstek, PSP-603, RS232 port) via GPIB-RS232 converter(http://www.ni.com/en-us/support/model.gpib-rs232.html) in Labview.

My PC has both GPIB and RS232 port, but I wanted to leave my RS232 port for other instrument, so I bought this converter.

So now I have PSP603----RS232 cable(customized by GWInstek, pin2,3 crossed)--->GPIB-RS232 converter-----GPIB cable---->PC. 

 

I searched for other articles and successfully set up my converter to G mode (using GPIB Serial Converter software) and set the baud rate to 2400 which is proper for my PSP-603 as below.(And also got the same result using 'VISA read' and 'VISA write' in Labview.)GPIB5success.png

 

 

But I'm not able to communicate with my PSP-603 via NI Max.(below picture, L\r\n is the command given by PSP-603 Manual. The command works very well when I connect PSP-603 to my PC RS232 port using RS-232 cable. So the instrument or the command is not the problem.)

 

GPIB6fail.png

 

 

What am I missing now? This is the first time using GPIB-RS232 Converter, so everything is new to me. Anything you suggest would be helpful to me.

 

Thanks,

Jounghoon

 

Unknown Device

$
0
0

Hi all,

 

I am connecting a dc power supply to my pc via a serial to usb converter.

However, i get "Unknown Device" at device manager.

 

I have downloaded the NI driver for the power supply too. But the result is still the same.

Can anyone please advise?

 

At NI Max, i can detect the device but what i get is as attached:

Capture.PNG

Viewing all 5662 articles
Browse latest View live


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