Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use the NI 9403 to connect an SPI device

Hello.

 

I want to connect a barcode scanner to the NI 9403 module. I just want to know if it is possible and if so, how can I read the data from the barcode scanner (which is in Hexadecimal) through a pin. I am a new to the LabView and I'm not familiar with al the functions. I am currently runnig LabView 8.5 on my computer. 

 

If this is not possible which DAQ modules would you suggest. I have looked at the NI 9401 module but I am not sure if I have to buy a new NI module.

 

Can you please help me.

 

 

0 Kudos
Message 1 of 5
(3,877 Views)

Why do you want to connect the scanner to a digital I/O card? Why don't you connect it to the pc if you want to read what is scanned? What type of interface does the scanner have? Is it RS-232 or keyboard (either wedge or USB)? I can almost see a reason to connect to the 9401 if you are trying to functionally test the scanner as opposed to reading the bar code.

 

A barcode scanner is not the same thing as an SPI device unless what you mean is that the barcode scanner has an internal SPI interface. A few more details on what you are actually trying to accomplish would be appreciated.

Message Edited by Dennis Knutson on 07-02-2009 07:51 AM
0 Kudos
Message 2 of 5
(3,874 Views)

I am busy with my final year project and I need to be able to scan a barcode in order to determine what task the autonomous vehicle must execute.

 

I want to use as few as possible external circuitry, that is why I want to connect it directly to the CompactRIO. The interface of the barcode scanner is a wedge keyboard (PS/2). I have already connected it to a pc to test the scanner and I can see that the barcode scanner works.

 

The reason why I say it is SPI is because the barcode scanner has a clock and data line. Thus it is synchronous. When I connect the barcode's data line and clock line to an oscilloscope I can see the make and break codes.

 

Is it possible to read the data coming from the barcode into an array when programming in the FPGA block diagram. I assume that the array type will be Boolean. Then I want to extract the different make codes to compare it with a database of ASCII codes. For example the barcode will say TASK0112.

The last four ASCII codes will be compared to a database and the appropriate task will be executed.

  

 

0 Kudos
Message 3 of 5
(3,863 Views)
Okay, that makes more sense but I can't answer your question about the FPGA.
0 Kudos
Message 4 of 5
(3,857 Views)

Achillies,

 

Thanks for using the NI Forums! In the future, I would ask that you post your question only once as it gets confusing having multple threads. 

 

 

Duplicate Thread Here

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 5 of 5
(3,829 Views)