From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peut-on avoir une case sur la face-avant pour écrire des formules

Bonjour,

 

 

    J'aimerais savoir si cela est possible d'avoir une case où l'on peut écrire une formule dans l'interface avant comme on fait dans le programmation avec l'icone express (menu genre calculatrice). Nous aurons à changer de formules régulièrement et je me vois mal de dire au client de venir me voir à toute les fois qu'il voudra essayer d'autres paramètres. 

 

Merci

0 Kudos
Message 1 of 8
(2,810 Views)

Translation: I'd like to know if it is possible to put a control on the interface where one can enter a formula, as with the Express VI Formula.  We will need to change formulas regularly, and it will be hard for me to tell my client to come see me every time that he would like to change parameters.

 

There are some VIs in the Mathematics->Scripts and Formula palette that may help you, if you have at least the Full version of LabVIEW (these VIs aren't in the Base version).  In particular look at the Formula Parsing, and 1D & 2D Evaluation palettes

0 Kudos
Message 2 of 8
(2,809 Views)

Merci pour l'information, cela fait exactement ce que je veux.

 

Thank you for the information, it does exactly what I want.

 


Marc

0 Kudos
Message 3 of 8
(2,796 Views)

Dans ces VIs, est-il possible d'y intégrer des fonctions d'instruction conditionnelle. ''SI'' ou ''IF''par exemple. Si x=0 ;cond 1;sinon cond 2;

 

Si oui, quel est l'orthographe à respecter. 

0 Kudos
Message 4 of 8
(2,777 Views)

Non, ce n'est pas possible.  La liste complete des fonctions disponibles se trouve dans la section "Formula Node and Expression Node Functions."

0 Kudos
Message 5 of 8
(2,764 Views)

Bonjour,

 

En utilizant le "Formula Node" tu peut intégrer des fonctions d'instruction conditionnelle. (regard le snippet ci-joint).

 

If_else_condition.png

Sev K.
Senior Systems R&D Engineer | Wireless | CLA
National Instruments
0 Kudos
Message 6 of 8
(2,754 Views)

L'inconvenient est que je ne peux pas utiliser le formula node en ''commande''. Car je fais le programme pour quelqu'un qui fait de la recherche et il doit modifier et tester différentes formules, donc il dois être capable de modifier lui même ses formules sans aller dans l'interface de programmation.

0 Kudos
Message 7 of 8
(2,743 Views)

You might consider using a case structure with a different case for each different formula script node. You could make the input to the case structure be a enumerated control.

Creating an Enumerated Type Control
Use enumerated type controls to give users a list of items from which to select. An enumerated type control, or enum, is similar to a text or menu ring control in that both contain lists of strings through which you can cycle. However, the data type of an enumerated type control includes information about the numeric values and the string labels in the control. The data type of a ring control is numeric.

Note You cannot allow the user to enter undefined values in enumerated type controls, and you cannot assign specific numeric values to items in enumerated type controls. If you need this functionality, use a ring control.

You can use an enumerated type control to select the cases of a Case structure.

The numeric representation of the enumerated type control is 8-, 16-, or 32-bit unsigned integer. Right-click the enumerated type control and select Representation from the shortcut menu to change the representation of the control.

 

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(2,736 Views)