SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing individual items in All Elements in Formula step

I'm using a Tone Extraction step to analyze two analog inputs. I need to multiply the amplitude of each input by the difference in phase between them. In a Formula step, I can select "detected amplitude -> All Elements". Can I then access the individual elements as if they were members of an array? Or do I need to make each detected amplitude a separate input variable?
0 Kudos
Message 1 of 5
(6,764 Views)

What do you mean by Formula Step. Is this a formula node or a formula function? The easiest way to determine if its coming out as an array or not would be to press Control + H and put your mouse over the output. The help box should show you what is physically coming out of the formula "step" . If it is an array then you will be able to access it as if it were an array.

 

Regards,

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 2 of 5
(6,752 Views)

Andrew_E. wrote:

What do you mean by Formula Step. Is this a formula node or a formula function?


 

 Hi, Andrew. Thanks for the reply. SignalExpress calls it a Step and I'm trying to stay consistent with SE's nomenclature.

 

Pressing Ctrl-H doesn't do anything. Are you thinking of LabVIEW instead of SignalExpress? I've attached a screenshot of what I'm talking about.

0 Kudos
Message 3 of 5
(6,749 Views)

Hi SStve,

 

You were right. I made the mistake of thinking you were in labVIEW. I guess i am confused by when you say

 

 "Can I then access the individual elements as if they were members of an array? Or do I need to make each detected amplitude a separate input variable? "

 

I am looking at the formula node and you can put up to 4 signals into it and manipulate those signals, but you get only one processed data result. Could you clarify what you mean by "access the individual elements"?  How are you accessing the elements? From the Function node? Are these elements, elements of the signal that you are sending to the formula node? Or are you talking about the processed data from the formula node?

National Instruments
RIO Embedded Hardware PSE

CompactRIO Developers Guide
0 Kudos
Message 4 of 5
(6,742 Views)

I think I've figured it out. If I select All Elements and use that in a formula, it applies the same calculation to each element. Using that with subgroups I've accomplished my task.

 

I'm measuring voltage and current across eight piezo drivers. Voltage is on the even-numbered inputs and current on the odd-numbered inputs. I'm using Tone Extraction to get the frequency, amplitude and phase for each input. Using subgroups, I have one Tone Extraction step for voltages and another for currents. Then I can use a single Formula step to make calculations on all eight drivers by selecting All Elements from each of the two Tone Extraction outputs.

Message Edited by SSteve on 09-17-2008 05:33 PM
Message Edited by SSteve on 09-17-2008 05:33 PM
0 Kudos
Message 5 of 5
(6,739 Views)