From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication wiring problem

I have an absolute encoder that is putting out a synchronous serial pulse train of about 25-27 bits long.  I have the signals coming out of an RS485 chip.  I want to be able to read that pulse stream with the computer.
 
My first question is about the interface needed.  I was going to purchase the PCI-8431/2 RS485 board and put that information into this card.  Is this the right card to use?  The stream that is coming out of the encoder has the capabilities of being clocked at well over the 1MHz range.
 
My next question is, if this is the right card, how would I wire the cable with the encoder pulse stream? All I can provide from my circuit is the data line and common ground.
 
My final question is this:  I am using Visual Basic 6.0 and Measurement Studio.  What would the code look like for attaining this information and displying it on the GUI?
 
Thanks for all your help and see you at NI WEEK next week.

 

0 Kudos
Message 1 of 6
(3,921 Views)
Hi Big Guy,
 
The PCI-8431/2 is definately the card you are looking for. It supports speeds up to 2 MHz, so you can do the clocked I/O you are lookign to do with it.
 
As far as connecting this to your device, it uses the standard 9 pin connector for 485 and 232. This means that there should be a pin dedicated for ground and a line dedicated for data sending, as well as one for receiving.
 
When you install the NI-VISA drivers and install support for VB6, it should also install some exampes that will show how to interface with the serial device in VB6. That would be a good starting point.
 
Regards,
Matt S.

LabVIEW Integration Engineer with experience in LabVIEW Real-Time, LabVIEW FPGA, DAQ, Machine Vision, as well as C/C++. CLAD, working on CLD and CLA.
0 Kudos
Message 2 of 6
(3,894 Views)
Actually, the 843x boards only support asynchronous serial transfers. They will not work for your synchronous serial input and output. A better solution would be to use one of NI's high speed digital input and output boards. There are capable of receiving an external clock to clock in the serial data.

-Josh
0 Kudos
Message 3 of 6
(3,886 Views)
Thanks Josh,
 
How can this work with a DIO card with several inputs since I only have one line with the data stream and one line with the clock pulse?  Could you recommend a card? 
 
Thanks again for all your help.
 
 
0 Kudos
Message 4 of 6
(3,885 Views)
I would recommend a 653x board or one of the FPGA boards. The FPGA is probably the most flexible.

Here are some examples that show how to implement asynchronous. I would expect that will a little modification you could convert them to synchronous.
Repeated Serial Input and Output with 653X

RS-232 Interface Using the LabVIEW FPGA module

-Josh
0 Kudos
Message 5 of 6
(3,866 Views)

So I am looking at purchasing the PCI-6531, but I can't understand how I can send a serial pulse train in when this card takes data in  parallel mode.  I have a clock pulse that turns on when the data is present.  The data is in a serial pulse train that will consists of anything from 10 bits to 30 bits.  So with these two lines, clock and data, how will I wire and configure the card?

 

Any help is very much appreciated.

 

Thanks.

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