05-13-2015 08:44 AM
Hello,
I am new to LABVIEW, and I'm currently working on my final year project.
So basically I have a stepper motro driver that has a UART port. Now, in order for me to interface the motor with LABVIEW I will need to connect the motor via the driver via the UART port to the DAQ right? So my question basically is how do I do that? Is there are special cable? If yes, can you guys please paste links that could help me choose one. If no, then please help me find a solution to this. I need to get this project done in a week.
Also, if you guys know of any tutorials where I can easily learn how to setup a PID controller on LABVIEW and also code my control algorithm (if that's even possible in LABVIEW) please paste those tutorial links here too.
Appreciate the help. And God Bless.
Peace.
Solved! Go to Solution.
05-13-2015 08:46 AM
You should look up serial communications in LabVIEW rather than focusing on DAQ.
A quick google search for PID in LabVIEW will give you the tutorial you're asking for.
05-13-2015 08:49 AM - edited 05-13-2015 08:49 AM
@natasftw wrote:
You should look up serial communications in LabVIEW rather than focusing on DAQ.
A quick google search for PID in LabVIEW will give you the tutorial you're asking for.
Thanks, but could you elaborate more about the serial communication? As in, what do you mean by focusing more on serial communcation as opposed to focusing on the DAQ.
I apologize if you have to explain more..I'm kinda new to all this.
05-13-2015 09:11 AM
05-13-2015 10:48 PM - edited 05-13-2015 10:55 PM
@Dennis_Knutson wrote:
A UART is used to implement RS232 communication (also called serial). In LabVIEW, you use VISA functions to communicate to a device that is connected to your pc's serial port with an appropriate cable of which there are two general types. There are USB-RS232 converters available if your pc does not have a built-in port. There are numerous terminal emulator programs, such as putty, that you can use for debug purposes before you write any LabVIEW code.
In this forum, DAQ refers to the specialized data acquisition devices from NI and is not related at all to your setup.
Hey thanks for responding.
So you're suggesting I use the USB-RS232 converter to connect my laptop to my driver. I know of converters like this.
I'm still confused, but please correct if I'm wrong so..using the VISA function, I have access to the driver of my motor via the USB - RS232 converter?
05-13-2015 11:14 PM
05-13-2015 11:32 PM
@NahidIIUM wrote:
............ Is there are special cable? If yes, can you guys please paste links that could help me choose one. If no, then please help me find a solution to this. I need to get this project done in a week.
.................
You probably need to make the cable. This picture may help. On your board the GND pin is #3 NOT #4, So you need to connect PC side pin #5 to your board #3 (GND)
Here is the link to this document: http://jan.eaglecreekobservatory.org/pinouts.html
05-14-2015 01:22 AM
05-14-2015 02:06 AM
@Dennis_Knutson wrote:
Chembo,
The image of the driver'sUART port is nothing like therj type connectors that you are describing. Why do you think the interface is a Meade telescope?
Dennis,
I didn't say anything about RJ connector. Maybe my posting is a little bit misleading, but I was trying to show how the pins can be connected, nothing else.
The right side shows a standard PC DSub 9pin connector (RX, TX. GND). And the left side shows the connection to the board. The picture of the board (first message of this thread) shows clearly RX, TX, Gnd, and NC labels next to the connector.
05-14-2015 05:31 AM
Hey guys, I am not sure if I've made myself clear yet. I apologize for the confusion. Also maybe because I am sorta confused. I'm not exactly sure what you guys are talking about lol
Anyways, please correct me if I'm wrong and you'll probably have to spell it ou if I am but:
From what I understand,
Inorder for me to connect my driver (that has a UART port) to my laptop, I will need a USB - UART converter. like this one (http://www.cytron.com.my/p-uc00a)
After doing so, I am assuming that I can now send commands to the motor (via the driver mentioned above) from LabVIEW using the VISA block.
Is this right?
I need to know for sure because I have to buy a converter ASAP and I don't want it to go to waste.
Thank you guys for your time. I really appreciate it 🙂