LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the fastest way of communicating from PC to a Controller using LabVIEW?

Solved!
Go to solution

I am working on a project wherein I need to communicate 8 boolean outputs to the controller based on the result generated by a program built using LabVIEW on a PC.

I have discussed this with a few colleagues who suggest using a parallel port data-bus and use TTL signals to communicate to a micro-controller which will give maximum transfer speed.

I understand it being a cost effective solution but will it be fastest way to communicate with a micro-controller? Also, considering it being a legacy technology which limits its availability on standard PC's I have to buy an additional PCI-E card with parallel port interface.

0 Kudos
Message 1 of 15
(3,148 Views)

Hi harshitshah,

 

please define "fastest"!

See here or here

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 15
(3,139 Views)

Hi GerdW;

 

Thanks for your response.

 

I guess by fastest I'm talking about latency here. To give you a brief of the application, I am inspecting image samples and generating a true or false case for 8 different features on the image. These samples will be generating results at about 250 msec. so I will have new feature data every 250 msec.

 

Now, I require this info to be passed on to the micro-controller at this rate. Considering the article you suggested "Instrument Bus performance - White paper", it appears that it will be preferable to use register based communication instead of message based. However, the article also suggest that register based communication is usually considered for on-board communication and in my case, I have the controller physically separate on another PCB.

 

Regards;

Harshit

0 Kudos
Message 3 of 15
(3,124 Views)

Hi Harshit,

 

maybe you can limit the possible choices by telling us which kind of interface(s) your "controller" offers/supports!?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 15
(3,113 Views)

Hi GerdW

 

I have I2C, SPI, UART and Digital IO pins on controller for communications.

 

Regards;

Harshit

0 Kudos
Message 5 of 15
(3,109 Views)

250ms is an eternity, so I would worry more about ease of use than latency.  The DIO would be the simplest and would be really fast. Because you are going between boards, the UART with a high baud rate would be my second choice (only need to send 1 byte for all 8 Booleans).


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 15
(3,103 Views)

Hi Harshit,

 

use UART (probably a VCP implementation?)!

 

What is your requirement on "fastest communication"? Which timing constraints are we talking about?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 15
(3,102 Views)

Hi GerdW

 

As i mentioned in my previous reply, i get updated results every 250 msec by which i need to interpret the features, record them, adjust my counters and operate a set of relays.

 

Is there any other timing constraint you are talking about?

 

Regards

Harshit

0 Kudos
Message 8 of 15
(3,098 Views)

@crossrulz wrote:

250ms is an eternity, so I would worry more about ease of use than latency.  The DIO would be the simplest and would be really fast. Because you are going between boards, the UART with a high baud rate would be my second choice (only need to send 1 byte for all 8 Booleans).


Hi;

 

Thanks for your response.

 

Currently, issue I face is usage of mirco-controller DIO to connect to PC. My PC does not have a built in LPT port. If UART can still be used with that time limits, I would prefer that as PC already has 1 Serial port on board.

 

Regards;

Harshit

0 Kudos
Message 9 of 15
(3,094 Views)
Solution
Accepted by topic author harshitshah

@harshitshah wrote:
Currently, issue I face is usage of mirco-controller DIO to connect to PC. My PC does not have a built in LPT port. If UART can still be used with that time limits, I would prefer that as PC already has 1 Serial port on board.

Then go with the serial port.  But do be warned that many micro-controllers use TTL UART (UART waveforms using 5V logic) while PCs tend to be RS-232 (-12V to +12V for high and low).  You will damage your micro-controller if this is the case.  So you may need a converter module/chip.


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 10 of 15
(3,089 Views)