From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-24-2011 09:14 AM
I want to know how to create a protocol in C (or other langage) between the Labview software and a custom microprocessor board using Labview software. Am I obliged to use an interface and a NI driver or not? Offer to me a solution if it is impossible
Thanks
03-24-2011 10:26 AM
All serial communication in LabVIEW is done with VISA and that is the only thing that needs to be installed. There are shipping examples (search for 'serial').
p.s. In the future, post questions to the Instrument Control board since this has nothing to do with NI Digital boards.
03-25-2011 06:54 AM
Since you are creating the protocol, it can be whatever you want it to be. The transmission channel is RS232 so you will need the VISA driver on the LV side and whatever translation hardware (i.e. MAX3232) to convert the RS232 input of your custom CPU to signals the CPU can use. That may already be part of the CPU board.
The protocol can be as simple or complex as required to get the job done. When I create fixtures with embedded PICs, I keep things simple and use fixed length commands and keep everything (commands and data) as bytes. This way I don't have to create a complex command interpreter on the PIC side. As I am writting both drivers, I know exactly what is going on between the two systems. Then just document the protocol so the next guy knows what's going on. An example of one of my "protocols" is:
Like I said, very simple.
03-27-2011 07:54 AM
Thank for the quick response but I don't know yet (because I don't know well the labview software) how the VISA work to configure a RS232 link. I have to define the baud rate, the number of bits the parity bit ... I know to do that in the PIC side but not in the Labview side. Have you some example to give to me?
03-27-2011 08:00 AM
There are serial examples that come with LabVIEW. Help>Find Examples<Haardware Input and Output. Or just do a search.
03-27-2011 08:05 AM
If I want a USB link is it more complex or not ? In the PIC side I can place a USB driver but how to do a simple point to point link without having problem of identification
03-27-2011 08:07 AM
It is much more complex if you use USB RAW instead of RS-232.