01-08-2022 04:32 PM
I am currently working with a NI USB-6343 DAQ device and am attempting to have it communicate with a separate ARM microcontroller. My plan is to have designated digital pins connected to the UART pins of the microcontroller. My question is how in labview do I set up this serial read and write tools? Do I use the VISA toolkit or is it even possible?
01-08-2022 06:10 PM
You are not going to get that to work with a DAQ. All you need is a simple RS-232 port for your computer and possibly a 232-TTL or 232-LVTTL converter (depending on your controller). Then it is simple work with VISA on the LabVIEW side (VIWeek 2020/Proper way to communicate over serial).
01-08-2022 06:30 PM
So, you're saying that I am not able to physically connect the digital output port of the DAQ in a serial tranmission manner but only through an rs-232 ports straight from my computer will that be able to happen. Do you think it will be possible instead to setup a data bus from multiple digital pins on the DAQ to connect with general IO pins on the controller port?
01-08-2022 07:01 PM
USB 6343 have only general-purpose DIO, if you were to implement some sort of serial communication using this GPIO, you have to implement the protocol and time it properly, like bit-bang if I have to say in microcontroller terms.
You're better off with a dedicated USB-UART/RS232 converter to make things easy.
01-09-2022 06:34 AM
@santo_13 wrote:
USB 6343 have only general-purpose DIO, if you were to implement some sort of serial communication using this GPIO, you have to implement the protocol and time it properly, like bit-bang if I have to say in microcontroller terms.
And the DIO are software timed, which means you will not be able to consistently get the timing right. A UART port is the proper tool for this job. I am personally a fan of StarTech. If you want a cheaper option, I have had a lot of success at home with a couple of Trendnet TU-S9. These have RS-232 outputs. So if your microcontroller wants TTL or LVTTL, you will need to convert it (BB-232LPTTL for TLL, BB-232LPTTL33 for LVTTL).
01-09-2022 11:29 AM
Looks like Port0 has hardware timing capability up to 1MHz and other ports only static (no way to define the timing exactly between two state changes on a GPIO pin)
Even in this case, I would not recommend using 6343 for anything serial communication protocol. You can save time and effort by getting a USB-UART or 232 cable/convertor.
You can even get NI USB-232 - https://www.ni.com/en-us/support/model.usb-232.html