PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

measure rotor encoder signal

Hi Coato,

Sorry for the huge delay in getting back to you. How is the project going? I have tidied up the code that you sent in and attached it but I am yet to solve the digital output problem. Firstly if you think anything has been lost in my tidying then don't hessitate to tell me or change it back as I may have inadvertidly changed the nature of the program although I have made every effort not to.

Secondly, I'd really like to know exactly what you wish to do with this digital output as you may be going about it the wrong way. Are you aware that the 2nd DAQ Assistant is set to output to a digital port (1 bit) rather than a digital line (8 bit)? If you could describe to me what you wish to achieve then I'll do my best to help.

Best Regards,

Ian
0 Kudos
Message 11 of 19
(1,795 Views)
Hi Ian,
         Thanks for the reply, im still working on the project, not alot of progress been done as im stuck in this part Smiley Sad .  So let me try to explain what i hope to achieve.
         Ultimately I would like to measure the rotor angle of the system, I will achieve this through the use of acquiring two signals - a 1600Hz rotor square wave & a 50Hz sine votlage wave.  Now the steps I will use and correct me if i'm wrong is to:
 
1. Square the voltage wave so that it matches the rotor square wave
2 Divide my 1600Hz rotor wave down to 50Hz which is achieved so to match the voltage 50Hz wave
 
By now, I should have two 50Hz wave running side by side, however in my rotor and voltage waveform graph it's isn't showing me that.  I would expect them to overlap each other hence giving me 0 phase difference.  I tried using the XOR logic function to give me a time delay waveform between the rotor and voltage wave.  Now I want to output this time delay wave out through the DAQ card as a digital signal, so I can rewire it back to one of my counter ports so I can get an accurate measurement of the pulse width of the time delay wave.  This value will assist me in calculating the rotor angle.  Im not sure on how to use 8bit digital ouput so please advise.
 
I hope you understand what i'm trying to do, I have corrected little parts of the programs and have attached.  Please take a look at it when you get the chance as im running towards my deadline.  Thank you for your time and i appreciate for all the help you given me so far.
 
Best Regards,
Coato
        
0 Kudos
Message 12 of 19
(1,792 Views)
Hi Coato,

Thanks for the explanation it is a great help. I'd like to know exactly what hardware you have so as I can recommend the best way of doing this. If your hardware supports it there are very easy ways of measuring encoder signals so it may be that you are making your application much more complicated than it needs to be. So please provide me with a list of the National Instruments hardware that you are using and as much information as possible about the quaderature encoder and I'll do my very best to help you finish your project as soon as possible.

Thanks,

Ian
0 Kudos
Message 13 of 19
(1,768 Views)
Hi Ian,
         Thanks for your reply, yes i hope to finish this part of the project as soon as possible.  My hardware list includes:

- PCI-6052E DAQ card
- a 68 pin board for my inputs where my step-down voltage and current enters

and as for software wise
- Im using lavbiew 8.0

This is it, if there's any more problems please let me know.  Thank you for your time.

Best Regards
Coato
0 Kudos
Message 14 of 19
(1,759 Views)

Hello Coato,

Unfortunately, I do not have a great deal of time to look at your service request today, but I am aware of the urgency of the situation. Therefore, I have attached a couple of example VIs. The first is an example of how to use the tone measurement express VIs to determin phase information.

The second attachment is a slight rework of your original VI. Unfortunately, due to time constraints, I have not managed to complete my plan. The good news is that, the pulse width is returned to the user. The bad news is that it is not specified in seconds. This could prove to be very difficult to do using the current VI structure. A rethink may be required.

Finally, I urge you to read the following forum entry. It may provide some inspiration.

http://forums.ni.com/ni/board/message?board.id=170&message.id=235852&requireLogin=False

I apologise again for not providing a watertight solution. Calculating phase differences is unfamiliar territory for me, but I am very interested in reaching a solution with you. Please let me know how you get on with the examples, and perhaps I will be able to assist you further after the Easter break.

Best wishes,
Rich

Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 15 of 19
(1,728 Views)
Hi Rich,
           Thanks for the reply, though only slight problem with the vi, Im currently using labview 8.0 and the files are in 8.5 so could you please convert them accordingly to 8.0  Thanks for the your time, im just curious is there a method in converting from 8.5 to 8.0 without asking yous all the time Smiley Tongue

Best Regards,
Coato
0 Kudos
Message 16 of 19
(1,675 Views)
Hello Coato, apologies for the version mix up. Hopefully you will have more luck with the attached VIs!
 
Furthermore, the answer to your question is an unfortunate and resounding NO! Sadly there is no way of converting a VI to an older version without the relevent piece of software - in this case LV8.5 Robot Sad
 
However, it an easy job for us, so please never feel guilty about making such a request. We are here to help!!
Keep me informed about how you get on. I will try to aid you further if necessary.
 
Best wishes
Rich Roberts
Senior Marketing Engineer, National Instruments
Connect on LinkedIn: https://www.linkedin.com/in/richard-roberts-4176a27b/
0 Kudos
Message 17 of 19
(1,672 Views)
Hi Rich R,
                I've been backtracking on the code constructed so far and found maybe a slight problem with my frequency divider, in the vi I have pulse measurements vi to record the period of my rotor train pulse and hence the frequency and by dividing it by 32 and passing to the create square wave vi, it will give me a 50Hz frequency wave, however when it's joined with my 50Hz frequency voltage wave, they weren't matched at all, I mean I should be seeing 2 50Hz either with same phase or same kind of phase difference on my rotor and voltage waveform graph.   So im wondering whether the designed frequency divider actually messes up my timing information of my rotor signal therefore I was wondering whether you agree with this and if yes, is there any way to fix it.  I try reading other threads about it but no luck at all.  I believe that once this is solved then then the program should work to my needs.  Please take a look as soon as possible as my deadline is very close. Smiley Sad  Thank you for your time

Best Regards,
Coato



0 Kudos
Message 18 of 19
(1,561 Views)
Hi Coato,

I have looked at your VI, and changed some options:
1) Simulate signals, I changed timing parameters from Run as fast as possible to simulate timing.
2) On the graph that displays rotor and sine I selected autoscale X and the waveform now appears fine.

Please look at the changes.

Regards
JamesC
NIUK and Ireland

It only takes a second to rate an answer 🙂

0 Kudos
Message 19 of 19
(1,513 Views)