Search the Community
Showing results for tags 'string'.
-
combo box Indexing combo Box for both value and String
Mahbod Morshedi posted a topic in LabVIEW General
Hi All, I'm new to LabVIEW and overall programming. I wanted to use a combo box to extract the string and associated value to use later for calculation and presentation. I have come up with this one below, which works fine and is very modular (I can just add the solvent info, and it is good to go with no other change, unlike implementation as case structure). However, I wanted to know if this is good or is there a better (more straightforward) way to achieve the same thing? Cheers, Mahbod -
I need to use 5 Bytes Hex string as a key, Hex string as a Value. Normally data stored in INI as ASCII. What can be the possibilities to store HEX String?
-
I've got a 3rd party DLL I call from within my application. One of the functions returns a pointer to a variable length null terminated string. I use the mysterious GetValueByPointer.xnode to dereference the string and return it's value. This works great from within the Labview development environment. I'm using 2013Sp1. But when I compile the application into an executable, the xnode returns an error 7. It appears the DLL is returning a valid pointer, but the xnode can't dereference it. My hunch is that the pointer is crossing some kind of protected boundary, but I don't know for sure. I suppose I could write a wrapper around the DLL call, but I really don't want to have to do that if there is a simple workaround. Any ideas?
- 10 replies
-
Good morning, I have a DLL I created (in Labview) that takes in string information, does some magic crunching on it to create a password that is passed out as a string. This DLL will be called from CVI and probably from a C# application. This should be so simple, however I cannot figure out how to pass the string in and get the modified string out of my DLL. I've had no luck at all getting this DLL to work by trying many different things. It crashes LV, returns and error, or simply passes nothing out during my trials. I've included the project (its small) in zipped format. Can one of you kind souls take a look at my code and tell me what I'm doing wrong, or what I need to do correctly to both, configure the DLL and then call it from LabVIEW? Thank you! Randy Password Generator.7z
-
Hello, I need a little help. I want to send from LabVIEW to Arduino via serial port the string for example "ABC" and so on. The problem is that when I send the string from LabVIEW .......the Arduino do nothing. Sometimes shows some kind of sign. When I send the string via Visual Studio it works perfectly. Is there someone who can help me. I attached picture of vi and Arduino code Thank you very much. Arduino code.txt
- 6 replies
-
- 1
-
- serial port
- labview
-
(and 2 more)
Tagged with:
-
As far as I now there is 2 way to define how to format a numeric into a string using the floating point representation (%f): - Setting the number of significant digits (%_2f) - Setting the number of digits or precision (%.2f) However I often find myself in the need of a way to define the width of the string. For example I always want 3 digits maximum. Using significant digits won't work if the number is 0.0012 since this only has 2 significant digits, so the string will be 0.0012 even though I would like to see 0.00 (so 0 if we hide trailing zeros). On the other hand, using digits of precision won't work if I have a number like 123.45 since it has 2 digits of precision, so the string will be 123.45 even though I would like to see 123. Now the obvious brutal way would be to use a string subset and only keep the first 3 digits (I guarantee that my number is never bigger than 999). But I really hope there is a more elegant way. I can't imagine that nobody has run into this requirement before. How did you tackle it?
-
I am able to read HEX file into Labview using read from Text file..I am getting data into labview in terms of string. Problem => Now i want to load this HEX file into microcontroller using VISA-rs232 .Is it require to further conversion or i can load HEX file(in form of string) directly into microcontroller ? rs232.vi
- 5 replies
-
- hex
- controller
-
(and 3 more)
Tagged with:
-
This OpenG Review is active. Community, This VI was in the Candidates folder for the String Package. It has been sitting in there for a while therefore, I have just gone ahead and posted as is (so the license will be migrated on confirmation from the author etc...). What are you thoughts on this VI? Would you like to see such a function in OpenG? Can you optimize the code? It may be better suited in e.g. Comparison Package? Should it be rejected? Kind regards Jonathon Green OpenG Developer Is a GUID.vi TEST - Is a GUID.vi Code is in LabVIEW 2009
-
Hello guys! Is it possible to parse and evaluate a boolean expression stored in a string with standard LV VIs? I can't find anything.. Expression like this one: 1==2 && (2!=5 || 2 > 5) I'm building a configuration xml-file with if-attributes for conditions: <item name="xyz" if="{namespace:variable} == 3" /> The first step is replacing the variables within {} with actual values. This is the easy part. The hard part is to evaluate the results...
- 3 replies
-
- expression
- string
-
(and 2 more)
Tagged with:
-
I am very pleased to announce the release of the OpenG String Library 4.1.0.12 package as the features were driven by the LAVA community. This package will be available for download through VIPM in a few days. Thanks to Ed Dickens for helping to review changes. And thank you to everyone who participated in the online discussions. Changelog: [MOD] 3303663 - Format Variant Into String__ogtk.vi doesn't handle Timestamp [MOD] 3292424 - Update Trim Whitespace with Fast Trim [FIX] 3275381 - "Slice String__ogtk.vi" has Input or RHS of Connector Pane [FIX] 1958939 - "Scan Variant from String" missing description [MOD] 3275249 - Update OpenG Comment [FIX] 3386135 - OpenG Comment not Merge VI in palette [MOD] 1914597 - Format Variant Into String missing DAQ, DAQmx, and VISA type [MOD] 921506 - "Format Variant Into String" should accept RefNums [NEW] 3419755 - Create new String To Character Array VI Below are some of the changes in detail. New, Faster Trim Whitespace Code This was the first community review that integrated Shaun R's Fast Trim code which was further optimized by Darin K. The VI is ~7x faster than the native implementation! New String To Character Array VI Wouter proposed this new VI which splits a string into an array where each element is a character. The code was optimised by Fab and Darin K. Slice String Connector Pane Fixed The connector pane for Slice String no longer has an input on the right hand side. The original VI was deprecated. I64, U64, VISA, DAQ, Timestamp Support Added to Format Variant to String and Scan Variant From String One of the more requested features is that the Timestamp datatype is now supported in these VIs. ISO 8601 was proposed by Phillip as the default timestamp format however, you can specify any %T type formatting. Thanks to Mellroth with helping out with the format code. Once you have installed the new package, download this snippet to test for yourself: Kind regards Jonathon Green OpenG Manager
-
This OpenG Review is now closed. This review relates to this thread here regarding support for the Timestamp datatype in the Format to String VI (among others). With the release of OpenG LabVIEW Data Library 4.1.0.16 it is now possible to parse Waveform and Refnum datatypes correctly (read about the original ideas here) e.g: Waveform (Timestamp) Refnum (VI Server) Therefore this review deals with how to modify the Format to String VI and subsequently its complementary VI Scan Variant From String to support Timestamps. Currently the Format To String VI is in the process of being modified to support: U64 and I64 DAQ Refnums Waveforms (example only - to be discussed here in review) Ideally we would like the same functionality mirrored in Scan Variant From String where possible: However the issue is that is seems that a Timestamp which has been formatted to a string can only be scanned back using the format specifier %T and must have been formatted using the Format to String and not the Format Date/Time primitive. But the Format Data/Time primitive is a more readable string and might be preferred i.e. to format a Timestamp to a string with no intention of converting it back. Therefore the main question is: How would you prefer to see this integrated? What formats should be supported? Should multiple formats be supported so the user can choose which, acknowledging some will not be able to be converted back? To aid this discussion attached is a code stub (if it helps) to get you started if you want to post code. Kind Regards Jonathon Green OpenG Manager
-
This OpenG Review is now closed. See Summary Post here. Please start a new thread to discuss new changes to this VI. Community, This is the integration of ShaunR's Fast Trim to OpenG's Trim Whitespace function. Please review the code and submit all comments below. On testing PC the new Trim Whitespace VI is >3x faster than the native version and ~5x faster than current OpenG version. Aside from the algorithm change the VI is now a subroutine (like natvie version). The new interface supports an additional argument Remove non-printable characters (False), see BD for further comments. Kind regards Jonathon Green OpenG Developer Trim Whitespace (String) 1.vi TEST - Trim Whitespace (Performance).vi TEST - Trim Whitespace 1.vi
-
This OpenG Review is now closed. See Summary Post here. Please start a new thread to discuss new changes to this VI. Please PM me if there are any issues with this thread. VI Name: String to char array Total VIs: 1 Description: This VI creates a array of characters of a string. It splits a string every character. Note: Maybe there should be added another input with which you can tell that the string needs to be splitted every 2/3/4... chars instead of every char. This can easily be done by using the counter in the for loop together with modular arithmetic and a case structure. Blockdiagram: Code: String to Char Array.zip What are you thoughts on this VI? Would you like to see such a function in OpenG? Can you optimize the code? In which package should it be included? Should it be rejected?