LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty Zeroing Quadrature Distance Encoder without Z Input

Solved!
Go to solution

I found a similar post on this, the user found the only way to do so was to start and stop the task.

 

I've tried:

- adding stop task at end

- putting case structure around start task

- putting case structure on start and stop tasks

 

In all situations it just keeps incrementing. I wish there was a property on the channel that allowed for reset but I cannot find one for distance count, just edge count.

 

Any ideas? thank you.

 

lb_1.pnglb_2.png

0 Kudos
Message 1 of 10
(1,608 Views)

Can you describe your problem & desired result in more detail?  It'll also be helpful to post actual code, preferably saved back several versions to maybe LabVIEW 2018 or so.

 

You might be up against a hard limit, one that I was griping about more than 15 years ago.  And which wasn't changed in subsequent generations of devices.

 

While newer devices *do* support count reset in edge-counting mode, encoder position mode still demands a z-index signal that's sync'ed to the encoder's A,B channels in a specific way.

 

What DAQ device(s) do you have available to use?  What's the purpose and need for the count reset?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 10
(1,590 Views)

I can only comment on what I see in the pictures.
You have set 'z index enable' = 'false'. I think this should be set to 'true'.

In your image there is a comment about scaling which should not be required.
I think the value for "distance per pulse" of 12363 inches is way too large. 

 

0 Kudos
Message 3 of 10
(1,561 Views)

I agree that there should be a way to trigger the count reset from software, but if there isn't, why not grab the current count and the point you trigger in the software and subtract it from the hardware total.

 

0xDEAD

0 Kudos
Message 4 of 10
(1,555 Views)

Attached is my code (Labview 2019 SP1)

 

In a previous iteration, I did do a zeroing by subtracting the count.... I am worried about the effectiveness this method, especially if running for large amounts of time, which is why I'm trying to figure out how to stop and restart the task. This seems doable in a contained loop, but I have it 'spread out' a bit in my program because I have a part that syncs up several acquisitions (the flat sequence structure).

0 Kudos
Message 5 of 10
(1,527 Views)

@downerdce wrote:

I found a similar post on this, the user found the only way to do so was to start and stop the task.

 

I've tried:

- adding stop task at end

- putting case structure around start task

- putting case structure on start and stop tasks

 

In all situations it just keeps incrementing. I wish there was a property on the channel that allowed for reset but I cannot find one for distance count, just edge count.

 

Any ideas? thank you.

 

lb_1.pnglb_2.png


What is that thing crawling up the side of your hugely oversized VI?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 6 of 10
(1,518 Views)

It is a tower housing the eye of sauron.

0 Kudos
Message 7 of 10
(1,514 Views)

Actually a not really fun implementation of OPC comms.

0 Kudos
Message 8 of 10
(1,507 Views)

@downerdce wrote:

Actually a not really fun implementation of OPC comms.


I was going to say that if you could somehow get rid of that thing, you could end up with a very reasonably sized block diagram.  I like your previous post.  It made me literally LOL.  😄

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 9 of 10
(1,475 Views)
Solution
Accepted by downerdce

Here's the solution if anyone is interested. VI is attached in case you don't get it from this snippet.

 

Had to stop and restart the task with a button (or some other event) inside of my while loop. Thank you labview tech support.

 

downerdce_0-1662566545009.png

 

0 Kudos
Message 10 of 10
(1,432 Views)