Control GPIB SR830 lock-in: read/write problem

Hello

I use Labview 2009 SP1 and Visa drivers to control a function 6221 Keithley generator and a lock-in SR830 amp. Basically my program sets the generator to a certain frequency and amplitude, sets things on the lock-in, asks a few values, then reads the data from the lock-in for a minute or two. It is then repeated on several different frequencies. It works well, but it hangs at random time at time, after doing several frequencies with no problems whatsoever. Today, I discovered the spy tool OR wonder, so I was able to locate the bug! Here is an exit of last orders before the bug (there nothing else after the line 63).

As you can see on line 53 I query frequency lock-in. However the response (5623,46 Hz) comes later, in line 57, which has degraded the program. Following this section of the program, I send some more orders for the lock-in, which are ignored, and then the program enters a while loop which is supposed to acquire a number of data points. It works on infinitely because there is no data to acquire, and that is how I noticed this bug at the start.

So my questions:

(1) why this happens to you, and how can I avoid it? I have also contacted the manufacturer of the SR830, but I have a lot of faith in big people on this forum!

(2) after the line 63, in my program there are several other commands that are supposed to be sent to the lock-in, and then the while loop. Orders are not shipped, but Labview must pass by these to the while loop (which she can't seem to). So what Labview does exactly and how/why does it go through the commands of writing without sending the data?

Thank you!

Hi Albert

I think I have it solved. I use the 'FAST2' mode to transfer data from the lock to the PC. This example uses buffers out of the lock-in to transfer data, IE the same buffer used to pass error messages, or replies to queries.

Between the moment I read the last set of data and stop the transfer of data, the lock-in has the time to write a little more data in its output buffer. This reading of the error mess, but only has a negative effect when the LIA status byte is set to 8 (ie the reference unlock). When this happens, it shifts all the query error responses and the first 'LIAS?"reads the answer to the query"TRE"and 'FREQ?', read the answer to the second query"NE?". Unlock event occurs when the function generator changes its frequency, but can't not every time, which is what made it seem random.

So, this is easily solved by just read everything that is left on the pad before proceeding. Strangely, it works that when it is followed by the 'ABORT' driver, which basically just sends the command "rest." This erases the data buffers, but from my understanding of what is written in the manual, they are not involved in the mode of FAST2.

Tags: NI Hardware

Similar Questions

  • Synchronization with Serial read/write problems. can not get the functionality of the terminal emulator

    Hello

    I am writing a VI to control PWM with a microcontroller via a serial port. I wrote a simple code for the microcontroller that allows me to set the ratio of duty cycle on a scale of 0-65535. It works very well with Termite of Compuphase (RS-232 plug); The microcontroller invited me to an entry, expected that I would one, updates and expected another entry when I decided to send him. Now, I'm trying to get the same functionality on a LabVIEW vi but hit a snag.

    When I tried to send my orders with a series read base and an example of writing, everything worked fine. I could see the prompt entry, write an entry and if I was quick enough, check out the update message. Even when I was not fast enough, I was able to check the update by monitoring the PWM pin with a Logic Analyzer. The problem with the basic example, however, is that I need to update the report to aura cyclical ratio, so I went for an example of reading continues writing. The problem I've met; is that I have to switch between reading and writing to make it work. When I do that, either I don't hold write it down long enough and nothing happens, or I get several updates when I switch to reading. Some of these updates don't even match and produce updates to defective upgrades for example; 16000 16000, 16000, 16000, 6000, 600, 60, 16000, 1600, 60, 0, 0, 0, 16000, 60, 0, 0 etc.

    I tried which allows characters of endpoint in the hope that the writing would end at the end and go to reading where he would receive a termination character and wait for me allow writing once again, but nothing helped. I still have to alternate between the two and either get no response on reading several updates of variable accuracy. I tried to remove her allows read/write and their structures of matter in the hope that the loop flow, associated with the characters of endpoint would the case, but then the updates don't register at all. The funny thing is I did a VI like this before with an Arduino and that there not even no need to switch between writing and reading (I'm now using a Board of Freescale FRDM).

    I was also the frequency of timeout errors; Error-1073807339 at VISA Read, reason Possible: VISA Hex 0xBFFF0015. I removed the option to stop the while loop if there is an error so I can run but always pops up an error on the judgment occasionally. Could the problem of synchronization always cause me problems?

    Would appreciate all advice really, I am providing my slightly modified example screws and can provide the code for microcontroller on request, even if it's very simple.

    Thanks in advance, it is
    Yusif Nurizade

    In other words, frankly, a good bad example you according to your code. Also, you have the order of writing and read upside down in your amendment if the instrument requires a command to return something. It should really be using a structure of the event. The structure of the event around a write and read and use a value change event. I have attached a quick change. This mod is still a reading after writing. If necessary, you may have two separate events to write and read.

  • The control law of read/write FPGA on the loop of the root / the UI thread?

    Hi all

    As the title suggests, the read/write control FPGA, https://zone.ni.com/reference/en-XX/help/371599H-01/lvfpgahost/readwrite_control/, is on the loop of the root / the UI thread?

    Watch, https://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/multitasking_in_labview/, this would indicate as that, but I would get a good response.

    Kind regards

    David

    While I'm not 100% if it acts on the loop of the root / UI thread - calls to the FPGA (e.g. control of read/write operations FIFO) block permanently. I remember having a weird problem in the past where my FPGA operations have been suspended because I was expecting given FIFO elsewhere.

    You should be able to test this easily enough - try to open a file dialog during playback of your FPGA. If playback crashes while the dialog is open, you have a loop of root problem.

  • Control of read/write of FPGA Interface

    I need help on control of FPGA read/write Interface. I would like to connect data TCP Read (String) directly to VI FPGA Read, but the entrance is an FXP... How can I do this?

    Then change your FPGA control to be a byte (U8).  On the side of your host, use the array of strings of bytes, then Index Array to get the specific byte you want to write on the FPGA.

  • How to add more variables to a read/write control?

    See how the read/write control is connected to global variables? I want to add more variables, I created the globals (some are listed in the table above), but as you can see that they are not available in the read/write control. How can I add them? I also tried to create a new read/write control, but as you can see that didn't help.

    Any help would be appreciated.

    Hi count3r5tr1ke,

    It seems that you are referencing a particular bitfile in open FPGA reference. I think that even when you save your FPGA VI, VI real time still referencing an older bitfile. Have you tried re - compile and referring to the new bitfile once finished compiling? A sure way to make sure that you have the most up-to-date bitfile is to check the VI option when you right-click on the FPGA Open reference and select Configure the reference open FPGA. When this option is checked, if you make changes to the FPGA code, it will force you to re - compile the FPGA VI before you reference it on the real-time side.

    Best regards,

  • In the target FPGA read/write control function?

    Hi people,

    I learn a lot from the sample project FPGA, including how you can easily retrieve and set controls and indicators in an FPGA using the read/write control function running in an RT target.

    However, I can't find a way to do something similar in a FPGA target.  I've been down this road before - that is, trying to move the data in/out a looping VI FPGA (void) to a (parent) FPGA VI - where my memory points to reach what I needed use.

    So I was happy to see the palette FPGA enabled me to drop the control functions to read/write on a FPGA vi target.  But alas there where tons of errors (not compatible son for target, etc.) and I guess now it's not possible.

    So, just to be sure, I'm not missing something, is there something like control functions to read/write to use in an FPGA for read/write in an another FPGA (looped)?

    In addition, why would I be able to read/write on a FPGA vi control functions if they are not supported?  (Sorry for the n00b question)

    Thank you

    Steve

    maherhome wrote:

    You're right that I don't have this knot in my palette.  However, I also do not seem to have a Refnum Occurrence in the palette is in the FPGA (see below), but I need to synchronize several loops of FPGA and added research using the textfield in the VI editor (and if compiles and runs).  So 6 months to Labview and I'm fuzzy on how the palette is restricted

    I don't know what you're trying to prove here. There is no control of refnum in search in your image. Occurrences are available in FPGA, and for control of refnum for one you just right click on a function of the instance and create a control. If you can create a valid thread of a certain type of data, then you can create a control or the indicator for it, regardless of the question to know if this type of control or indicator appears in the palettes. However, the functions that you can use in the block diagram are limited by what is available in the palettes.

    maherhome wrote:

    Regarding orders read/write for the FPGA/lights, I'm surprised that the infrastructure developed to allow read/write between RT and FPGA has not mobilized to allow read/write between FPGA and FPGA.  The elements of memory function, but they are less convenient.

    You may have noticed that you cannot compile the individual parts of an FPGA VI and combine them later; This is because when you compile an FPGA VI, all its subVIs are essentially merged to create a single block diagram (with additional logic if one not reentrant Subvi is used in multiple locations, this is why it is not recommended on FPGA). The subVIs no longer exist in the FPGA compiled; reading and writing a control on them would make no sense. If you want similar behavior, use global variables - but understand that global variables store values in FPGA logic resources. Using the elements of memory (or FIFO, which can also store in memory) leaves more fabric available FPGA logic by storing data in resources specially designed for this purpose.

  • Frequency of calls to control for the FPGA read/write

    Hello

    I use a cRIO-9076 with a module NI 9476 DO spend some faucets. It is sometimes necessary for faucets with a pulse time down to a few ms of impulse.

    The FPGA VI Gets the power tap queries, executes a logic of security, and routes the numerical results for the exits. It gets applications power of the VI on RT target that uses the function ' Read/write FPGA control' interaction programming of the FPGA VI front. The loop on the RT runs with 1 kHz, no iteration is missed. That means, it should be possible to switch the valves with a resolution of 1 ms.

    What I see on an oscilloscope, is that the output digital are high for multiples of 50 ms, the system does not reach the valve for example 80 ms pulse or pulses shorter than Ms. 50 is a kind of limitation for calls of "FPGA read/write control"? I tried both options for arbitration, but it does not help.

    The best knowledge of the limiting cRIO/module/features or ideas? Thank you in advance.

    Karsten

    Hi Karsten

    You use any time in your FPGA VI?

    It is useful to your code by sending as an attachment so that I can have a look.

    Kind regards

  • Several problems of reads/writes of Visa

    Hi all.

    I've been using labview VISA to communicate with an I/O device called a µChameleon.

    I need to monitor the status of mutiple pins by sending an entry VISA to query the PIN then use a read VISA to identify the State of the PIN.

    The problem I have is when I use several reads/writes VISA. When I run the present, only one VISA reading returns the corresponding pin State, but everything else show nothing. The funniest is when I use run highlight, they will return all the State of the PIN.

    The photo below shows the basic principle of what im doing by simply copying the base serial number read and write code. For example, I send the string 'State of pin 1' followed by a carriage return and if it works correctly it should return a string Read VISA saying ' pin 1 1 "(top) or" pin 1 0 "(low)." ""

    Can someone help me witht that. Is this a timing problem with the VISA of the readings?


  • Dell XPS 600 read/write DVD problem

    My system is a Dell XPS 600 and has a DVD/ROM drive & a DVD RW. The drive works fine, but the DVD RW will not read/write or recognize a disc is inserted. The original drive failed when running normally with WIN XP. I replaced the drive (w/Lite-on SOHW 1633 s), responsible for all the latest drivers, flashed the firmware of the disc and nForce4, changed discs and cables, from Win XP to WIN 64 bit with the same results. The drive won't work, except when I insert the boot disk WIN XP drivers he will read and open the files as it should. Can you help me?

    Osprey4,

    I think you're right. The new drive is the problem, and I'm going to get another to confirm.

    I changed discs and the RW still does not work.

    Thanks for your help.

    jdm05klm

  • FPGA read/write does not not in cRIO-9073

    Hello.

    I'm stuck with a problem in the use of the FPGA Read/Write control please suggest a solution.

    I use cRIO 9073 and I'm trying to place an order ON / OFF of GUI-> RT-> FPGA host. I use a shared variable of the network to transmit the control GUI form to host RT and I use read/write control to FPGA. I also put a Boolean flag in the FPGA VI to control if the control is transferred to the FPGA.

    When I toggle the button in the GUI, I see the same change in the host of RT (shown as 16 probe in attachment 1). However the FPGA indicator (indicated as probe 19) remains the default false state. The FPGA VI is on attachment 2.

    Thank you

    Guilhem

    Your FPGA only reads the control once before entering the loop.  If you want to read control permanently, you must put it inside the loop.

  • Read/write to csv file

    Hello

    This may be a really stupid and obvious question, but I work with LabVIEW for two days only.  I'm trying to recover data to a .csv file and view it in a front panel.  I was able to do this, but I want to do is retrieve the values, then put these values in a table, and then allow the user to adjust these values, then click on a button and save the file in the same file that the values have been removed from.  I can read the values in a table and display them fine and I am able to take a picture and write new file, but I need a way to be able to use a single table that is displayed on the front panel.  Basically, what I mean is I want to get a snapshot of a .csv file and display it on the front where the user can adjust the numbers from the file and re - write in the .csv file, and close the front panel.  Is there an easy way to do this?  I apologize if this is not clear or it has been answered here before.  Remember, I'm new to all this!

    Thanks in advance.

    If you want that the user is able to change the values, you need to control and not an indicator. The problem has nothing to do with loops. If you change to a control and write in a local variable, everything should work.

  • Write problems block the memory of the host

    Hi all

    I work with a sbRIO 9639 and followed what I thought to be the recommended procedure to write in the block of memory to the host computer via (see diagram attached host and FPGA implementation). However the operation of the aforementioned code does not actually change the memory and what is available is rather just the previous values (which are persistent).

    However, I am able to write to block the memory directly from the vi FPGA (one) and get the results that I would wait if I then run the host after writing the correct values. In fact, I can now see these values from the host using the read/write Protocol.

    Does anyone have an idea on the cause of this problem? I followed the implementation to write and read from the memory in the examples, but have not found any success.

    I can't possibly comment code NIs because I don't know who wrote, why and for what purpose.

    You can write to the control whenever you want, but if you don't actually read it yet (mark) then you're never going to see the new values.

    Polling station should be avoided on the host programs, but it is not inevitable and normal on FPGA.

    Put the entire program within another loop, and then try again.

  • CD / dvd drives will not read / write to any disk

    Hi, can someone help (first timer) I have two cd/dvd drives will read / write to disk get them all is a window pops up asking me to insert the disc. all my drivers are up to date, my Device Manager shows two active drives and works correctly, I use service pack 2 and I have installed a new software/hardware. my computer is a dell XPS 420 that is now three years old and this is the first time that I had any problem that I have not been able to solve. Help!

    Hello

    Its not unusual for the same problem have an impact on both drives, in fact its very common.

    Step 1: Please do all the same underneath if you did some before as is often total
    a process that solves the problem.

    Try this - Panel - Device Manager - CD/DVD - double click on the device - driver tab.
    Click on update drivers (this will probably do nothing) - RIGHT click ON the drive - uninstall.
    RESTART this will refresh the default driver stack. Even if the reader does not appear to continue
    below.

    Then, work your way through these - don't forget the drive might be bad, could be a coward
    cable or slight corrosion on the contacts (usually for a laptop) and other issues.

    Your CD or DVD drive is missing or is not recognized by Windows or other programs
    http://support.microsoft.com/kb/314060 - a Mr Fixit

    Try this fix manually if the Fixit 314060 does not work
    http://www.pchell.com/hardware/cd_drive_error_code_39.shtml

    Your CD or DVD drive is missing or is not recognized by Windows or other programs-
    a Mr Fixit
    http://support.Microsoft.com/kb/982116

    The CD drive or the DVD drive does not work as expected on a computer that you upgraded to
    for Windows Vista
    http://support.Microsoft.com/kb/929461

    When you insert a CD or a DVD, Windows Vista may not recognize the disc
    http://support.Microsoft.com/kb/939052

    Your CD or DVD drive cannot read or write media - A Mr Fixit
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    CD/DVD drive does not appear in Windows Vista, or you receive this error in Windows
    Vista installation after booting from the DVD (AHCI)
    http://support.Microsoft.com/kb/952951
    Drive CD - R or CD - RW Drive is not recognized as a recordable device
    http://support.Microsoft.com/kb/316529/

    Hardware devices not detected or not working - A Mr Fixit
    http://support.Microsoft.com/GP/hardware_device_problems

    Another possibility is that the cables are loose. Remove ALL power, then make sure that the cables in both
    ends. Remove and replace, do not just tight. For laptops, you can often clean power and
    contacts data with a pencil eraser.

    Some DVD players do not use the Windows default drivers so check with the manufacturer of system and
    manufacturer of device to see if there is a firmware or drivers for your drive if necessary.

    ===============================

    Step 2: You have disc problems as the CD/DVD is actually 4 discs in 1 case (CD & DVD
    Burn and CD and DVD read). So it is not unusual for 1 or 2 operational so that other parts
    do it right.

    Did you follow the Troubleshooting Guide for the reader who still does not work? There are
    the entries in registry that the troubleshooter does not solve and those who "might" be the cause.

    Check with your Maker system and a device for the two possible firmware updates and
    the correct registry entries for your car.

    Here are the keys that I of course are those in question - for the subkeys of the CD/DVD drive
    as there will be other subkeys in these keys. Do not forget to ask specific keys involved as well as
    the parameters.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\IDE

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ {4D36E965-E325-11CE-BFC1-08002BE10318}

    -----------------------------------------------------------------------

    You can probably find more info here and maybe even the exact registry for your CD/DVD settings
    drive from someone with the same model.

    Forums - a lot of expert real help
    http://Club.myce.com/

    CD/DVD units
    http://www.myce.com/storage/

    Use DevManView to locate the CD/DVD in the registry (be careful and do a prior Restore Point)
    nothing change) - find the DevManView device and then make a right click on it free in RegEdit.

    DevManView - free - an alternative to the standard Windows Device Manager, which displays all the
    devices and their properties in flat table, instead of the tree viewer
    http://www.NirSoft.NET/utils/device_manager_view.html

    I hope this helps and happy holidays!

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • Cannot access the card reader/writer internal Flash

    After a few updates, I can access is no longer any SD card inserted into the card reader/writer Flash. I tried to use the convenience store but just that said there is no problem found. When I insert the SD card, it appears in the 'control Panel\Hardware and Sound\Devices and printers' as ' Flash Card Reader/Writer "but I am not able to access the card.

    Hi Tim,.

    Was there a card player offered to you via Windows update driver update?

    -You see no drive letter assigned to the flash card while you see for readers in the window 'computer '?

    -What is the error you get when you go to the map?

    I suggest you try to change the drive letter assigned to the card and see if that helps.

    1 type diskmgmt.msc in the RUN prompt or in start search to open the computer management window.

    2. right click on the indicated card device and select "paths of access and change drive letter.

    3. click on change if there is an assigned drive letter, and then change to another letter. If this is not the case, click on add and select a drive letter.

    4 restart the computer so that the changes are applied and see if you are able to access the content in the map.

    For more information: http://windows.microsoft.com/en-in/windows7/change-add-or-remove-a-drive-letter

    Alternatively, you can try to uninstall and reinstall the drivers for the card and see if that makes a difference.

    Visit the website of your computer manufacturer to download and install the latest drivers.

    Let us know the results.

  • DVD recorder is not read/write discs DVD-RAM on Satellite A200-1GH

    Hello!!

    I have the problem as the topic - my DVD drive is not read/write DVD-RAM discs (recorder: HL-DT-ST DVDRAM GSA-T20N). Unfortunately, there is no any drivers (more recent than I've got) for this recorder on the Toshiba, not even site on LG or Microsoft. What should I do?

    Greetings

    Hello

    To be honest, it's quite strange. If the laptop is preinstalled with recovery image, it should work. I tested it on my laptop 5 minutes ago and it works. The DVD-RAM disc is readable and different documents can be saved on the disk too.

    Do you use your own installation of OS, or you still have some factory settings?

Maybe you are looking for

  • Laptop HP Stream: no memory left. only 4 GBs of 32 GB

    Bought this computer this year.  He said 3.75 GB of disc removed 21 GB.  He continues to show little mΘmoire and tune returns constantly with messages saying that I need to transfer some of my files to another disk in order to free more disk space. 

  • Blocking problem down an iMac 21.5 mid 2010

    I have an iMac 21.5 mid 2010, with El Captain 10.11.3. When I try to stop, he stays with the wallpapper in the office without the apps, but he doesn't stop. Can someone help me please?

  • Safari crashes constantly in El Capitan 10.11.3

    Hello My safari blocks continuously after I have updated to El Capitan 10.11.3 yesterday evening. Here are the parts of the error message, can someone help please? Thread 0 crashed: Dispatch queue: com.apple.main - wire 0 libsystem_kernel.dylib 0x000

  • How do I uninstall Satellite L300 - 11 q Vista and install Windows XP

    Hello! Please help: How do I uninstall Windows Vista from my laptop and install Windows XP?Should I do something with discs and seized BIOS, or I can just format C drive and then install XP CD-drive? How can I make a recovery disk before you uninstal

  • Number of the authorisation

    I tried to implement a read-only group that allows some users to connect to privilege level3 and issue several commands, i.e.; See the race. The ACS user group is correct and this is the device configuration lines: AAA authorization config-commands d