Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use the NI 9403 to connect an SPI interface device?

Hello.

 

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 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 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.

 

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.

  

 

Can you please help me.

0 Kudos
Message 1 of 2
(3,444 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 2 of 2
(3,420 Views)