LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading all bits on serial port

Solved!
Go to solution

We currently have an application that currently sends out data (from a microcontroller to RS485 transceiver). I'm thinking of purchasing a PCI-8433 for this application to decode the data in Labview. However the data is not being sent in standard serial communication protocol (start bit - 8 data bits - parity - stop bit). The microprocessor just streams data bits.

 

Is there a way to get the data into Labview by using the PCI-8433 without using standard serial/visa read-write which look for the start/stop  bits, etc? I just want to stream/read every bit that comes in that port.

 

I know I could do this task by making a daughter board with another RS485 transceiver then decode the data with another microcontroller and/or shift register and then finally get the data into Labview with GPIO lines from a DAQ or similar. But that is a lot of extra work and hardware.

0 Kudos
Message 1 of 10
(3,567 Views)

Hi,

 

I'm not sure a Serial card from NI could change its driver to understand a custom protocol.

But what you can do is using an NI-HSDIO board and creating you're own algorithm in LabVIEW for decoding data (no needs of microcontroller).

Or using a RIO board wich integrate an FPGA wich permits to create your own algorithm of Protocol decoding, wich can decode your datas in live.

Olivier L. | Certified LabVIEW Developer


0 Kudos
Message 2 of 10
(3,565 Views)

Can you "tap into" (sniff) the RS422 line and connect that to a DIO?

You could have a 2nd application running in parallel which listens to the pulse train over the serial wires. 

I suspect you only want to listen one way, right?

 

As for the decoding, you could create an algorithm to do so.

If you need it to decode the stream on the fly, then the producer consumer design pattern would be the way to go.

You may need a multi-core machine to run it seemlessly.

0 Kudos
Message 3 of 10
(3,543 Views)

Something doesn't sound right here... how will you know when a byte stops or starts if it's just streaming bits?

0 Kudos
Message 4 of 10
(3,537 Views)

I would suspect a management stream (header) which has a known pattern.  Otherwise, it's just ones & zeros..  Or rather a bunch of square waves.

Message 5 of 10
(3,535 Views)

Skydyvr,

 

You do not need a controller on your daughterboard. Just use a receiver/transceiver and take the digital output directly to your DI device.  The reciever chip will convert the RS-485 voltage levels to logic levels but will not interpret them as start/stop, bytes, ... Make sure you just have a receiver and not a UART.

 

Lynn

0 Kudos
Message 6 of 10
(3,528 Views)

That's an interesting trick...

 

Thanks Lynn.

0 Kudos
Message 7 of 10
(3,525 Views)

Thanks for all the replys.

 

You have confirmed what I had feared - I could not connect the hardware to my transmission lines and make it work. Too bad for NI, they could have sold us several of those cards if they weren't so picky on how the data is aquired.

 

I did think about using another RS485 transceiver and a DIO card. But a couple of things concern me.

 

1) The data is being transmitted at 1.54 Mbps. But the bit transistions could be twice that fast as it is G.E. Thomas Manchester encoded.

2) I've never personally tried to do any data communication via DIO lines. Only used them for switch control. So I'm not sure how reliable it would work especially at that speed. Or even how to set it up to read data. I wouldn't trust setting up a port read inside a while loop. Too much delay in a windows based system, I would think.

0 Kudos
Message 8 of 10
(3,509 Views)

Forgot to add...

 

Initially all I need to do is listen. But eventually we will want half duplex communication.

0 Kudos
Message 9 of 10
(3,508 Views)
Solution
Accepted by topic author Skydyvr

With that information I think you are looking at custom hardware or FPGA.

 

Lynn

0 Kudos
Message 10 of 10
(3,498 Views)