10-18-2013 03:07 PM
Good afternoon all,
Long story short, I have not used labview in years and years and years. I have been writing mostly embedded code and C# and designing hardware since my days of data logging. As fate would have it, I have just become employed by a very very large company that appears to have a love interest with Labview so I am going to take it up again to automate some tests and whatnot. For all the equipment I have, it is obvious how to make it go. I am more interested in how I could make labview interface to some custom stuff, switches, relays, just simple stuff like that. Maybe just control and not even readback.
So my question is, is there, and if so, what is it, an interface circuit that would allow me to plug in and interface to a piece of custom circuitry. I am guessing a serial or USB or maybe even an FTDI chip interface or something would seem logical. I can handle everthing beyond that, I just don't want to go down rabbit holes if there is a simple proven circuit already out there. I know there are little interfaces you can buy (myDaq?) but I am hoping to figure out a way that I don't have to buy anything and I can just incorporate it into whatever little project I am making.
I have googled around and havent found anything yet. A general topology is good, a schematic is better, a schematic with source code (if needed) is ideal.
So what do you know? and thanks in advance.
Solved! Go to Solution.
10-18-2013 03:16 PM - edited 10-18-2013 03:19 PM
How about and Arduino? They are cheap and once you have something working you can load the Arduino boot loader into blank Atmel's and incorperate it into your design.
There is pre-canned LabView code that cominucates with an Arduino and uses it like a simple DAQ/DIO board. That is it must always be teathered it does not program the Arduino to run stand alone.
https://decibel.ni.com/content/groups/labview-interface-for-arduino
10-18-2013 03:24 PM
I have some arduino's around that I have used, I prefer PIC for super simple stuff just because I am faster at it but that is besides the point. What is the interface to the arduino board? Is it using the USB port? If I am not mistaken, the USB port just looks like a serial com port. Does Labview have a serial driver specifically for arduino or is it just a generic serial driver? That is basically what I am looking for but if that is the option I use then I will have to add the USB chips and find the arduino source and load that in every board.
FTDI makes serial cables and even little chips that I have used in the past. USB in, Serial out (they also have RS232, 485, I2S, etc.) and then you can talk serial directly to a little micro. I guess my question is would it be overly difficult to find, or build an "instrument driver" for that type of circuit?
10-18-2013 03:25 PM
I asked additional questions before reading the link....reading now.
10-18-2013 03:28 PM - edited 10-18-2013 03:30 PM
Serial is probably the way to go, especially if the PIC has built-in support. I used LabVIEW to talk to a PIC over CAN in a recent project, but a CAN card isn't cheap whereas serial is pretty much free. Of course, if you have a more sophisticated microprocessor and a TCP stack, you could use ethernet.
EDIT: In case it wasn't clear, from the LabVIEW side serial communication is very easy using NI's VISA, which has simple functions to configure, read from, and write to a serial port.
10-18-2013 03:37 PM - edited 10-18-2013 03:38 PM
The mid level pics (16fxxx) have built in interface ports (serial, I2S, I2C) as well as a truck load of general IO pins, 10bit A/Ds, and PWM outputs. All for around a buck. After reading more in the arduino links, it looks like it is communicating via a serial port, I would have to check what those PWM pins go to but I would bet your paycheck that they are acting like a serial port.
Using one of the little FTDI cables would allow me to get access to that since I can't find a single machine that has a serial port on it anymore. I am getting more reassured that the generic VISA driver will play nice with a circuit like that without much issue.
Time to start breadboarding unless a better answer comes in!