LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I build an "icon menu of favorites"?,

1.- How can I generate an "icon menu" for the Block Diagram with my favorite components,
     say, one that includes "numeric indicators", "string indicators" and some "constants" of different types?

2.- When I put an indicator in the Block Diagram I always get it in his "icon form".
      How can I change this preset option so when I change a constant to an indicator I get it in its "not icon form"?

3.- I get trouble with saving different Vi's that use the same subVI's. How should I save different versions
     so that the changes of the subVI's don't affect them all simultaneously?

0 Kudos
Message 1 of 10
(3,832 Views)
1:
In LabVIEW 8.x if you right click on a pinned palette there's a 'Add to favorite's' option
OR in Tools->Advanced->Edit palette set

2: Tools-> Options->Block Diagram-> Place front panel terminals as icons

3: You have one resource file.
If you want different behaviour you should use different VIs. To accomplish that you should do  a save as when you have one of the main VIs open.

Good luck,

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!
0 Kudos
Message 2 of 10
(3,828 Views)
Thank you Ton for your quick and precise reply.

1.- I forgot to say that I use version 7.1, your answer is an argument for upgrading to 8.x!
    How is the compatibility from 8.x down to the older 7.1, do you can say something about that?

2.- Problem solved, I'm happy.

3.- I have done it for one level down the hierarchy, the problem is that there are too many subVI's and hierarchies.
    I wished some kind of automatism for the complete set of VI's. During the development the implemented procedure is annoying .

May be you also are so kind to comment the following. The integer arithmetic is implemented in a different way as in all programming
languages I know. As an example we have 5/2 is rounded to  3. In order to get the usual result one has to use floor(5/2). In my opinion,
this is a source of errors when porting programs written in other programming languages.

Kind regards, 

Erich





0 Kudos
Message 3 of 10
(3,788 Views)

You might wish to check out the VI I posted here. It gets around some of the issues with the palettes.

The most recent version is in reply 31, but you can read the rest of the thread as well. I'm getting closer to completing a proper version.

Additionally, you can change the palette view to dynamic and then edit the palettes using one of the options in the Tools>>Advanced menu. Note that if you want to edit the built-in palettes, you need to rename the readonly.txt file found in LabVIEW\Menus\Dynamic (or whatever your view is called).


@EWR wrote:

May be you also are so kind to comment the following. The integer arithmetic is implemented in a different way as in all programming
languages I know. As an example we have 5/2 is rounded to  3. In order to get the usual result one has to use floor(5/2). In my opinion,
this is a source of errors when porting programs written in other programming languages.

I'm not sure what you mean by this. LabVIEW complies with the IEEE 754 standard and should round 2.5 to 2, not 3. Can you post an example for what you mean?


___________________
Try to take over the world!
0 Kudos
Message 4 of 10
(3,781 Views)


@EWR wrote:
1.- How can I generate an "icon menu" for the Block Diagram with my favorite components,
say, one that includes "numeric indicators", "string indicators" and some "constants" of different types?

2.- When I put an indicator in the Block Diagram I always get it in his "icon form".
How can I change this preset option so when I change a constant to an indicator I get it in its "not icon form"?

3.- I get trouble with saving different Vi's that use the same subVI's. How should I save different versions
so that the changes of the subVI's don't affect them all simultaneously?




Hi tst,--- thank you for your comments. I include an example for the "integer rounding". The other topics will take me some time to check. The VI plays with the order of the operations to get the result for 7*5/2 that should be rounded accordint to my knowledge to 17.--- The results with LabVIEW 7.1, also using the Formula Node, are in several cases 18 and in one case 20.--- Kind regards,--- Erich--- PD. I have now the problem that I can not format my answer as I wanted to, the reply box does not allow me to insert my message, I had to use the HTML option. This costed me a lot of time. What can be the reason?--- The attachment is not included?
0 Kudos
Message 5 of 10
(3,737 Views)

I don't currently have access to 7.1, so I can't look at the code. If you use File>>Save With Options>>Save For Previous and save it to 7.0, I can look at it.

Generally, the standard says that by default, you should round a number ending in 5 to the nearest even integer, so 17.5 should be rounded to 18.  I'm not sure how you got the 20.

LabVIEW has a Round to -INF primitive which will always round down. I assume that the formula node has a similar function.

As for the attachment, the forum has a bug where if you preview your post, the attachment is lost.


___________________
Try to take over the world!
0 Kudos
Message 6 of 10
(3,731 Views)
I have included a file saved as you proposed. Also I have include a screenshoot that must
by readable in any case.---

As far as I know, the IEEE standard 754-1985 (http://en.wikipedia.org/wiki/IEEE_754) rules
the floating point number representation, not that of the integers. The rounding definition
you mention holds for floating point numbers!---

In my experience in over 30 years with several programming languages, I newer have seen the
rounding of positive rational numbers to the higher integer. The first exception was
about two weeks ago when porting an algortihm written in C to the LabVIEW environment.
It was hard to find out the reason for the different behaviour of the algorithm, I was
really astonished! Using the function "floor" I could correct the problem.---

Thanks for hint about the "bug" in the forum WEB related to the attachments. To the strange
behaviour, about blocking the insertion of text, have you some hint?---

Kind regards,---

Erich---
Download All
0 Kudos
Message 7 of 10
(3,705 Views)
D is definitly a bug.

You should send your code to your local NI contact together with all the relevant info (OS, processor, LabVIEW version)

I've never used the math-script/formula nodes so I can't say anything about them, but the answer you get is just plain silly

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!
0 Kudos
Message 8 of 10
(3,681 Views)

This seems fine to me.

The first problem is that your indicator labels are different from the variables they display, which is a bit confusion.

The second thing is the point about rounding integers. I'm not aware of any algorithms for rounding integers, but I have no real experience with other languages. I take that other languages automatically truncate the fractional part?

Even so, you wouldn't get 17, because when you do this (int E=7/2;) you would get 3, which multiplied by 5 is 15. I would only agree with Ton's assesment that this is a bug if we accept that LV must truncate.

In any case, the formula node doesn't appear to have an official explanation. It says that it has a syntax similar to C, but it doesn't say it's ANSI C compliant. If you postulate that the formula node converts fractional integers to floats, the behavior here is completely consistent, and the only thing which might be considered buggy is that it works differently from other languages.


To the strange  behaviour, about blocking the insertion of text, have you some hint?---

I didn't really understand what you described. You might wish to start a thread here with some more details about it.

___________________
Try to take over the world!
0 Kudos
Message 9 of 10
(3,672 Views)


@tst wrote:

This seems fine to me.

The first problem is that your indicator labels are different from the variables they display, which is a bit confusion.



A bit confusing?

It seriously got me thinking LabVIEW had a bug in it's numerical part. few.

No d (or e to be precise should be 20)
This is your calculation:
7/2=3.5
round(3.5)=4
4*5=20

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!
0 Kudos
Message 10 of 10
(3,489 Views)