05-03-2016 08:01 AM
Hi guys,
Is there any way for full duplex communication betwen PIC Controller and LabVIEW. I want to read data from PIC Controller, when I send a data request to PIC from LabVIEW.
05-03-2016 08:11 AM
I think it depends a bit on the PIC and how you communicate with it. We have a very old, very cranky PIC that runs (heaven help us) Ladder Logic, with an RS232 interface to a PC. We wrote a small C++ program that can communicate with the PIC, and call it from LabVIEW to let LabVIEW both send commands to the PIC and read results from the PIC. [It would have been nice to do the RS-232 stuff directly with LabVIEW, but as I recall, the PIC used a somewhat bizarre communication scheme, had a C++ driver, and thus we took the "easier road"].
Bob Schor
05-03-2016 08:41 AM
I manage to build RS485 network with PC (LabVIEW) as a master and six slaves (PIC18F458), software mikroBasic PRO and it works ok.
Regards
Vlado
05-03-2016 09:38 AM
I really do not think a PIC is even capable of full duplex comunications.
05-03-2016 10:40 AM
@velkumar10 wrote:Is there any way for full duplex communication betwen PIC Controller and LabVIEW. I want to read data from PIC Controller, when I send a data request to PIC from LabVIEW.
Full duplex means you can send and receive simultaneously. Is that actually what you need? If you want to send a request and receive a response, half-duplex is sufficient, because all the communication is synchronous: the PIC only sends data in response to a command, rather than sending at random times. Even if you do need the PIC to send data occasionally without a request, you may not need full-duplex communication - for example, CAN is not a full-duplex bus, but it handles asynchronous messages well.
That said, a simple RS232 (serial) interface is full-duplex and is supported by the PIC, so you could definitely use that. But, the code on your PIC needs to support such communication. If the code on the PIC doesn't have any way to transfer data, then you can't do anything without modifying that code.