LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 inputs and 1 output.

Hi all,

This is my first post.

 

I use an arduino 1 board to read 2 (x & y) analog signals.

I would like to command 1 pwm output on the bases of the 2 analog signals.

 

The idea is create a table 3x3 in wich x and y axes are based on the values of the analog signals and the output is the pwm output.

 

I have tried in several modes but no succes.

 

Can someone help me?

Thanks a lot in advance

 

 

0 Kudos
Message 1 of 8
(3,598 Views)

Hi dott,

 

well, it's really nice of NI to provide a ready-to-use function for a simple 2D interpolation...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,589 Views)

thank you so much.

I will try this way!

Best regards

0 Kudos
Message 3 of 8
(3,568 Views)

well,

I'm not sure to undertand how the "2d interpolate" function has to be connected with my inputs and output.

 

for example:

In the "zi" position I have a 2d array type of data. When I try to connect in the PWM sink of the arduino, the SW say me that is impossible because the 2 types of data are different.

 

also:

"xi" or "yi" has to be connected with the analog inputs. I have to use a 1D-array to do this, corret?

 

I apologize if my issues are stupid, I'm a beginner. 

 

0 Kudos
Message 4 of 8
(3,546 Views)

It is OK to be a beginner, so long as you are trying to learn.

 

To help us help you, we need to know more precicely what you are trying to do.

 

Please post the VI which you have tried.  Include some typical data for your x and y signals (because we do not have your external hardware). Also indicate what the outputs (PWM and table) should look like.  Since your program is not working you may need to manually enter the otuput values you expect or type them into a free label or constant.  The algorithm or formula used to relate the inputs and outputs should be specified as well.

 

Lynn 

0 Kudos
Message 5 of 8
(3,543 Views)

thanks for the reply.

 

I woul like to realize a simple PWM controller. I made the same writing the SW in C and it was working, but no flexible and without a graphical interface.

 

Well...

 

inputs:

Two analog signals; range  0-5V f(t).It could vary very fast in the time. I use two simple potentiometers to simulate the voltage variations.

 

output:

PWM: range 0 - 255. connected to a led.

 

I woul like to have the possibility to change the PWM with a table m X n where m is related to input 1 and n is related to input 2.

 

I will post the the SW tried by me as soon as possible. Now... dinner!

 

thanks all and best regards!

 

0 Kudos
Message 6 of 8
(3,514 Views)

Do you have enough dinner for all of us?

 

Lynn

Message 7 of 8
(3,502 Views)

there is always food for friends of mine 🙂

 

well,

I tried two times to send files but maybe my web connection is too slow. I try tomorrow mornig from the office

 

0 Kudos
Message 8 of 8
(3,488 Views)