LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UART to DAQ

Solved!
Go to solution

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. 11086667_830793177004780_129222214_n.jpg11267656_830793097004788_704944805_n.jpg

0 Kudos
Message 1 of 21
(6,017 Views)

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.

0 Kudos
Message 2 of 21
(6,014 Views)

@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. 

0 Kudos
Message 3 of 21
(6,010 Views)
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.
0 Kudos
Message 4 of 21
(6,002 Views)

@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? 

0 Kudos
Message 5 of 21
(5,973 Views)
You have access to whatever the driver provides. You have attached a manual or even the make and model of the driver. I have no idea how you connect the motors or even the serial cable since its not the normal db9 connector.
0 Kudos
Message 6 of 21
(5,963 Views)

@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)

 

jerzewski-power.png

 

Here is the link to this document: http://jan.eaglecreekobservatory.org/pinouts.html

 

0 Kudos
Message 7 of 21
(5,956 Views)
Chembo,

The image of the driver's UART port is nothing like the rj type connectors that you are describing. Why do you think the interface is a Meade telescope?
0 Kudos
Message 8 of 21
(5,942 Views)

@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.

 

0 Kudos
Message 9 of 21
(5,928 Views)

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 🙂 

0 Kudos
Message 10 of 21
(5,911 Views)