LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data acqusition system - rpm 2 channels - Hall effect

Hello guys, I am pretty new in eletronics and automation and I would like to learn more about Labview. I would like to measure, write on screen and in a .txt file 2 channels with hall effect sensors. I want to measure RPM. I am using Arduino Uno, Lynx and USB serial cable. I attached the file that I started and I don't know how to add a block to inform the rpm and neither how to export in .txt file. Please help me if you can. Thanks!  

0 Kudos
Message 1 of 6
(2,637 Views)

Suppose I said to you "I generated some data with my LabVIEW Program, and want to send it to a C++ routine written with Visual Studio.  Please help me -- I know nothing about C++, including the difference between an Integer, a Float, and a [whatever the C++ name is for a Boolean]."  What would you advise?  Probably "Spend some time, at least a few days, learning as much about C++ as you can, and write some simple C++ routines, worrying nothing about your "real" task, but learning how the language works".

 

Some comments on your code:

  • What is the Arduino sending to you over the VISA line?  I'm assuming (since you are talking about 2 channels and wanting RPM data) that you are getting two Floats, or two Integers.  So why are you doing a Digital Read (which your manual should have told you is for "digital" (i.e. TTL, or Boolean) signals?  Did you notice that the output is a Boolean (and why did you distort the Indicator on your Front Panel)?
  • In any Programming language, if you wanted to take in some data and write it to a Text file, what two "operations" would you have to consider, learn something about, and develop some code to accomplish?  Hint -- one is "take in some data", which you did (but didn't seem to consider what the data were, see previous comment).  What's left to do (and totally missing from your code)?
  • Spend more time learning the basics of LabVIEW before trying to do more with this example.  There are Learning Paths listed on the first page of this Forum.

Bob Schor

 

0 Kudos
Message 2 of 6
(2,588 Views)

Thanks Bob for replying. As my knowledge is very limited I will follow your suggestion and spend more time in basic labview training.

My program just is considering one channel because if works for one it will be easier copy for another one. I am using digital read because it worked to detect the magnet. I assumed that for calculate RPM will work too. Thanks again.

0 Kudos
Message 3 of 6
(2,582 Views)

Think about what RPM (spell it out) means, and think what this meaning says about what you need to measure.  What are you measuring with your digital signal?  Is that enough?  [Feel free to guess at the answer, knowing I wouldn't be going on like this if there wasn't a problem somewhere].

 

Bob Schor

0 Kudos
Message 4 of 6
(2,578 Views)

I am measuring pulse (digital signal = 0 or 1) and one pulse every second give me a result of 1Hz. Is that right? I think now I am closer.

0 Kudos
Message 5 of 6
(2,574 Views)

Now we are getting somewhere!  How do you know you are getting one pulse per second?  Where is the "per second" coming from?  Not at all obvious in your code.  Whose "clock" are you trusting?  

 

Bob Schor

0 Kudos
Message 6 of 6
(2,570 Views)