LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you simulate an encoder using a virtual channel?

I am trying to use MAX to simulate hardware so I can create a program before I purchase the hardware. I will be purchasing a USB-6211,  TTL quadrature encoder, and LVDT.

 

I want to simulate a quadrature encoder and a LVDT. I have created a virtual channel for each and a virtual USB-6211.

 

The LVDT is simulated by creating a virtual analog input channel. This virtual channel works when I test the vi.

 

The encoder is simulated by creating a virtual angle counter. This virtual channel does not work when I test the vi.

 

How do I get this virtual angle counter to work?

 

 

0 Kudos
Message 1 of 6
(3,754 Views)

sk8board,

 

Thanks for posting to the NI Discussion Forum!  Could you explain a bit more about how the encoder virtual channel is not working?  Is it throwing an error?

 

-Kristen

0 Kudos
Message 2 of 6
(3,721 Views)

Kristen,

 

I do not get an error. The problem is that I do not get any action from the virtual channel.

 

For example, when I created the virtual analog input channel, this channel provides a simulated varying voltage when I run the vi. The virtual angle counter channel does nothing at all when I run the vi.
0 Kudos
Message 3 of 6
(3,710 Views)

Hi sk8board!

 

Just to clarify, what behavior are you expecting from the encoder when the VI runs?

 

Kristen H.

0 Kudos
Message 4 of 6
(3,686 Views)
Simulated counter channels always return 0. That is clearly explained in the DAQmx help. Simulated channels are not intended for all types of signal simulation. They can be used to verify if your task has any errors and can simulate timing for analog input, digital input, and output tasks. If you want to simulate an encoder, you will have to write the code yourself and use that instead.
Message 5 of 6
(3,675 Views)

Simulated counter channels always return 0.

Wow! That seems like a very lame simulation. Not much of a counter simulation. 😞

 


If you want to simulate an encoder, you will have to write the code yourself and use that instead.

Can you give me an idea how to simulate the A and Z signals of a quadrature encoder?

 

Thanks for the help.

 

0 Kudos
Message 6 of 6
(3,657 Views)