Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with taking and storing date from LMT01 LPG 2 pin temperature sensor.

Hey everyone,

 

I'm using a LMT01 temperature sensor, I need to count the number of pulses in 100ms in a pulse train, each pulse is 5us on and then 5us off (square wave) i need the total number in 100ms to post process into a temperature. I'm having issues with counting the pulses. 

 

But currently i am only picking up the start of each pulse train (the timer is at 5 seconds so i could work out if this was the case.). I am using the FPGA of the Myrio. 

 

Has anyone had experience with the LMT01 LPG -  Data sheet

 

Kindest Regards,

Aaron Page

0 Kudos
Message 1 of 4
(2,769 Views)

Hello there!

 

 

This page might be of interest of you:

http://forums.ni.com/t5/Example-Program-Drafts/FPGA-Counter-and-Digital-Edge-Detector/ta-p/3519082

 

If this does not help could you please post your code so we can see how you tried to do it?

 

Best regards

/Gustav

Message 2 of 4
(2,739 Views)

Thanks for the link, 

I have used a similar approach using a select rather than case, i have since initially posting this managed to understand how to work the FPGA. The code attached counts all the pulses. However there are several things i need to do which i am completely lost over. 

 

I need to take the count number after 100ms or after so long of no new pulses and put it into a formula. (that is to say the number of pulses in the pulse train)

 

I need to reset the count (either after 100ms or 5 or so ms of no pulses if this is possible).

 

Any help would be really appreciated because i cant find anything on how to use the count number or take a value from the count at a certain time.

 

Kindest Regards,

Aaron Page

 

 

0 Kudos
Message 3 of 4
(2,731 Views)

Hello again

 

Sry for the late response but I've been away for a while.. I found another forum thread, link below, in which it seems you got your answer?

 

http://forums.ni.com/t5/LabVIEW/Pulse-counting-in-a-timed-loop/m-p/3650129#M1025159

 

If so perhaps you could link or share the info from that one and mark it as solved just so others with similar problems could find their answer there?

 

Thanks!

 

Best regards

0 Kudos
Message 4 of 4
(2,559 Views)