LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert string to float

Solved!
Go to solution

@muks wrote:
"Decimal string to array"

NOT decimal string to array.  The name is misleading.  By "decimal" NI means "base10" just like Hexadecimal means "base16."  In other words, a base10 integer.  The proper node to use is "Fractional String to Decimal" as described in another many previous posts.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 16
(2,197 Views)

Well my objective is to make a program that controls  a wind tunnel rpm's and regulates those by some standard velocities that i must input. The final objective of the program is to calibrate wind sensors( anemometers).i gonna give u some detailed information:

 

-The program must adquire the zero values for pressure inside the tunel and outside, 2 temperature,2 humidity.

-the program must then set to 10 m/s and hold 5 min to get uniformity of wind flux and reduce the errors because of temperature changes.

- I must control the real velocity to the standard one with pitot tubes and if the real value is far from the +-0,15 m/s i must control the tunnel to alter the velocity, and i must do this process everytime that velocity changes.

-after i must verify if the flux is stable by getting 2 samples in 30s and compare if the diference is acceptable.This step must be made everytime the velocity changes.The velocity values are 4,6,8,10,12,14,16,15,13,11,9,7,5 m/s.

-then the calibration of the anemometer starts.

-after that i must w8 for tunnel to stop to 0 m/s and adquire again the zeros of the pressure.

 

well summing up its this. I have basic knowledge of Labview and there are better ways to program for sure. i m using the state machine for this events because people here in this forum said it could be the most suitable architecture for my program.

 

Im sending the VI. If u can give me some advices i would be very gratefull. The program is not complete so some parts of the code are not yet there.

Download All
0 Kudos
Message 12 of 16
(2,176 Views)

I do have some suggestions.

 

Clean up the block diagram.  Having wires going behind things and going backwards is akin to random indents in a text-based language.  Just as random indents would split your brain between generating code and understanding it, so does unruly wiring and odd placement of nodes and subVIs.

 

Be better at dataflow.  You do know more than the average non-LV developer, but there are still subtle things that indicate linear thinking.  For example, all those conversions and re-conversions.  Would it not serve you better to simply branch off at those points instead of using multiple conversions?  And what does comparing the two tick counts to each other do?  Dataflow indicates there are no data dependencies and either one could execute first, rendering the results meaningless.

 

Be careful using express VIs.  They are definitely NOT designed with speed in mind.  Just keep that in the back of your mind every time you decide to use one.

 

All those "islands" of code - do you want them to execute exactly once, because that's exactly what will happen.  And when do you want them to execute?  Before the loop does?  After it does?  At the same time?  I realize a lot of it is just to generate fake data, but the way it is written, there is no data dependency and any of those islands can execute in any order - and the loop is just another island of code.  I guess this kind of relates to point #2.

 

I guess that's it, really.  I might re-think the states themselves, but that's just a preference thing.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 16
(2,150 Views)

well thx for the advices. I really need to clear my coding because some was made to experiment. Regarding the "islands" of code do u think i should try to synchronize some actions? the data aquisition its not complete, i will have to implement alot more.

0 Kudos
Message 14 of 16
(2,141 Views)

@asnaev wrote:

well thx for the advices. I really need to clear my coding because some was made to experiment. Regarding the "islands" of code do u think i should try to synchronize some actions? the data aquisition its not complete, i will have to implement alot more.


I'd say you probably won't have to worry about synchronization if you incorporate the produce/consumer architecture into your code.  The producer will produce data at the rate you want (within the capabilities of the equipment, of course) while the consumer will grab the data as it is needed.

 

The only isssue there is if the producer produces a whole lot faster than the consumer can consume the data.  The queue buffer can get huge in a hurry.  There are various ways around this, depending on what you can and cannot live with.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 15 of 16
(2,134 Views)

gracias, es justamente lo que andaba buscando


@Hummer1
0 Kudos
Message 16 of 16
(1,583 Views)