04-23-2014 07:54 AM
Hei, I tried to understand how the remove zeros posts work but it just isn't working for me so i cleaned up the vi.
Can someone show me how to remove them from the arrays in my vi?
Thanks alot!
04-23-2014 08:23 AM
That might make you look at the help file again
04-23-2014 08:26 AM - edited 04-23-2014 08:29 AM
Hi Nunu,
good advice:
- go through LabVIEW basics as offered by NI on their website!
- learn to THINK DATAFLOW!
This is your VI after removing the most RubeGoldberg and using the AutoCleanup tool:
And this is how it should look like:
After learning to use shift registers you may simplify this snippet to use only one case structure…
@Jeff:
The OP apparently uses an older LabVIEW version without those fancy output tunnel options…
04-23-2014 08:28 AM - edited 04-23-2014 08:32 AM
This snippet will remove 0's from an array. You must have Labview 2012 or higher to use conditional tunnels.
Edit: remove the unnecessary NOT.
04-23-2014 08:35 AM
Hi nunu.
In your case structures, you are using the "Use default if unwired" in the False case. So, that means that when your number is not greater than zero, you are outputting the default value for the data types, which is zero. Hence, you are getting a lot of zeroes in your result.
Try to use the build in conditional terminal and wire in you boolean value from your "Greater than" function.
Note: You should always try to keep your dataflow from left to right. In your example VI, the dataflow is in every direction....
04-23-2014 08:36 AM
Hehe, 4 answers in short time
This proves how helpfull this community really is!
04-23-2014 08:44 AM
@GerdW wrote:
The OP apparently uses an older LabVIEW version without those fancy output tunnel options…
Missed the vi.property source version again! (Of course the FP.Colors<> should have reminded me to check) The back save + Ctrl+U looks like this:
and fully de-rubed to a LabVIEW 2010 style:
(Got to watch out for those boolen case structures)
04-23-2014 08:50 AM
04-23-2014 09:00 AM
@GerdW wrote:
Hi Jeff,
Of course the FP.Colors<> should have reminded me to check
For me it was the missing connector pane in the FP window…
Honestly, I never even looked at the FP
I usually drop uploaded vis on a blank vi BD (in case they run when opened) and Ctrl+double-click. You miss those little clues that way.
04-25-2014 05:42 AM
Thank you very much guys, one of the given solutions did suit my case and everything works smoothly atm. sadly,some of the given solution didn't work for me,coz the version of my program is outdated,but thanks anyway.