Jump to content

jpdrolet

Members
  • Posts

    367
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jpdrolet

  1. Here is a trick that, as far as I know, has not been published yet. In exclusivity to LAVA. You can convert to/from any compatible units. Oddly enough, it generates an error when converting to the same unit... EDIT: OK as usual when converting units I get it the wrong way and inverted the converion coefficient. :headbang: So if you have downloaded the VI try this corrected version. Download File:post-447-1140315289.vi
  2. If your application is to update your VIs to use them in LabVIEW Environment, why can't you run these VIs in LabVIEW before using the project? I have not used SCC within LabVIEW recently but maybe you could try to put the application executable in the LabVIEW directory? There it could find the setting where they are expected to be.
  3. In the vi.lib folder, put a VI named lv_init.vi. This VI is called at LabVIEW launch. You can use this VI to launch other executables or any other task.
  4. Use notifiers instead of occurences. There are nodes to create new and destroy them as needed. They work like occurences with data attached.
  5. In LV8, unflatten node outputs the unused portion of the string. That prevents to compute the used string length afterwards. Not a start index and offset past unflatten but it does the job.
  6. These are similar to OpenG's LabVIEW Data Tools library (but do not offer any where near the breadth of functionality of the OpenG library). The vi.lib Variant API will likely be extended to support more variant operations (currently there is not nearly enough functionality in this API to be of much use). And, the Type Descriptor interface will likely be phased out; but not very soon, due to the fact that there are a large number of toolkits and other VIs that use 7.x Type Descriptors. I have flattened a Variant (a numeric) to string to see if the new TD was exposed but it is the 7.1 TD of the numeric that is flattened... The 8.0 TD is kept private, although the help on type descriptor seems more extensive about 7.1 TD so we could fill some gaps in Data Tools...
  7. Yes but that will open the same VIs for all INI files. To open both INI file and project VIs I usually use a shorcut with a specific command line. The file association is not required with this shortcut technique.
  8. Write text in numeric controls: The FormatString property allows to include text in numeric controls. You can set the format to "%f ft" or even "Invalid %f" (if you put enough spaces after the text, the number is hidden. To display percentage without explicit scaling, for example set the format to "%d %%" and the unit string to "cm/m". The controls stays unitless but the displayed number is multiplied by 100 (100cm in 1 meter). Each of my projects has its own labview.ini file. I've created different file extensions for each LabVIEW version (.lv7ini, .lv71ini,...) so that when I double click on the ini file the right version of LabVIEW is opened for the project. The action associated with the ini file is <labview version dir>\labview.exe -pref "%l"
  9. I can't imagine a most convenient way to rename a wire than to use a wire of the right type. Otherwise you'll have to enter names for every member of the structure and need something like a tree or tree menu to provide them. I don't bother at all to use a typed control to provide type to a wire. I just add a comment "For type only" and the job is done.
  10. When you open the VI reference, do you set the option mask 0x01? From the Help: 0x01 Record modifications. An asterisk (*) appears by the VI title to indicate that changes have been made using VI Server. The VI must be in edit mode for LabVIEW to record the modifications. If the change you made is still not enough, you could simply rewrite the VI Description property or something like that.
  11. You can use the Type Cast node or the Variant to Data node. Wire your named wire on the type input and the misnamed data on the x/Variant input.
  12. The formula nodes work with real number only and the function sqrt() returns NaN for negative arguments. You should cast A'B'C to complex and use math nodes instead of formula nodes since they handle complex numbers. Otherwise you have to manipulate real and imaginary parts explicitely like this (not checked for correctness): float D; D=B*B-4*A*C; ReE=-b/(2*A); ReF=ReF; if (D>=0) { ReE=ReE+sqrt(D)/(2*A); ReF=ReF-sqrt(D)/(2*A); ImE=0; ImF=0; } else { ImE=sqrt(-D)/(2*A); ImF=-ImE; }
  13. You don't need to rebuild the application to change the decimal setting since it is an application option that is stored in its ini file. The ini key to force the use of the decimal point is: useLocaleDecimalPt=False Set it to True and the application will use the local (swedish) comma. By forcing LabVIEW to use decimal point, that should solve your problem. However, the best solution is to revise your code so that your application is independant of the local setting for the decimal separator. Use the format specifiers "%.;" (use point) "%,;" (use comma) or "%;" (use system) to force the separator when it is needed, for example reading the numeric reply from an instrument or reading a spreadsheet file.
  14. The only thing you could try is to use Variant to Flattened String without wiring the flattened string output. LabVIEW may be smart enough to not generate the data if the output is not wired. That is an interesting piece of information, please post the results.
  15. I confirm. The behavior is correct if you set the type to double. You may also try to use arbitrary scale markers.
  16. You can achieve the same functionality using user events. Create and register a user event to an event structure. Every time you'll invoke Generate User Event (instead of generate occurence) the event node will awake and receive the data. Indeed there could be a mechanism to register an occurence to an event structure but since occurences are rather obsolete and that user events do the job and are more versatile, I don't see the necessity of that feature.
  17. Try to set the string to "limit to single line". When that is set the string will lose focus and its value updated when receiving \n (or maybe also\r)
  18. I don't know about LV8 yet but the old SCC stored its settings in the default directory so all projects were sharing SCC settings/repository if you let the default directory to be the LabVIEW directory. It was better to have each project with its own default directory (usually the project directory)
  19. Well granted, sort of... I realized that when the label colors are set to <anything>/Black, the label background takes the color of the underneath panel. It was by accident, seeing the application run on another machine where some labels had the correct system colors...
  20. Then I change my wish for a "labelled frame" where the frame is not drawn under a transparent label.
  21. Thanks PJM. However, the system tab color seems special in the sliver theme. The color is not uniform, slightly darker in the bottom (see my previous post) so there is no single color one can use to put a label over the decoration. The solution to use a normal 2D tab colored with object/panel color seems to work well but for the sake of uniformity I'll have to change all tabs in my application.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.