LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Q Encoder

Here is code with the logic I defined earlier added which gave the X1, X2, X4.  However, it doesn't have code to make the X pulses go back to low.  It might need some other architecture changes and I don't have time to do that for you.  I've got my own projects to work on.

 

But the picture you show has only shows X1, while the earlier picture showed X2 and X4.  But this also describes how to have a counter go up and down based on direction.  If that is what you really want,  (and you still haven't said what you are trying to do), then you can figure that out.  I've shown you how to implement the various logic structures.

0 Kudos
Message 21 of 33
(1,303 Views)

@RavensFan wrote:

Here is code with the logic I defined earlier added which gave the X1, X2, X4.  However, it doesn't have code to make the X pulses go back to low.  It might need some other architecture changes and I don't have time to do that for you.  I've got my own projects to work on.

 

But the picture you show has only shows X1, while the earlier picture showed X2 and X4.  But this also describes how to have a counter go up and down based on direction.  If that is what you really want,  (and you still haven't said what you are trying to do), then you can figure that out.  I've shown you how to implement the various logic structures.


Thank you for spend out the time doing the logic structure for me. Then how i going to display out the signal A and B and the counter value on my host PC? 

0 Kudos
Message 22 of 33
(1,288 Views)

You read the values of the indicators that are on the FPGA through FPGA nodes and display them on your host PC's indicators.

 

Here is image of code running on my host PC reading the value of an indicator called "Wait" on my FPGA VI.

0 Kudos
Message 23 of 33
(1,285 Views)

@RavensFan wrote:

You read the values of the indicators that are on the FPGA through FPGA nodes and display them on your host PC's indicators.

 

Here is image of code running on my host PC reading the value of an indicator called "Wait" on my FPGA VI.


Am I able to display the channel A and B at digital waveform chart on host PC? "wait" on my FPGA VI means what?

 

0 Kudos
Message 24 of 33
(1,280 Views)

"Wait" is the name of my indicator on my FPGA VI.  On your FPGA VI, you'll have that node point to "Channel A" and "Channel B".

 

Yes, you can connect those wires to waveform charts.

0 Kudos
Message 25 of 33
(1,276 Views)

@RavensFan wrote:

"Wait" is the name of my indicator on my FPGA VI.  On your FPGA VI, you'll have that node point to "Channel A" and "Channel B".

 

Yes, you can connect those wires to waveform charts.


how i connect those wires to my waveform charts? Always came in broken wire. 

0 Kudos
Message 26 of 33
(1,273 Views)

I can't help you because without your FPGA definition and your project, (and perhaps even the actual hardware), I get no wires in your VI, let alone broken wires.  This is a case where you'll have to post a screenshot of what you have.

 

Do you have green boolean wires coming out of the FPGA node?  You said you wanted a digital waveform chart, but you have an analog waveform chart.  You'll have to read the help files and examples for how to connect boolean wires to the digital waveform chart.

0 Kudos
Message 27 of 33
(1,261 Views)

@RavensFan wrote:

I can't help you because without your FPGA definition and your project, (and perhaps even the actual hardware), I get no wires in your VI, let alone broken wires.  This is a case where you'll have to post a screenshot of what you have.

 

Do you have green boolean wires coming out of the FPGA node?  You said you wanted a digital waveform chart, but you have an analog waveform chart.  You'll have to read the help files and examples for how to connect boolean wires to the digital waveform chart.


I already get the green boolean wire coming out of the FPGA node. can i show the channel A and B together into digital waveform chart? Attached file is my project. Thank you very much.

0 Kudos
Message 28 of 33
(1,257 Views)

You still have a regular waveform graph in there.  You need a "digital" waveform graph.

 

There are numerous functions on the Waveform >>Digital Wfm palette.  You'll likely need to use several of those.

 

Search the examples for "digital waveform graph".  They are more complicated data structures.  You are just going to have to read and learn.  Search the forums for that same phrase and read other message threads where people had specifically asked about them.

 

EDIT:  I found the secret sauce is Boolean Array to Digital.  See attached.

0 Kudos
Message 29 of 33
(1,247 Views)

@RavensFan wrote:

You still have a regular waveform graph in there.  You need a "digital" waveform graph.

 

There are numerous functions on the Waveform >>Digital Wfm palette.  You'll likely need to use several of those.

 

Search the examples for "digital waveform graph".  They are more complicated data structures.  You are just going to have to read and learn.  Search the forums for that same phrase and read other message threads where people had specifically asked about them.

 

EDIT:  I found the secret sauce is Boolean Array to Digital.  See attached.


This is what i plot out the digital waveform chart. I not sure whether is correct or not. 

0 Kudos
Message 30 of 33
(1,241 Views)