LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CPU efficiency: formula node or Labview generic operations?

Hello,
 
 ihave a big program which requires to calculate a lot of analog ramps with 10us step size, for a time of about 20sec. it leads to a calculation time wich reaches fast the few seconds!
i use a formula node in which the ramp function is defined. i could use all normal labview operations if the operation appear to be faster.
i have looked at the usual memory allocations, and could not find a big flaw.
attached is my vi.
anybody has a suggestion?
 
 
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 1 of 4
(3,273 Views)

You should probably look at your data structures. Seems very inefficient. You have huge arrays of clusters where nothing much changes except one value.

Maybe you could use a single cluster where "voltout" and "timeout" are arrays instead?

This way you don't need to duplicate all these other values for no reason and also avoid all thes bundling operation in the loop.

(The difference between wires and formula nodes is probably minor compared to your use of complicated data structures).

Message Edited by altenbach on 04-28-2007 12:52 PM

Message 2 of 4
(3,271 Views)

thanks for your answer.

my hardware is a 16bit DtoA that i built with an address. in this vi i just create the analog value, which is later translated into a 16bit Dig out.

the cluster contains all my necessary info on the specific channel, however you are right that during this ramp creation, i should use only a part of this info. however my problem is that during the send out time, there are a lot of other elements sents at times intervalled with these ramp output. therefore i need to keep trac of the time position of each step, as well as its channel.

also, i have looked at a sol where i do not rearrange into a cluster, and the time saving is minimal. will  still try new ideas in this direction.

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 4
(3,263 Views)

Thanks Altenbach,

you are totally right about my time consuming clusters.

but since i carry those clusters between a lot of subvis, i will have to reconsider my whole policy, and dismantle them at the very begining of the operation, just after getting them from front panel.

i am therefore thinking of the inverse solution, using a cluster of arrays. would it be much faster, or should i keep my arrays separated and think of a way to keep them sized equal trougouth the operations?

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 4 of 4
(3,242 Views)