06-23-2016 01:46 PM
Well you have to listen to the what the error is telling you... You said above that the encoder is going to send a signal to two different channels depending on the direction, right? So set the two different channels, not the same channel twice. You have "ctr0" selected twice, where you probably want "ctr1" as the second channel.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-23-2016 01:52 PM
Ahh okay thats what I thought sadly I do not have a crt1.
06-23-2016 01:57 PM
Ah, I just looked at the specs and you're right, only one counter, so you are limited here by your hardware. Seems like you need to use the digital inputs then to get both channels.
What sample rate did you set it to earlier when you were using the first method I replied with? Can you calculate what rate the pulses will be coming in at? Please include the version of your VI that you said was still missing pulses.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-24-2016 09:28 AM
Hey I'm back.
So when I tried to run continues samples I recived this error:
Error -200077 occurred at DAQ Assistant
Possible Reason(s):
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: SampTimingType
Requested Value: Sample Clock
Possible Values: On Demand
So my understanding is thats the timing vi not working but is that because of my hardware or my vi.
and the vi that was skipping pulses was the fancy array one.
06-24-2016 09:41 AM
It looks like your Digital channels are limited to software timing, unfortunately. This may mean you are out of luck for two separate encoder signals on this device. Could you possibly make due with not knowing which direction the encoder is spinning? Can you just hook both signals up to the same counter channel? They would never be counting at the same time, so essentially you would just be losing the knowledge of which direction is being counted.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-24-2016 09:45 AM
Here is my 2nd attempt to get it working without using the assistant which yields the same error.
Error -200077 occurred at Property Node DAQmx Timing (arg 1) in DAQmx Timing (Sample Clock).vi:4730003->Continuoustest#2.vi
Possible reason(s):
Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: SampTimingType
Requested Value: Sample Clock
Possible Values: On Demand
06-24-2016 09:48 AM
Sadly no the direction of the rotation is pretty important.
06-24-2016 09:49 AM - edited 06-24-2016 09:55 AM
When you are working with encoders, you really need the hardware to be fast enough to keep up. Your MyDAQ just isn't made to pull from the digital channels at a rapid rate and only has the single counter input that can be hardware timed. If you had a MyRIO, that would be another story.
Anybody else here have a clever way around this?
In summery for others: RyanKlimowski has a MyDAQ and an encoder. The encoder outputs two signals, one for each direction. The MyDAQ has only one counter input, but a bunch of digital inputs. The software-timed digital inputs aren't fast enough to catch all encoder pulses when looping as fast as possible.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'