LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use DAQmx without an NI optical encoder?

Does DAQmx soley work with NI hardware or can it work with other brands of equipment? If it cannot how would I start to make a block diagram for an optical encoder that stores the position of a stepper motor? Sorry for the newbie question, thank you.

0 Kudos
Message 1 of 9
(3,626 Views)

DAQmx is specifically the driver for NI Data Acquisition Boards.

 

What optical encoder are you working with?  How does it communicate with the PC?  There are often LabVIEW drivers for 3rd party devices using serial port, GPIB, Ethernet, etc.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 9
(3,617 Views)

I'm working with a Nanotech NOE2 which goes to a BrBoPr++, then goes to a microcomputer (Debian-Linux OS), then USB to the PC. 

0 Kudos
Message 3 of 9
(3,611 Views)

@kpwade wrote:

I'm working with a Nanotech NOE2 which goes to a BrBoPr++, then goes to a microcomputer (Debian-Linux OS), then USB to the PC. 


So then is completely depends on how the microcomputer decides to handle the protocol.  Are you or somebody in your company in charge of that code?  Or was it already done by a supplier?

 

If you have influence in the protocol, there are a lot of things we could do to make life simpler.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(3,591 Views)

Assuming I have an influence, what could be done?

0 Kudos
Message 5 of 9
(3,585 Views)

So let's assume we are to recieve a single value with each transmission and nother else.  What you would like then is to recieve data in an ASCII format with a Carriage Return (CR, 0xA) at the end of the data.  For example, if your encoder value is 20.5, you would receive the string "20.5" with a CR at the end.  This will make life very easy on the LabVIEW side since VISA can be set up to use a termination character.  When the termination character is enabled, the VISA Read will stop reading when one of three things happen: the desired number of bytes is read, the termination character is read, or there is a timeout.  So we just set the number of bytes to read to something more than we would ever expect to read and then we pretty much guarantee that we will read the entire message.  Then your loop can be as simple as this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 9
(3,579 Views)

@kpwade wrote:

Does DAQmx soley work with NI hardware or can it work with other brands of equipment? If it cannot how would I start to make a block diagram for an optical encoder that stores the position of a stepper motor? Sorry for the newbie question, thank you.


As crossrulz said DAQmx is used with NI data acquisition boards and modules. I'm using a Sick encoder with an NI-9401 Digital I/O module on multiple setup and using DAQmx to get the encoder value. So you can use a third partie optical encoder but you will need an NI acquisition board to compute the encoder value with DAQmx.

 

Ben64

0 Kudos
Message 7 of 9
(3,561 Views)

How would I add channels to read/write 6 optical encoders at the same time rather than just 1?

0 Kudos
Message 8 of 9
(3,502 Views)

Hi kpwade,

 

I would say it depends on how are you receving your data, because if you are getting the data in a single string then you can use LabVIEW functions to subset that string. There are manuals that can help you to  better undersand about VISA.

 

http://www.ni.com/tutorial/3702/en/#toc4

 

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/how-to-use-subset-string-on-read-visa/td-p/28...

0 Kudos
Message 9 of 9
(3,461 Views)