LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

polymorphic terminal cannot accept this data type: ASIN

Hello everyone, 

 

I have an accelerometer which gives the voltage value with respect to vibration and etc in x and y. I used a loop to convert the voltage value based on the sensitivity of my sensor to g (works fine).

 

However, now I am trying to scale the accelerations from -1 to 1 and then change them to angles using Angle=ASIN(x) and Angle=ASIN(y), and I get an error saying polymorphic terminal cannot accept this data type. 

 

Is this something to do with the g value exceeding 1 (and -1)? or this has something to do with the data type. 

 

Also, if I want to scale my readings, should I scale it before the loop starts or there is a way to do it in the loop?

Download All
0 Kudos
Message 1 of 5
(3,842 Views)

The ASIN does not accept a waveform.  Use the In Place Element Structure to get the Y component, do the scaling, and write back to the Y.  That portion will also need to be in a FOR loop since you have an array of waveforms.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,827 Views)

Hi crossrulz,

 

Thank you for your reply - I'm replying on behalf of the OP. 

 

I have modified the circuit to include the In Place Element Structure. I have a problem with the wiring - different types of terminals seem to be wired together. It was understood that the output from "Analog 1D Wfm NChan NSamp", after going through the numerical functions, should output a waveform. However, LabVIEW doesn't think so and refuses to wire the circuit, as attached. Any idea on how we should rewire this? Do we have to convert the input before inputting into the In Place Element Structure?

 

Cheers,

traindoor

0 Kudos
Message 3 of 5
(3,776 Views)

If you read the last sentence of my previous post, you will find your answer: Use a FOR loop with autoindexing tunnels.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(3,763 Views)

The DAQmx function returns an array of waveforms - one for each channel. If you want to operate on each channel, you need to use a for loop as crossrulz suggested.

 

2016-02-15_11-50-24.png


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 5 of 5
(3,758 Views)