LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hall Pulse Simulator using 2 counters on 6025E card

Hello All,

I am trying to simulate DC motor hall pulses using 2 counters on the 6025E daq card. The phase shift between Hall1(ctr1) and Hall2 (ctr2) should be 90 Degrees. Based on the comments and suggestions on the forum, I have come up with a VI that could possibly do this.
I wanted to get some feed back on the attached VI and possible pointers if somethings need changes.
Your inputs will be highly appreciated. Its in LV 8.5

Thanks,
Praveen R
0 Kudos
Message 1 of 4
(2,876 Views)
 

Hi Praveen,

Your VI architecture is difficult to understand at first glance. It looks like you're trying to mimic an event-based program flow, so you may benefit from using an event structure rather than a while-case structure.

Also, you're using channels and tasks defined in MAX, so I can't see how this VI would (or wouldn't) get the behavior you're after. If you could document your code and explain in more detail your requirements and expectations, then I might be able to give some more insight. Also, outlining your algorithm would also help me understand if your code will do what you want.

 
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 4
(2,855 Views)

Hi Joe,

 

Thanks for getting back with the reply. I have tried to document as much as possible to help you understand better. Also, I have the sample Main VI architecture attached as well. Let me know if this helps.

Thanks for the links.

 

PR

0 Kudos
Message 3 of 4
(2,844 Views)
Hi Praveen,

Thanks for adding comments to your code and adding the top-level control VI. The algorithm is a lot more clear 🙂

Your overall approach is very clean and straightforward now that I can see the big picture. There are many ways to write this kind of application and you've chosen one that should be easy to maintain and modify in the future. The only suggestion I can think of is to compact the block diagrams and line up the wires to make read-ability more easy.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 4 of 4
(2,833 Views)