FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading a TTL Pulse with a cFP-CTR-502

First off I'm a Labview newbie...
 
That said, I built this super basic VI that reads a pulse and displays the frequency.  The problem I have is that the Stanford Box I was using was giving me a -5V to +5V pulse.  When I hook this up to our TTL generating devices that send me 0-5V it can't see them.  Is there a way I can keep the simplicity of my VI and do this?
 
I have tried many of the sample VI's that claim to do this but I have trouble making them work.  In fact I have had a lot of problems with older sample VI's.  I think the old Fieldpoint Explorer era VI's just don't play nice with Labview 8.5 and Fieldpoint 6.0.
 
Any help would be appreciated.
0 Kudos
Message 1 of 7
(6,126 Views)

I would suggest recreating your timed sequence structure.  (And is it necessary?)

Looking at it, I thought it was odd that the processor node showed up twice on the left hand side.  If I edited by the dialog box, both values changed accordingly.  When I tried to expand the right hand side nodes, it cause my Labview to crash with a drawmgr2.cpp error.

EDIT:  On further experimentation, the crash seems to occur when I expand that node and it overlaps the for-loop.  If I move the for loop to the right some, the error does not occur.  (Also, on some crashes  "xstuffprivate.cpp, line 1887" popped up upon restarting labview.)



Message Edited by Ravens Fan on 01-08-2008 04:04 PM
0 Kudos
Message 2 of 7
(6,125 Views)
Thanks RavensFan.  I have tried creating and re-creating.  I know that it's a weird rookie design.  It was one of the first things I did when I started.  Truthfully I wasn't even sure why it worked at the time.  The bottom line was that if I input a 100 Hz pulse the readout said 100 and it was consisitently accurate across the spectrum.  The number this VI displays is not even displayed normally, it's just plugged into math.

I'll play around with the timing sequence again and let you know what I come up with.  I don't see how that would help but one thing I have learned is that it doesn't have to make sense, it just has to work.

I have a hunch it may require a change in Max but there's just so little control there. 

I'll keep plugging away.
0 Kudos
Message 3 of 7
(6,122 Views)

A single timed while loop may be able to do what you want.  Or some other timing mechanisms.

Most of my concerns were why the processor property node (set as -2) shows up twice.  And if I create a timed sequence from scratch, it shows up once with no way of creating it a second time.  And the other concern was that looking at the nodes on the right hand side of the sequence caused labview to crash in the edit environment.  But  I wonder if that's a bug in Labview since I was able to do it whenever the node block winds up overlapping the other structure when I expand it, but not when I create enough room between the structures where they don't overlap.

Unfortunately, I don't know if any of this helps you solve your original problem.  Smiley Sad

0 Kudos
Message 4 of 7
(6,119 Views)

I know this is completely unrelated to my problem but I have tried to recreate this and I can't.  I don't know how it ended up with two processor terminals in the Input Node but an identical loop without it doesn't work the same way. 

Like I said before, when I run a -5V to +5V pulse into this at 50 Hz my indicator says 50.  I can't recreate it but it works.  Now if I could get it to read a 0-5V pulse I'll be in business whether I can figure out why or not.  Any input would be appreciated. 

Thanks.

0 Kudos
Message 5 of 7
(6,105 Views)

I finally made this VI read the 0-5V pulse.  On one of the tutorials it said that it needed a 4-12V power supply to read a TTL.  I hooked up a 12V that didn't work.  In desperation I tried supplying 5V of power and it worked.  It was fine in a 3-7V range.  That's why it didn't like the 12V. 

However...my clock is just a little skittish and one of the Labview studs here told me that I need a better clock source than the default source it sees right now.  That's a shame because my VI is way simple compared to the NI samples.  Any thoughts on a simple VI to read a TTL with the 502?  I'm all ears.  If I can make a great one I'll post it here.  A VI that uses one channel rather than three would be ideal.

0 Kudos
Message 6 of 7
(6,091 Views)
Hi Dave,
 
What do you mean that your clock is skittish? Can you post your current vi?
 
Thanks.
Regards,

Hillary E
National Instruments
0 Kudos
Message 7 of 7
(6,081 Views)