XP Style NI-VISA Control

I'm upgrading a bunch of old 7.0 utility programs that use the Classic control palette.  Most of these involve some sort of RS-232 based I/O, and used the old-style serial I/O functions.  I've been upgrading them to use VISA, and noticed that there is no System version of the VISA I/O control.
I searched the forums, and didn't find any examples or solutions for an 'XP' style VISA control.  The UIs I've upgraded looked sort of goofy with all of the controls as System and a Modern style VISA selector, so I tinkered around a bit and created a custom version of the NI-VISA control.
Maybe there is a way to do this natively, but I couldn't find it
See attached (LabVIEW 8.6.1f1)
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness
Attachments:
XP Style VISA Control.ctl ‏6 KB

Philip, could you add these to the UI Interest Group?
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • Crash in VISA control - LV 8.20

    Here is a crash when manipulating a VISA control in a cluster. This crashes LV 8.0.1 and LV 8.20 on Mac OS X (I haven't tested other OSs). Open the attached control "Error OxfordAddress.ctl". Control click (right click) on the VISA control at the bottom and change the VISA class from GPIB to INSTR. LV crashes and quits. Not good!
    The work arond is to delete the VISA control and insert a new one. But LV should not crash and possibly lose work. Being reported here for inclusion in the monthly bug list.
    Attachments:
    Error OxfordAddress.ctl ‏7 KB

    Kalin,
    Thanks. My job is to be able to get you guys to reproduce it!! I always figure if you can reproduce it you can fix it! It is not always true and I have a few long standing bugs that are "too hard" to fix. But if I can get a reproducible simple example it is MUCH easier.
    Thanks again for following up on this.
    Cheers,
    -Scott

  • Error in ni visa control out for usb in labview 2009

    Hi,
    I am using labview 2009 in which i have made a vi which communicates with a pic controller through USB interface.
    the vi is working fine in labview 8.6. I tried it in two PCs. but when i run that vi in a PC with labview 2009 then the VISA CONTROL OUT.vi gives error "0xBFFF003E : Could not perform operation because of i o error.". while the control in.vi works fine in both the labview versions and any other PC that i tried.
    I have run the application in total of 4 PCs with same set of cards/interfaces. two of them having labview 8.6 are running fine and giving no error but other two with labview 2009 are giving error.
    and it doesn't stop here.... i searched in the vi and did some experiment and found that when i give Request value input to control out.vi as "0x36 "(as required by my PIC program) then it is giving error but when i give other value such as " 0x35 or 34 or 55"(used for other purpose) then it is not giving error.
    Can it be a PIC programming problem? (i dont think so as everything is fine in other PC with LV 8.6)
    I have already explored the ni forum for this error solution but could not find helpful.
    Can anyone solve my problem?

    I installed labview 8.6 in that machine and made a small program with only 3 vis (visa open session, visa close session and visa usb control out.vi) which is working in LV 8.6 platform.
    Sorry the above statement is not correct actually.
    When i run the program in LV 8.6 it giving that same error but this time it is not displayed as pop up window. so i could not judge that error was still there.

  • Visa Control grayed out when executable used with Run-time Engine

    When I run an executable on a machine with only the Run-time Engine the Visa Control for Com Ports is grayed out. I'm guessing that I am missing a library, but do not know which one.

    You need to install the VISA run-time. If you are just using VISA for serial communication, then there is an option on the app builder (Installer Settings>Advanced) for Serial Port Support. This will add a much smaller version of the VISA run-time engine to the installer you create. If you are using GPIB, etc., you have to install the hardware driver (i.e. NI-GPIB) and the full VISA run-time engine.

  • LabVIEW crashes when trying to use VISA controls

    When I try and place VISA controls onto the front panel or a constant into the block diagram LabVIEW crashes and says that LabVIEW.exe caused an error and that LabVIEW must be restarted. Is there some setup required in order to use VISA or is there something wrong with LabVIEW?

    I saw something that sounded exactly like this myself on two PC that where running some kind of "Eveidence Eleminator" software that got its hooks into everything.
    I never did get it running on those two machines.
    I saw something similar when trying to access a serial port that was hanging off of a USB gizmo.
    We downloaded the latest and greatest version of the driver for the USB to serail device
    and
    upadted NI-VISA to the latest and greatest.
    Then everything worked.
    It was just like you mentioned, LV looks fine right up until you drop a VISA control.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • USB device name not shown in VISA control

    Dear All,
    I'm trying to control a lighting controller unit which used as a configurable power supply for a LED light panel.
    The model is TMS Lite TMS-LC-15-4CH-A1.
    It is not a popular device i guess so it doesn't have a labview driver like Agilent, GwInSTEK etc.
    As usual i install the usb driver and demo software then i'm able to control the device using demo software.
    Then i open my labview 2012 and select a VISA open, i created a VISA control and i expect the device ID to be shown for me to select. (Just like what i usually do for most of the agilent devices).
    However this time it does not shown.
    I'm stuck and i really hope someone can help.
    Thanks!!!

    Is it possible that the demo software you got to work isn't releasing the COM port resource?  Have you tried rebooting the computer, and then looking in MAX and the VISA control for the COM port?  Doing this after running the demo software may prevent it from being found if the demo software doesn't release the resource.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • VISA control putting devices into remote mode

    So, I drop a VISA control on my fp. What I think is happening is when it populates, it is sending an *IDN? command to all the devices in the measurement and automation explorer. The problem with this is, some of the devices are in local mode, but if they detect something coming in over GPIB, they automatically switch to remote. I haven't tested it, but I have replaced the VISA control with a string control whos proper GPIB value is set from an INI file. I'm assuming this will solve the problem.
    However, is it possible to have the VISA control on the fp and populate without it sending these devices into remote mode?
    Message Edited by for(imstuck) on 05-18-2010 11:48 AM
    CLA, LabVIEW Versions 2010-2013

    Ravens Fan wrote:
    I don't understand what you mean by "So, I drop a VISA control on my fp. What I think is happening is when it populates, it is sending an *IDN? command to all the devices in the measurement and automation explorer".
    I don't know of any reason why that should happen.  Try running NI-SPY or Portmon before doing this and see if you can capture a *IDN? command going out when it shouldn't be.
    K, I'll do that. I guess what I assumed is when it (VISA ctl) populated its self, it went out and tried to find what instruments were actually there in order to know what to put in the VISA control drop down (i.e. GPIB0::1::INST,GPIB0::2::INST, etc). I assumed it may be doing this with an *IDN? command. I'll run the capture and see what's happening. For some reason when I start my program up, it's clearly sending other devices into remote mode by sending them something over GPIB that I'm not controlling. I know this because if I highlight execution, my code is in the idle state when these devices somehow get switched.
    Hopefully NI-Spy will show me something.
    CLA, LabVIEW Versions 2010-2013

  • How do I copy the style from one control to another?

    I need to programmatically copy the style from one graph to another. I'm currently using the importstyle and export style functions but I'd like to avoid that since: 1) I'm creating >100 of the same graphs in a scrolling window and execution time is a concern, and 2) it makes it harder to redistribute the application, and 3) you shouldn't have to import/export from disk just to copy a graph style.
    I noticed the copy constructor was disabled so you can't just create a new one from the original. I suppose I could iterate through all the styles and transfer them from the master graph to all the copies but is there an easier way to do that? If not, is there some sample code for that?
    I'm using MStudio 7.0 for C
    ++.
    Thanks,
    -Bob

    One way that you could do this would be to create a helper method that configures your graph rather than configuring it at design-time, then use that helper method to apply the settings to the new graphs that you create. However, this would only work if you wanted all graphs to be configured exactly the same way - this would not work if the settings of your master graph are changing at run-time and you want the new graphs to be configured with the current settings of the master graph.
    Another approach is to query each control for IPersistPropertyBag, create an IPropertyBag, pass the IPropertyBag to the master graph's IPersistPropertyBag:ave, then pass the IPropertyBag to the new graph's IPersistPropertyBag::Load implementation. I'm not aware of any implementations of IPropertyBag that are readily available for use in applications, so the tricky part is creating the IPropertyBag. Below is a very simple implementation of IPropertyBag that should be enough to get the job done for this example. First, add this to your stdafx.h:
    #include <atlbase.h>
    CComModule _Module;
    #include <atlcom.h>
    #include <atlcoll.h>
    Here's the simple IPropertyBag implementation:
    class ATL_NO_VTABLE CSimplePropertyBag :
    public CComObjectRootEx<CComSingleThreadModel>,
    public IPropertyBag
    private:
    CAtlMap<CComBSTR, CComVariant> m_propertyMap;
    public:
    BEGIN_COM_MAP(CSimplePropertyBag)
    COM_INTERFACE_ENTRY(IPropertyBag)
    END_COM_MAP()
    STDMETHODIMP Read(LPCOLESTR pszPropName, VARIANT* pVar, IErrorLog* pErrorLog)
    HRESULT hr = E_FAIL;
    if ((pszPropName == NULL) || (pVar == NULL))
    hr = E_POINTER;
    else
    if (SUCCEEDED(::VariantClear(pVar)))
    CComBSTR key = pszPropName;
    CComVariant value;
    if (!m_propertyMap.Lookup(key, value))
    hr = E_INVALIDARG;
    else
    if (SUCCEEDED(::VariantCopy(pVar, &value)))
    hr = S_OK;
    return hr;
    STDMETHODIMP Write(LPCOLESTR pszPropName, VARIANT* pVar)
    HRESULT hr = E_FAIL;
    if ((pszPropName == NULL) || (pVar == NULL))
    hr = E_POINTER;
    else
    m_propertyMap.SetAt(pszPropName, *pVar);
    hr = S_OK;
    return hr;
    Once you have a way to create an implementation of IPropertyBag, you can use IPropertyBag and IPersistPropertyBag to copy the settings from one control to another like this:
    void CopyGraphStyle(CNiGraph& source, CNiGraph& target)
    LPUNKNOWN pSourceUnknown = source.GetControlUnknown();
    LPUNKNOWN pTargetUnknown = target.GetControlUnknown();
    if ((pSourceUnknown != NULL) && (pTargetUnknown != NULL))
    CComQIPtr<IPersistPropertyBag> pSourcePersist(pSourceUnknown);
    CComQIPtr<IPersistPropertyBag> pTargetPersist(pTargetUnknown);
    if ((pSourcePersist != NULL) && (pTargetPersist != NULL))
    CComObject<CSimplePropertyBag>* pPropertyBag = 0;
    CComObject<CSimplePropertyBag>::CreateInstance(&pPropertyBag);
    if (pPropertyBag != NULL)
    CComQIPtr<IPropertyBag> spPropertyBag(pPropertyBag);
    if (spPropertyBag != NULL)
    if (SUCCEEDED(pSourcePersist->Save(spPropertyBag, FALSE, TRUE)))
    pTargetPersist->Load(spPropertyBag, NULL);
    (Note that "CreateInstan ce" above should be CreateInstance - a space gets added for some unknown reason after I click Submit.)
    Then you can use this CopyGraphStyle method to copy the settings of the master graph to the new graph. Hope this helps.
    - Elton

  • Usb visa control bulk in error

    i am trying to send data from my pic18f4550 programed using flowcode to the pc on labview using the usbrawbulk control example but i am unable to send or recieve the data the error i keep getting is the timeout error
    i am using proteus virtual usb simulator and i have generated the .inf driver file from visa driver wizard
    1)how can i get the brequest and brequesttype hex values to send and recieve data for the pic18f4550
    2)how can i use the labview visa read and write to communicate and fix the current error
    and thank you  
    Attachments:
    visaprob.jpg ‏616 KB

    Hi,
    I am not sure I can provide exact infomormation, but I recoomend you to read about here:
    - brequest and brequesttype: http://www.beyondlogic.org/usbnutshell/usb6.shtml
    You can find examples about LabVIEW USB Raw communication:
    - http://zone.ni.com/devzone/cda/tut/p/id/4478
    - http://zone.ni.com/devzone/cda/epd/p/id/3637
    - http://zone.ni.com/devzone/cda/epd/p/id/3622
    - https://decibel.ni.com/content/docs/DOC-2022
    - http://zone.ni.com/reference/en-XX/help/371361G-01/lvvisaprop/usb_raw/
    I hope you can find useful information there.
    Best Regards,
    Peter Vago
    AE Hungary

  • Visa control of an executable running on the host PC

    I write executables for my customer using LabVIEW.  My customers often use other programming environments, such as Visual BASIC or C.  They also control instruments remotely using the VISA layer.  They are comfortable with the concepts of sending commands to instruments using VISA. I have a request from a customer to also be able to control my executable using the VISA layer.  They would treat my executable as if it were another instrument.  They would manually launch the executable on their PC.  Then they want to address it from their programming environment (maybe Visual BASIC, or C, or Matlab) using the TCPIP::localhost::instr address and send commands to my executable program.  In my executable I would monitor for these commands, and then respond to them as needed. My question is, is there an easy way to do this?  A simple example would help me tremendously.  The example I am looking for would be a LabVIEW executable that would monitor the "address" TCPIP::localhost::instr for a *IDN? command.  An outside test program would send this command to the VISA address TCPIP::localhost::instr.  When the executable receives the command, it would reply with "Hello."  If I can get this far, then I can use this model to implement the commands that are required to control the executable. Thank you for any help.   

    Thanks for the response.
    Yes, making my executable "look like" a VXI PnP instrument is exactly what I want to do...
    If I have to program this from scratch, I agree that this is a tall order.  But I was hoping that NI already implimented what I need...
    Certainly, they have the portion that allows me to send commands to an instrument and read responses from an instrument using VISA.  My question is if there is a way to use the same VISA read routine in my executable to monitor and wait for a command to come from somewhere else, and when the command comes in, can I then respond to it using the VISA write routine?
    I am assuming that this is not possible, but maybe I am wrong? 
    If it is not possible, perhaps someone has done something similar that I can use, such as the TCP read and write, which I have never used before.
    My end goal is to provide my customer with a well known and easy way to send the commands to my executable.  (By using a VISA write.)  This way I know that they already have the capability in their existing programs, and they will be able to do this will little effort from their side. 
    So it would be ok for me to use a TCP read (or any other approach) in my executable as long as it can intercept the VISA write that was sent from my customer's program (which is not written in LabVIEW). 
    Asked from another ponit of view altogether, is there a way to impliment the equivilent of NI-Spy in a LabVIEW executable.  This would at least allow me to monitor all VISA traffic, and I can scan the traffic for commands that are intended for my executable.  That would solve 1/2 of the problem, and would be a start. 
    Thanks again for the response.

  • How to apply style to netui control using JS?

    I need to change background of netui textbox on error input.
    Code (JS) for regular HTML control is:
    field.className = field.className.addClass("error");
    However, it doesn't work for netui controls.
    Any ideas?

    Hi,
    If you are using NetUI Text form fields like textbox, you should also assign tagId to these filed to make is accessible from JavaScript
    example:
    <netui:form action="test" tagId="frm" >
    <netui:textBox dataSource="{actionForm.Name}" styleClass="texta" tagId="textbox" />
    </netui:form>
    Then you can refer this field in JavaScript as follows
    document[netui_names.frm][netui_names.textbox].className="textError"
    In these way you can manipulate your NetUI Tags.
    Cheers,
    Tejas Joshi :-D

  • Create Operating Concern vis-a-vis Controlling Area

    Hi Experts,
    I have a defined a Controlling Area, but NOT an Operating Concern.
    How will this affect my CO postings?  Can I use CO without Operating Concern? 
    What is the best practice?
    Thanks!

    As you have not created an operating concern you will not be able to get Profitability Analysis (COPA)
    However it is not likely to affect your controlling in any other way
    If not required then there is no need to create any operating concern.
    Regds
    WDC

  • DSD Visit Control Geo Coordinates

    Hello,
    I'm trying to find a way to manually enter geo coordinates in the Additional Data-DSD tab of the customer master.
    The program which calculates the coordinates are not accurate enough and business users want the ability to manually maintain that data directly on the customer master screens.
    Can anyone help me how I can achieve that?
    Thanks,
    Metehan.

    Hi,
    You can create it with the BADI's 'CUSTOMER_ADD_DATA' and 'CUSTOMER_ADD_DATA_CS'.
    Regards,
    Eduardo

  • Working with Agilent 54XX VIs, want to change control style

    I'm writing a master control VI for an Agilent 54624A oscilloscope that uses a USB/GPIB connection, using the VI libraries that LabVIEW has.  When I create a control for one of the VIs by right-clicking on an input terminal, the master VI drops down one of the ugly-as-sin Classic controls.  I tried setting the default control style in my VI through File>>VI Properties, tried the same thing on the Agilent VIs, and I tried using the Replace option in the right-click menu (but it only replaces it with an empty control.  I found this VI that kinda works, but it changes everything in my VI, not just the Classic controls, which leaves me right where I started with the controls I don't want changed.  Is there a way to directly edit the style of a control, without losing the properties (for example, change a Classic Enum to a System Enum and keep all of its Items)?

    Right click Replace shouldn't cause you to lose the elements in your enum.
    To solve your problem in the future for new controls created by right click Create on the subVI's, go to the Agilent VI library.  Edit each of the VI's there to replace the controls and indicators with the style you want.  Controls and indicators are inserted with the style of whatever VI they are being created from no matter what your default settings are for new controls.  (It is more like a copy of the subVI's control rather than creating a new control.)  Fix the subVI's, and you won't have problems in the future.

  • Has anyone had troubles with VISA(GPIB) control and using USB?

    I am having trouble controlling a GPIB machine using VISA controls. I am using a USB GPIB cable and the software. But I get errors when I try to use the Intstrument drivers (ex HP4194A) VISA control. If I change to GPIB commands it works fine. Am I calling the unit wrong? Not sure how to get it to work.

    I tried that and I get the following error
    in NI spy Status 0xBFFF00A6
    error out -1073807194
    with IDN? I don't get the equipment info, but get some hex code.
    Attachments:
    visa_test.vi ‏20 KB

Maybe you are looking for

  • File Info Panel to hit web service to fill out XMP data

    Hi there, Is there any way to use the File Info panel inside Indesign (for example) to hit a web service based info entered in a few fields which will return data to fill out the rest of the xmp data? Or would you have to write some sort of plugin to

  • How can I get the OS short date format?

    I want to get the format of OS computer in java. somthing that return to me: yyyy/MM/dd or MM/dd/yyyy og dd/MM/yyyy Thanks and have a nice weekend!

  • "program has stopped working" outlook sync issue

    I have an 8320 (t-mobile) v4.5.0.81 Desktop Manager W/media v4.6 Every time I try to sync with my work Outlook calendar it appears to run ok until the very end then I get the "program has stopped workiing" message (yes I'm on vista) This just started

  • Why won't Garage band let you open more than one project a time..

    Why won't Garageband let you open more than one project a time???? If thats the way its is set up...that is really lame. Even the worst audio programs allow you to run a few projects at a time. I recorded a gig the other night... then I dumped the wh

  • Maps for India should be split by state

    India Maps are 100MB - and most people do not need all of these. I Request Nokia to split them by state and make them available accordingly