VISA Labview 8 variant
Labview 8 runing on windows xp Pro
crashes with this error message
when trying to convert variant value of VISA resource name to string.
see attached example VI
This VI was working great in Labview 7.0
Attachments:
Windows xp Error.JPG 7 KB
Test VISA Variant to String Bug.vi 9 KB
This has been reported to R&D (# 3WKDUGV2) for further investigation. A
possible workaround is to use the Type Cast VI instead of Variant to Data. Thanks for the feedback!
Jarrod S.
National Instruments
Similar Messages
-
ActiveX variant to LabVIEW variant
Hi Ppl,
I'm reading ActiveX data from an application(TestStand) in LabVIEW. The data I get is of the type ActiveX Variant. When I use variant to data node I'm able to convert the data to the corresponding data type. Howevere in my application the data type varies dynamically and I cannot use the variant to data node.
I will have to flatten it to string. But the flatten to string node does not work with ActiveX variants. It only works with LabVIEW variant types. So is there any way that i could convert ActiveX variant types to LabVIEW variant. I tried the to variant node too. I too does not convert it as expected.
Thanks,
Sathish
Here is how both the variant types differ
Activex variant (boolean):
'': OLE Variant
Variant Type -> VT_BOOLValue -> FALSE
LabVIEW variant(boolean):
'Boolean': boolean (TRUE or FALSE)
FALSEHi lordsathish,
Unfortunately, there is no way in LabVIEW to access type data for OLE/ActiveX variant data. However, you can obtain information about the datatype of a TestStand PropertyObject using the ValueType method:
myObject.Type.ValueType
This will return the data type (see the ValueType help entry for more details). you can then use the specific type methods (getValBoolean, etc) to extract data. In the case that you have an array, you can use the ArrayDimensions and ElementType to extract the data from the array. In the case of a container, the contained items will be considered propertyObjects, so you can use the getNumSubProperties and getPropertyObject methods to access the contained items.
Refer to the PropertyObjectType reference help for details on these methods
I hope this clarifies!
Al B.
Staff Software Engineer - TestStand
CTA/CLD -
Using unstructured TS data and labview variants
I want to create a generic step to pass data from TS to LabVIEW but I'm pulling my hair. Why can't I use a Variant input on a VI to accept unstructured data fro TS? Is this possible? How can I flatten TS data into a LabVIEW Variant? In LV when you need to pass an unknown data type between a VI boundry, you use a variant. In TS you can do the same with an unstructured container. Is there anyway to pass unknown data between the two platforms? Actually correction: A variant output from a VI actually will show up on the TS side if you use an unstructured container but doesn't work the other way around.
I think the TS developers should get together with the LV developers over at NI and actually sit down over a few beers and talk. No I mean really talk. WTF?
Michael Aivaliotis
VI Shots LLCIt seems that there is a limitation that I've come across. When the variant data is passed through the results data of a step it becomes invalid. I've modified the original code you submitted and was able to reproduce my problem. When you run the attached code, you will see a type mismatch error. Also, if you break it and look at the results variant data it does not contain the structure.
Using LV8.5 and TS 4.0.1
Message Edited by Michael Aivaliotis on 02-11-2008 02:12 AM
Michael Aivaliotis
VI Shots LLC
Attachments:
LV Variant2.zip 27 KB
2.png 21 KB -
LabVIEW Variant Attributes get lost in TestStand?
Hello,
Example code attached.
I'm using a LabVIEW variant as a lookup table by using the attributes (see here: https://decibel.ni.com/content/docs/DOC-25371 (and others)). It works well. When I attempt to pass this variant from one TestStand step to another, I lose the attributes of the variant. I've made a small example to demonstrate this. Am I doing something wrong? Why does the variant retain the value, but not the attributes? Should I store this as another type in TestStand? In the documentation for LabVIEW types in TestStand, it is claimed that a Variant in LabVIEW maps to "Anything" in TestStand. When I tried to use a Boolean, however, I got an error and was instructed to use a Container. Does that container need to have some specific suptype to retain the attributes? Or does it have nothing to do with that?
Thanks in advance
Hey GarryG,
Here is an excerpt from the NI Product Support Engineer's response on this issue:
"Unfortunately, this is a known limitation with LabVIEW variants in TestStand. When LabVIEW variant data is returned to TestStand from a LabVIEW code module, the data overwrites the property. TestStand does not have a mechanism to "fit" the returned variant data to the TestStand type, so unfortunately you will need to either remap the data to the type, or use a cluster rather than a variant."
Essentially, it appears that variant data can not be guaranteed to work properly in TestStand. In order to ensure you have your data passed from your Code Modules correctly, I would recommended following the Product Support Engineer's advice of remapping or clustering the data. If this is not possible, the Flatten Variant to String.vi could be an alternative to try. I was able to confirm that this has not been fixed with TestStand 2014 either.
Typecasting LabVIEW Variants in TestStand Forum Post:
http://forums.ni.com/t5/NI-TestStand/typecasting-Labview-variant-in-Teststand/td-p/2160452/page/2
I hope this helps! -
Is it possible for visa/labview to become confused?
I have an application that uses visa serial comms to read quartzdyne sensors from a Qlink module. Two sensors are used. Each sensor measures both P and T. After approx 30 mins of operation it was noted/logged that Sensor A’s value reverts to sensor B’s labiew indicator, and sensors B’s values reverts to A’s indicators in labview. Like labview has becomes confused and swapped them over!
It reverted when labview was momentarily unable to read sensors A; the value was displayed in labview as ‘0’. I can live with a momentary loss, however i cant live with the values swapping over like that.
Is this something anyone has came across before?The delay is not the most reliable way to handle such situations.
Does the messages sent from the devices have some identifier?
Or you could read a specific number of characters, or up until a message seperator.
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! -
Mac Standalone LabVIEW App - Include Visa & LabvIEW Run-time
Hello All,
I've used LabVIEW for over a decade but only for Windows, just getting into LabVIEW for mac, so please pardon any ignorant questions.
I am developing a very simple project to be deployed stand-alone that needs LV Run-time and NI Visa. My project uses a simple USB-Serial device that I talk to using Visa. I used this link to package LabVIEW run-time with my app. I think I need to package NI Visa drivers as well. I am not sure how to do that. Anybody have any experience packaging drivers with stand alone apps for LabVIEW in mac? Thanks for your help.
Kudos always welcome for helpful posts
Solved!
Go to Solution.Thanks, Silvia. This is a limitation and there are more and more developers on Mac OS. Can you provide answers for couple questions:
Any plans to include Installer App like how we have for Windows OS?
If [1] is not anytime soon, can NI provide a KB to deploy a stand-alone Mac app packaging drivers? I think this will be very valuable.
Kudos always welcome for helpful posts -
Convert VIs LabVIEW 2012 to LabVIEW 2009
Hi all,
Need help to convert VIs attached below (LabVIEW 2012) to LabVIEW 2009.
Thank you very much
Attachments:
EMG Analysis.vi 1670 KBYou didn't enclude the sub.vis and these issues are usually addressed on the version conversion board (see the floating link at the top on the board) but here is your vi. Broken since it is missing depanancies
Jeff
Attachments:
EMG Analysis.vi 842 KB -
PCI Register level access, VISA, LabVIEW
Hi have a problem with LabVIEW VISA access to a custom board. Was advise to cross post to this forum in the hope that someone may be able to help.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=300474
Thanks in Advance
Craig
LabVIEW 2012Hi Rich,
I am familiar with VIC. I have managed to get a Handle to the device in MAX and am able to read some of the configuration registers in both LabVIEW with VISA low level peek and poke and in VIC. Im afraid my problem lies more in my limited knowledge of the PCI Register mappings. From What i have read, i think i need to know wehre my FPGA Base address resides. This Base address is in either the BAR0 or BAR1 registers within the PCI Configuration registers (Which i have access to). From playing around i think i have found that i have to do something along the lines of the following.
-Map the PCI Configuration register
-Read BAR0 and BAR1, find out which one is the FPGA.
-Unmap the PCI Register.
-Map appropriate BAR0 or BAR1 address's
I Think this will enable me to have access to the FPGA registers starting at Base address 0x0 from there on in.
Thanks for having a look though, I will also point towards this thread from the DDK forum and hopefully get some more information on this.
Thanks again
Craig
LabVIEW 2012 -
Hello,
I was looking for some help with this. I have had issues in the past with placing arrays into an ActiveX Variant and found that ActiveX variants are not the same as LabView variants. I am tring to place a 0 or a 2 into Property input which is variant type. At this moment, it does not work. My guess is that the activex variant isn't handling the input well. I may be wrong, but my intuition say this is my issue. Does anyone have a way to deal with this? Here is NI's response to the issue.
Thank You for your responses.
-=-=-=-=
Hi Chuck,
I was able to talk to R&D and it looks like there is not necessarily a
simple or new way to handle ActiveX Variant data in LabVIEW. From a previous
issue I found, the engineer had worked with R&D and said:
"Use the 'Database Variant to Data' VI instead of the 'Variant to Data' VI
While the name may be misleading, the Database Variant datatype is the same
datatype as the ActiveX Variant. The native LabVIEW Variant is different from
the ActiveX and Database Variant datatypes."
The customer in that case had a few issues using this VI, though, so it may
also not help your implementation either; there also is not a "Data to
Database Variant" function that I am aware of. Furthermore, I understand
that this VI is the same direction of dataflow as RolfK's example. As far as
the "Data to ActiveX Variant" implementation, R&D said that it
would have to be implemented the same way that Rolf has made his VIs. The
R&D engineers referenced the following example, which is also linked by
"lvb" in the LAVA forum post:
NI Community: Dereferencing Pointers from C/C++ DLLs in LabVIEW
https://decibel.ni.com/content/docs/DOC-9091
Finally, I did find a post in the LabVIEW idea exchange, which I believe was
started by "lvb" on the LAVA forum you found. If you are not familiar
with the Idea Exchange, it is where LabVIEW users can propose and
"Kudos" (or vote) for ideas that they wish would be implemented in
LabVIEW. While this does not guarantee that a feature will be in a future
version of LabVIEW, it does more effectively put it on NI R&D's radar.
LabVIEW Idea Exchange: Support OLE Variant or ActiveX Variant Type Access
http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Support-OLE-Variant-or-ActiveX-Variant-Type-Access/idi...
Attachments:
GM FLIR A320 ImageGrab AE.jpg 16 KBappears it is okay to wire directly like that. I found examples with I16 wired straight to property input. Must be the resister I am writing to isn't work like it should.
-
After installing LaBVIEW 2011 and NI-VISA 5.1.2 on a CentOS 6.2 PC, I had noticed a problem with trying to use the VISA vi's in LabVIEW, basically it's not working for me, LabVIEW crashed when trying to create a control or constant for the VISA Open vi. Tried to launch the VISA tools, they all start and then close abruptly. NI I/O Trace only shows one line.
I did read though many threads and decided to collect the NI system.log, which is attached. (system.log.gz). I did notice a strange message in here about nivisaserver:
/usr/bin/tail --lines=25 /var/log/messages:
May 22 11:18:48 localhost abrtd: Package 'nivisaserver' isn't signed with proper key
May 22 11:18:48 localhost abrtd: Corrupted or bad dump /var/spool/abrt/ccpp-2012-05-22-11:18:48-3258 (res:2), deleting
Thanks!
Solved!
Go to Solution.
Attachments:
system.log.gz 621 KBMountainMan12 wrote:
After installing LaBVIEW 2011 and NI-VISA 5.1.2 on a CentOS 6.2 PC, I had noticed a problem with trying to use the VISA vi's in LabVIEW, basically it's not working for me, LabVIEW crashed when trying to create a control or constant for the VISA Open vi. Tried to launch the VISA tools, they all start and then close abruptly. NI I/O Trace only shows one line.
I did read though many threads and decided to collect the NI system.log, which is attached. (system.log.gz). I did notice a strange message in here about nivisaserver:
/usr/bin/tail --lines=25 /var/log/messages:
May 22 11:18:48 localhost abrtd: Package 'nivisaserver' isn't signed with proper key
May 22 11:18:48 localhost abrtd: Corrupted or bad dump /var/spool/abrt/ccpp-2012-05-22-11:18:48-3258 (res:2), deleting
Hi MountainMan,
Thanks for attaching the system report log -- I believe I have a solution for you :-) Let's look at a few of the lines:
890: /proc/meminfo:
891: MemTotal: 3894712 kB
1726: /proc/iomem:
1784: 100000000-12dffffff : System RAM
1807: /bin/dmesg:
1820: BIOS-provided physical RAM map: 2576: [nipal] More than 4GB of addressable memory detected.
1838: BIOS-e820: 0000000100000000 - 000000012e000000 (usable)
2576: [nipal] More than 4GB of addressable memory detected.
2577: [nipal] This configuration is not supported. Check the release notes for more information.
Starting at the bottom at lines 2576..2577, dmesg had more than just the NI-VISA server signing notification. At system boot, the NI kernel modules refused to load because they detected more than 4 GB of addressable memory. But, if you look towards the top at lines 890..891, meminfo says you have less than 4 GB of system memory, which makes it seem like the NI modules don't know what they're talking about. However, if you look at the report from iomem a little further down on lines 1726..1784, system RAM has been re-mapped above the 4 GB boundary. While your system doesn't have more than 4 GB of RAM, some of its memory has addresses above 4 GB, which the NI modules cannot use and so they refuse to load. How did that happen? Your system BIOS provided a physical RAM map with usable addresses above the threshold (line 1838).
The fix here is simple -- you need to tell the kernel to reserve addresses above 4 GB [1] so that it won't remap the RAM to higher memory. Once all of the RAM has addresses below the 4 GB threshold, the modules should load and VISA/LabVIEW/et al should stop misbehaving.
It seems to me that LabVIEW is not handling this situation very gracefully, and maybe you can work with Kira to file a bug report.
[1] Re: Successful SUSE linux and DAQmx install; nilsdev and other utilities missing.
http://forums.ni.com/t5/Multifunction-DAQ/Successful-SUSE-linux-and-DAQmx-install-nilsdev-and-other/...
Joe Friedchicken
NI VirtualBench Application Software
Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
Senior Software Engineer :: Multifunction Instruments Applications Group
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008) -
Example VI attached.
I aquire an image from a fingerprint reader, extract the template (digital way of uniquely identifying people), and save the template to disk. Later, I acquire a new image, extract the template, and use the appropriate ActiveX method to compare the template against the stored version. The template is OLE Variant, which cannot be stored to binary file. If I store the Variant as an array of U8's instead, I am able to retrieve the U8's from the file, and convert to LabVIEW Variant. The ActiveX method compares correctly, but sluggishly. Any way to convert back to OLE Variant?
Thank you,
Jason
Certified LabVIEW Architect
Wait for Flag / Set Flag
Separate Views from Implementation for Strict Type Defs
Attachments:
Retrive Stored Fingerprints & Identify Current.vi 30 KBI'd like to focus on saving and retrieving OLE Variant data. The methods used to compare fingerprints (i.e. IdentifyPrepare and Identify in my example) work properly and rely on other settings (threshold and rotation tolerance), so I'd rather not architect my own. (Thank you for your comment, Mike).
Anyone ever successfully "type casted" back to OLE Variant?
Thanks!
Jason
Certified LabVIEW Architect
Wait for Flag / Set Flag
Separate Views from Implementation for Strict Type Defs -
LV2009 hooks for customizing override VIs and accessor VIs
In LV2009, if you use LabVIEW Object-Oriented Programming, you may wish to customize the VIs that are created for New>>VI For Override and New>>VI For Data Member Access. Using scripting, you can do so by editing the four VIs listed below. These VIs are called at the end
of their respective scripting processes and you are free to include any
scripting code you wish to further customize the VI in question. Some
common customizations you might want include changing the VI name (use
"get" and "set" instead of "read" and "write"), modifying the icon,
adding additional diagram logic, etc. You cannot edit the callers of
these three VIs, but these three provide the hook you need to
customize your new VIs as you want them.
Customizations for Override VIs:
<labview>\resource\Framework\Providers\LVClassLibrary\NewAccessors\OverrideRetooler\Custom
User Scripting For New Override VI.vi
Customizations for basic accessor VIs:
<labview>:\resource\Framework\Providers\LVClassLibrary\NewAccessors\BaseAccessorScripter\Custom
User Scripting For New Simple Accessor VI.vi
Customizations for 1D Array element accessor VIs:
<labview>resource\Framework\Providers\LVClassLibrary\NewAccessors\ArrayElementScripter\Custom
User Scripting For New Array Element Accessor VI.vi
Customizations for multi-dim array element accessor VIs:
<labview>\resource\Framework\Providers\LVClassLibrary\NewAccessors\MultiDimArrElemScripter\Custom
User Scripting For New MultiDim Array Element Accessor VI.viOooh, I finally smell a reasonable by-ref implementation coming - the lack of this option always annoyed me and now I should hopefully be able to easily build the code which will generate the wrapper needed for the by-ref stuff.
Try to take over the world! -
Variant Input Parameters with ActiveX Objects
I've created an ActiveX library that exports a variety of objects using Visual C++ Version 6.0. I'm testing the methods and properties of these objects using both LabVIEW and Visual Basic clients. The problem I'm facing is that when testing under LabVIEW, I can't access methods that expect a VARIANT input parameter. The declaration in C++ of one object's such method looks like this:
void CChassis::Configure (VARIANT config, int rate);
I can create the ActiveX object with both LabVIEW and Visual Basic. I can invoke methods that do not use VARIANT input parameters using both as well; but, when I create a second ActiveX Object (a CConfiguration) and use the LabVIEW Variant operator, my attempt to invoke Configure fails with a "No Such Interface (E_NOINTERFACE)" error. The invocation fails identically if I wire the CConfiguration directly to the Variant input, as well. If I instead create a constant VARIANT as an input parameter, my Configure method gets called, although the method recognizes that I passed an invalid object.
Using Visual Basic I can invoke the Configure method without problems while encapsulating a CConfiguration object within a Variant.
So my question is, have I found a LabVIEW error, or is my approach flawed? If my approach is flawed, where have I gone wrong? Thanks in advance! I'm using LabVIEW version 7.0.Hi,
Have you tried to put in plain data or an object reference into your variant parameter?
I think plain data should work... for object references i don't know.
Some time ago, i also coded a small activex library, where i passed object references by parameters in delphi. I did not use variant parameters, but the real interfacedeclaration types (like IMyObject**). This worked fine. I also uses "dual" interfaces for the objects, which get passed by parameter. But i don't really know if this is helpfull for vb.
Finally, you can also use a workaround:
For each of your Objects, that you want to use from LabView and which you want to pass by a parameter, you
insert an new Property "int32 Object_Handle".
When an Object gets created, it ask a "ObjectHandleManager" (gets written by you) to get an own unique Object_Handle which it stores into its property "Object_Handle".
The ObjectHandleManager generates an new Object Handle and memorizes the Handle assoziated with the calling object's reference.
Now, at each time, when you want to pass a object reference to a library function of your self, you can pass the Object_handle as an integer value. In the called function, you can ask your ObjectHandleManager for the real ObjectReference.
But thats not a very comfortable workaround. -
Bonjour,
Je cherche à connaître la version de développement de LabVIEW utilisée pour la création d'un exécutable que l'on m'a envoyé.
Comment faire?
Cette information est-elle disponible dans les VIs LabVIEW ou dans l'exécutable ainsi créé?
Merci,
JeremyBonjour,
Merci d’avoir posté votre question sur les forums de National Instruments.
Pour déterminer simplement la version de LabVIEW utilisée pour créer votre exécutable, vous pouvez vous reporter au document Web ci-dessous :
“Determining the Version of an Executable Built with LabVIEW”: http://digital.ni.com/public.nsf/allkb/935BA7FB426305398625711E0055F1FA?OpenDocument
Vous verrez notamment que, selon votre version de LabVIEW, la méthode à utiliser est différente.
J’espère que cela vous aidera dans la résolution de votre problème.
Bien cordialement,
Guillaume H.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> NIDays 2011, le mardi 8 février au CNIT de Paris La Défense -
We have a need for the programming of a SCADA system using Labview for our laboratory. We are located in the East Bay area of California. Succesful applicants will need to be able to attend in house meetings as required.
Please email resumes to [email protected]
Thank you.This position has reopened. In addition to the above requirements, we are now looking for a contractor experienced with DICOM and porting older VIs (LabVIEW 6.0) to a version of LabVIEW compatible with Windows 7. Please e-mail your resume and portfolio to [email protected] to apply.
Maybe you are looking for
-
E-Quake add-on not working properly after Firefox update
Question E-Quake no longer shows the mag and location at the bottom right corner of my page...Firefox just updated itself a week ago to 9.0.1.... ...I think it still shakes the page though, but is not showing the info...
-
Custom Report Query - Patches install on specific computer AND date installed
I'm looking to create a 2 custom reports that show installed. I have a similar report already but it shows patches needing to be installed. Devices in a collection with columns for total number security patches installed (I'll break them out further
-
How to copy data from one planning area to other planning area
Hi , I need to copy data from one planning area to other planning area, the MPOS for two planning areas are differant and here my scenario is one planning area having extra key figures. First i need to release forecast data to CIP planning area and
-
[SOLVED] systemd/user interface not working
I cannot use user service files, because systemctl gives me this error: $ systemctl --user status Failed to get D-Bus connection: No such file or directory It's been a while since I used a user service file, so I don't know when it started exactly. H
-
Instant client 11_2 odbc error on windows 32
Hi Folks, I have downloaded instant client 11_2 for windows and added files for basic, sqlplus and odbc to new folder C:|Oracle\InstantClient I have added this folder to PATH environment variable I have added tnsnames.ora file to this folder I have r