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

MODBUS-RTU connection with aleatory VISA communication fails

$
0
0

Hi everyone,

 

I have a big problem that I'm trying to repair since a pair of months. I have a MODBUS gateway connected to my pc via RS-485 in RTU mode. The physical implementation is based on Ethernet cable, so I have two connection converters in both endings of the Ethernet cable that wire each line to its corresponding terminal in a RS-485 connector. On the side of the PC i also have an electronic card to convert RS-485 to USB for connect using a USB port for pc's connection. That card is the model USB-COM485-PLUS1 from the company FTDI chip. I have installed on my PC the drivers of the card that configure a virtual COM serial port for my RS-485 communication. On labview I have programmed my interface for communication using a MODBUS library that was installed previously on my PC (I am using my company PC, because i have this problem on my workplace).

 

The problem is that, usually, my system works correctly, and the communication is perfect. I read always the holding registers of my gateway, and i can write the control registers without problems, but, some times, the connection spend more time without communication that reading, and after some hours in that conditions, it fall in continuous fail and doesn't work any more since the next day. That problems persists even if i restart the PC or shut it down for a while. By the other side, I realized that when the communication falls it only fall on the reading wire, because even if the reading communication is with continuous fail, i can write on the corresponding registers of my gateway.

 

I'm sure at 80% that the gateway runs correctly, and I have other installation similar with the same gateway, cable, connections and card working correctly. I tried changing the Ethernet cable, changing the RS-485 to USB conversion card and only when i changed my PC, the problem disappears. So I thought it was a problem of the PC. But some time after I changed the PC, the problem returned. After this, I continue making probes and actually I have the theory that it may be a problem because i have other communications running at the same time in my labVIEW app. I think it may be a problem of incompatibility of drivers or a bridge over different communications that make it fail. Because the pc's where this error disappear has not installed NI RIO drivers.

 

My LabVIEW program also have a communication via Ethernet with a NI cRIO 9076 chassis. That chassis has a module for PROFIBUS communication, also has a module for thermocouple inputs, a module for voltage inputs and other for voltage outputs. All this modules work correctly always. My theory is that some of this other modules in NI cRIO 9076 chassis may cause a conflict that make my system works wrong. Other things that seems me annoying is that i bought recently a new conversion card for RS-485 to USB connection and it doesn't works on my system, I have other two identical cards and they work correctly, and i know that the new card works also in other systems i have.

 

The issue I don't understand is that this problem doesn't happend many times and it seems to be aleatory... The fail that the labVIEW return when it can not read the holding registers is a timeout error because of a frame error. It would be illuminating for me if that error where periodic or systematic, but occurs only a day every two or three weeks and the rest of time works properly. But on my company, when this installation will work continuously, it can't have any day of non-work.

 

So, please, I need help with this Issue, I'm lost int he way of resolving it. Thanks only for read this large post. :smileyhappy:

 

Regards, 

 

Joaquín

 

 

PD: Please, don't damn my English, it is not my mother tongue, I'm spanish.

 


SCXI-1000 not detected

$
0
0

We've got a lab where they have recently installed 32-bit Windows 7 on an old computer and reinstalled LabVIEW. I believe that the version they installed is 8.5, or thereabouts. They also installed NI DAQmx.

The comoputer has an NI PCI6229 installed, cabled to a SCXI-1000 chassis with four SCXI 1143 modules, each with a SCXI 1305 module attached.

I've manually added the chassis in NI-MAX but ic won't autoscan the modules. If I add the modules manually it tells me that it is expecting to see the 1143s but can't. If I try to reset the chassis it gives me an error with helpful suggestions line check to see that the cable is attached (which it is). The light is on on the chassis, I've checked the address - still set at the default of 0.

 

Unfortunately the tech that set the system up initially is no longer here. I didn't do the installation, I just got called in to try to get it working.

 

How do I isolate the problem? This is all hardware that was working previously and LabVIEW itself seems to run OK so my first inclination is to look at DAQmx or something on the software side. Is there an easy way to tell whether DAQmx is working and seeing the PCI6229?

Brief Overview of NI Drivers

$
0
0

I would like a general overview of the NI drivers (i.e. what is the name and extension of the main driver file, does it call functions from a different .dll file, where is the location of the driver files). Right now, I am seeing drivers in different locations for my Windows 7 OS (i.e. C:\Program Files\IVI Foundation\IVI\Drivers, C:\Program Files\IVI Foundation\VISA\WinNT)  So far, I have not found any specific documentation that is helpful in regards to how NI's drivers work.

 

For my application, I am using MATLAB and the Intrument Control toolbox to "convert" the NI-SWITCH driver into a MATLAB driver. I'm a bit confused if the "niSwitch.fp" file is the main driver file or not, or if it points to the source code that is located elsewhere.

 

Any insight would be extremely helpful and appreciated!! Thanks in advance!

HP 3852A Data scanning speed

$
0
0

Hi Labview users
I have 3852A DAQ, which is connected by GPIB-USB-B. It's data scanning/updating speed is lower than expected. It's reading 32 data (23 of thermocouple, and 9 of analog voltage), and the data updated every 2 seconds (While loop is set to run as fast as it can). When it reads smaller number(2 or 3) of data, it runs faster. I want to know if there is any way that I can increase the data scanning speed faster than every 2 seconds. I attached my VI for review. Thank you. 

How to activate the APD' input gate (SPCM-AQRH-15, Perkin Elmer) by TTL pulse generated by PCIe 6351?

$
0
0

Hi everyone, I'm newbie in electronic stuff. In my experiment  I'm using the APD photodiode from Peikin Helmer (SPCM-AQRH-15) to count # of photon (fluorescences). I want to gate the APD by applying on the APD' input gate a TTL pulse (which generated by Labview via PCIe 6351). This pulse, although clearly displayed in an osciloscope (Textronix) with 10µs pulse width but it does act on the APD (the APD responses nothing to this pulse). I read SPCM-AQR series' datasheet, which says that "The GATE input (BNC connector) impedance is 50 ohms and internally connected to the +5 volt supply through a50 Ω pull-up resistor (standard module versions). It canbe driven by standard TTL level signals. The gatedrive must becapable of sinking 100 mA to gate the module off (5V/50 Ω). Operation: TTL high – module counts, TTL low–counting disabled".

I don't know exactly the "current sink" means and how to get it in a BNC connector.
Could anyone instruct me how to gate the APD by a TTL pulse generating by PCIe 6351 board? Any help will be appreciated.
Thanks in advance.

VXI-MXI-2 is not detected in VIC / VISA panel

$
0
0

Hello,

 

I have a VXI work station (VXI-MXI-2)  with Windows XP (PCI-MXI-2). I had installed the nivxi 3.1.1.

 

The VXI-MXI-2 card is not detected / showing in the VIC panel. Only the PCI-MXI-2 is detected as VXI0 (PCI-MXI-2).

 

No error occoured while running the Resman. It was completed successfully.

 

 

Regards,

Perumal.V

 

 

VISA resource name problem with Hameg HMS1000

$
0
0

Hello,

 

I have a HAMEG HMS1000 spectrum analyser and i want to communicate with it using NI VISA and SCPI commands.

 

First i created a driver for my device with the informations given here : http://www.hameg.com/0.563.0.html. my device showed in the device manager under  "NI-VISA USB Devices"

 

The problem is when i launch NI MAX i can see my device and communicate with it using "VISA TEST PANEL" but when i switch to labview, visa resource name doesn't show the name of my device.

 

did i do something wrong? please help

 

 

RS-485 /Wire2-EchoDTR loopback example - Error -1073807330 occurred at Property Node (arg 1)

$
0
0

Hello,

 

Im trying to check if my USB to serial RS485 converter (Digitus- DA-70157 FT232RL based) is working. When i used RS232 i could perform simple loopback test in Realterm/hyperterminal/Br@y++ Terminal

 

I read that something like this is not possible with RS485? I found example at NI site

http://digital.ni.com/public.nsf/allkb/D5CC369B3E3E6F0586256D1600563245

 

Im looking at "Two-wire Echo (non-Auto) Mode"

 

I connected my USB to serial converter to USB (using latest FTDI drivers 2.12.0.0, i can see new USB serial port in device manager under COM3). I prepared a loopback connector just like in article above (both socket and plug pins are numbered so i double checked they are right, i also tested connectors to see if singal can pass).

 

I downloaded VI attached to article above. Fresh from the page, no modifications. I open it (lab view 14.01 32bit and i downloaded what seems to be newest Ni Visa drivers from October 2014 http://www.ni.com/download/ni-visa-14.0.1/5023/en/ my operating system is windows 8.1 64 bit)

 

Then i configure Visa serial connection to match settings in device manager:

Baud rate 9600

data bits 8

parity none

stop bits 1

flow control none

delay before read 500

And of course most important i pick Visa resource name COM3 (i checked it against my device manager and USB to serial convered does indeed appear under COM3)

 

I type in string to write "test" and..... no matter what i do it ends up with error:

 

"Error -1073807330 occurred at Property Node (arg 1) in 485 Loopback Test 2 Wire Echo.vi

 

Possible reason(s):

VISA:  (Hex 0xBFFF001E) The specified state of the attribute is not valid, or is not supported as defined by the resource."

 

It happens if write is On and read is Off. It also happens if write is Off and read is On and happens when both read and write are off aswell. It also happens if the string to write is default "*IDN?\r\n"

 

The only thing i figured out is that if i delete first property node "wire mode" the progam will execute without errors but i seems that it does nothing, string to read is empty.

 

 The exact same thing was happening at other computer (with older labview and older ni-visa drivers) and i thought its because of not up to date drivers thats why i tried other computer with stuff that is up to date.

 

I did thing you do every time something goes wrong:

- i tried unplugging and plugging converter again,

- i checked other USB ports and i tried plugging converter directly into USB (no additional cables)

- i tried restarting my computer and labview

and the error above still haunts me.


Fail to communicate with ISCO Series D pump controller

$
0
0

Hey everyone,

I have an Isco Series D Pump Controller (which is connected to an Isco Model 100DX Syringe Pump) that I would like to control using RS232 on Labview. I do not have their LabView Toolkit which Teledyne has mentioned in their Technical Bulletin (TB06). Also, I would like to automate my test,so using the Labview Toolkit wont be of too much help either.

 

The problem I am facing is not being able to communicate with the controller either via hyperterminal or LabVIEW.

 

I have ran their built in serial test (mentioned in TB06) and it communicates as expected. I have also tried running their Remote Pump program (mentioned in Teledyne's Technical Bulletin 19 - TB19) which seems to do what is expected as well.

 

I tried talking to it using LabVIEW first using the vi I have attached, and I saw nothing on the read buffer. So I moved to hyperterminal.

But when I try to send the 'remote' command listed in TB19, it does not seem to do anything. There is no response on the hyperterminal.

There is mention of some DASNET protocol, and I found the .dll file which I also moved to my Windows System 32 folder. It didn't work even after that too.

 

I have attached TB06 and TB19. Let me know if you have any other ideas how to test it.

Please let me know if you need further information.

 

Thanks,

Sandeep

 

 

 

NI GPIB-USB-HS Multiple Units Running in Parallel?

$
0
0

I have FOUR GPIB Devices running on a NI PCI card on a single PC.  The only problem with the GPIB Bus is it must be a sequential read.  This forces me to read data one at a time and this isn't fast.

 

I found the NI GPIB-USB-HS.  

http://sine.ni.com/nips/cds/view/p/lang/en/nid/201586

This runs from a USB cable.  Can I read four USB cables at the same time and cut my GPIB read by 75%?

 

Can anyone confirm?  If you have multiple GPIB-USB-HS on a single PC, can you read all four GPIB Devices at the same time in Parallel?  Or does the GPIB-USB-HS act just like NI PCI GPIB cards with Sequential reads?

 

I need to read four GPIB devices at the same time I'm hoping the GPIB-USB-HS will do this...any other suggestions?


Thanks,


Doug

AG53131A labview driver

$
0
0

 

Hi guys,

 

is that anyway to get the labview driver for Agilent 53131 frequecy counter as attahced. I download the driver from NI but unable to control the devices even it is in remote state already. Appreciate if somebody can provide help.

 

thanks,

BS

hp3458a_revision_query issue

$
0
0

We're using a NI driver for the HP3458A DMM from LabWindows/CVI. The source file is hp3458a.c. The function hp3458a_revision_query() throws an exception. The following line in this function appears to be the culprit:

 

checkErr( Ivi_GetAttributeViString (vi, "", HP3458A_ATTR_INSTRUMENT_FIRMWARE_REVISION, 0, 256, instrRev));

 

If we comment out this line and rebuild the driver, the issue goes away. The preceding line, which queries a different attribute using the same function, seems to work fine:

 

checkErr( Ivi_GetAttributeViString (vi, VI_NULL, HP3458A_ATTR_SPECIFIC_DRIVER_REVISION, 0, 256, driverRev));

 

So the issue seems to have something to do with the "firmware revision" attribute. Commenting out the offending line is an acceptable workaround, but we'd like to include the "firmware revision" information in our reporting process as well, if possible. Is there possibly a fix for this issue?

 

Note: Changing the second argument from "" to VI_NULL does not help.

 

Thanks!

 

NI VISA Write Error on 64 bit application

$
0
0

Hi there,

 

I had recently trying to compile my working 32bit Labview application to 64bit since I want to try out the performance under 64bit OS. 32bit application is noticably slow on a 64bit OS.

Here is my problem: I am using VISA Write Function in the application and for some reason, I am getting errors back when I run the 64bit application but the same code run on 32bit application.

I tried NI VISA 5.4 & 14.0 but both throwing errors. Anything else I can do to eliminate the error here? :smileyindifferent:

 

Below are output from the NI IO Tracer:

32bit:

200.  VISA Write ("GPIB0::18::INSTR", "*IDN?")
Process ID: 0x000008E4         Thread ID: 0x000017FC
Start Time: 22:29:06.944       Call Duration 00:00:00.015
Status: 0 (VI_SUCCESS)
201.  VISA Get Attribute ("GPIB0::18::INSTR", 0xBFFF0002, "GPIB0::18::INSTR")
Process ID: 0x000008E4         Thread ID: 0x000017FC
Start Time: 22:29:06.960       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
202.  VISA Get Attribute ("GPIB0::18::INSTR", 0x3FFF001A, 3000)
Process ID: 0x000008E4         Thread ID: 0x000017FC
Start Time: 22:29:06.960       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)

 

 

64bit:

9.  VISA Write ("GPIB0::18::INSTR", "*IDN?")
Process ID: 0x00000A74         Thread ID: 0x00001150
Start Time: 21:08:25.491       Call Duration 00:00:00.005
Status: 0xBFFF0011 (VI_ERROR_RSRC_NFOUND)
10.  viParseRsrc (0x00001002, "GPIB0::18::INSTR", 1, 0)
Process ID: 0x00000A74         Thread ID: 0x00001150
Start Time: 21:08:25.496       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

 

Thanks!

USBMTC scope VISA resource

$
0
0

This is my first time using a USBMTC instrument.

 

We purchased a Tektronix TBS1052B.

NI-MAX detected it, and I am able to do a *IDN?  query.

 

I am concerned that the VISA resource that is used now on my development PC will change when the program is eventually installed on another PC.

 

What is the best solution to this?

 

Do I do a scan for all USB resources?

 

NI-488.2 14.0 Runtime installer does not work nicely with installer toolsets

$
0
0

Hi Everyone,

 

I am trying to build an installer that will run the NI-488.2 14.0 Runtime installer as a prerequisite package. Unfortunately, it doesn't appear to be packaged nicely as I am not able to find a one step way to silently install it. The reason for this is that the setup.exe file (along with 208 additional files and 35 directories) is packaged inside a self-extracting WinZip archive. Therefore, installing this requires two steps: 1) extract the archive 2) run the setup.exe with a /q command line switch. However most (maybe all?) toolsets for bundling installation packages cannot handle such a multi-step process. Every decent installer generally comes packaged so you can run it with one call and some optional command line arguments. Is there some trick here that I am missing to do this?

 

Thanks.


Eaton PLC Controller With Labview

$
0
0

Hello,


I am trying to control a  furnace that comes with an Eaton PLC.  The default ports options are Ethernet and RS232. GPIB port would cost extra money to install. While communicating with the furnace, the labview is also communicating with a DAQ and a pressure controller through GPIB. In this case, should I order GPIB option on the furnace as well ? What would be some pros and cons ? What would be the best option to control a PLC in general ?

 

Thanks

 

ffl3883

viRead() always get VI_SUCCESS_MAX_CNT(3FFF0006) even though the buf is big enough

$
0
0

Hi ,

i am using NI-MAX 14.01, with its visa driver, i want to read 75000 bytes data from an agilent instrument via hislip. 

i have already allocated a 99999 bytes long buffer, suppose it is big enough to handle this data.

the code looks like:

 

unsigned char sendbuf[1000];

unsigned char recvBuffer[99999];

status = viOpenDefaultRM(&defaultRM);

status = viOpen(defaultRM, "TCPIP0::192.168.0.1::hislip1::INSTR", VI_NULL, VI_NULL, &instr);

sprintf_s(sendBuffer, "fetch:EVM?\n");
int len = _mbstrlen(sendBuffer); 

status = viWrite(instr, (ViBuf)sendBuffer, len, &count);  // this line can be executed successfully, and the instrument does truly received this command

status = viRead(instr, (ViBuf)recvBuffer, 99999, &count); //  but at this line, i always get 3FFF0006 (MAX_CNT) warning, and the output count is always ZERO. 

i think it does not makes, if the received data really exceeds the buffer, the output parameter "count" should not be ZERO. 

 

I also did the follwing tests

1. change the hislip to vxi-11. replace hislip1 with inst1. the code works very well,  the "count" is exactly 75000. the status = VI_SUCCESS.

2. use VISA-TEST pannel and send the same command to instrument. the VISA test pannel shows that status=VI_SUCCESS, but the output "count" is about 13000, not 75000 as i expected. 

3, I also use Agilent IO library suite 17 provided VISA driver. my test code can also work correctly. 

 

i don't know if i made any mistake in my test code. I do really appreciate for any suggestions correctons, and comments. 

thanks 

KEEHUA

 

 

 

 

FID testa (Hydrocarbons emission measuring instrument)

$
0
0

Hi guys,

I am new to labview.I have an instrument called FID tester that is connected to the wiring box (PCLD-780) which is in turn connected to labview. The instrument gives both digital and analog signals, now I am doing the digital part, since I have just switched on the instrument and no values are getting, I have used a 10cm wire to close the circuit, just to get the signal.

Now I have an already prepared vi by someone where it is made to read 1st 4 digits (for some other instrument), but now I want to modify that vi to this instrument (FID) and to do so I want to read last 5 digits which means in total 9 bits! As you can see from the vi that it was used DIOReadPortByte to read the signal and so it means the maximum capacity to read is 8 bits and to read 9th bit I should use something else so I am using DIOReadPortWord, but when I use that I am getting an error saying Function not supported, Kindly please help me out of this since it is an old software and nothing is working!!!

Its just I want to read last 5 digits and while testing I will set a knob to each measurement range and see that Bit 4, 5, 6, 7 are working properly(meaning if I set to measurement range 1 then bit 4 glows, if I set to range 2 then bit 5 etc) but when I see that bit 8 glows everytime(coz its not reading at all)

1st attachment is of byte(the original one) and the second is wat i changed to word where i get the error!

 

 

keithley 2410 wrapper class

$
0
0

Hello, i was looking for a ivi-com driver for the keithley 2410, and there exist only for IVI-C, but i need to write a program in visual c# in order to control the 2410, doing some research i read that i can use the ivi-C driver using a wrapper class, but that is generated in labwindows, which i don't have.

 

So i kindly request someone who can provide me with such wrapper class and (if possible) an example of use, i would really appreciate your help.

 

Thanks.

Watlow F4 GPIB USB HS communication problem

$
0
0

Hello,

 

I am trying to communicate with the Watlow F4 controller on a Tenney Enviornmental Chamber. The only port available is a GPIB port. I successfully installed the GPIB-USB-HS cable and I can see that device under MAX devices and interfaces. However, no instrument is found when scanning for instruments at defaults GPIB interface settings. I have also downloaded the Watlow F4 VI drivers and try to run from there. I got an Error-1073807346 occurred at VISA open in Watlow F4.lvlib:Initialize.vi-> Watlow F4 System set up.vi

 

I am using Labview 8.5.1 with 488.2, VISA, DAQmx installed.

 

Please see attached pictures for details. Any suggestions would be greatly appreciated.

 

Regards

 

Fliu

 

Viewing all 5661 articles
Browse latest View live


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