09-22-2016 03:35 AM
Hi,
Can I create a linear encoder channel (CIChannel) in C# (C# on PCI-6133)
I could not understand if I can use the 2 timer/counters that it has for that and if so how do I map the wiring?
Cheers
Maayan
09-22-2016 05:56 PM
If you go to "All programs" from the Windows taskbar, locate the National Instruments folder and then open the DAQmx folder, you should see the DAQmx examples. There is a .NET C# example to measure angular position. It only requires a few modifications to make it usable for a linear position measurement. For example, instead of the "pulses per revolution" specification of an angular encoder, you could place the "pulses per inch".
Manfred Vargas
Applications Engineer
National Instruments
http://www.ni.com/support
09-22-2016 06:30 PM
Hi,
Thank you for answering. I looked at that example before posting my question but I couldn't tell to which lines/port I'm suppose to connect the A, B and Z or how do I set the pin mapping to it.
I'm using PCI-6133 model and the BNC-2110 connectors box.
Cheers
Maayan
09-23-2016 01:08 PM
I apologize. The PCI-6133 has 2 counters but it does not support encoder tasks. What you could do is count edges or use a frequency measurement task, but the tricky part would be to programmatically compare the phase of the signals coming from the encoder (which the built-in encoder task does automatically). I recommend getting a hardware that supports encoder tasks.
09-25-2016 06:05 PM
Thanks for answering. I thought that will be the case. I have a post processing chuck of software that deals with the other signals. I reckon I'll just acquire the encoder's signal as a regular digital signal and them translate them/the translation to the location in the post processing.
Thanks 🙂