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.
08-12-2021 01:46 AM
Hi All
I am new to labview VI programming.
I want to transfer the data of .text file using VI over the serial port using uart to my embedded device.
I attached the file which I want to transmit.
Please suggest me the possible solutions.
Thanks.
08-12-2021 03:32 AM
If you want to transmit the contents of the file, then you can use LabVIEW's functions to open and read the file, and then transmit using appropriate VISA calls.
You might need to use some of the conversion nodes if those lines are binary 'numbers', rather than ASCII representations of hexadecimal (i.e. the letter 'A' is represented by the number 65 in an ASCII table, but the hexadecimal value A is represented by 10 as a decimal value). See, for example, https://forums.ni.com/t5/LabVIEW/Convert-Hexadecimal-String-to-Byte-Array/td-p/3009131/page/2
If on the other hand you want to copy the file into some embedded device (in the style of, for example, FTP) then you're dependent on the embedded device's capabilities. If this is the case, please let us know some more about the device - does it have any tools/APIs to transfer/store files, or to save the contents of a stream of communication to disk, etc?
10-05-2021 12:57 AM
Actually I am using MSP430 microcontroller as a embedded device. So I have made a GUI from which I wanted to transfer .text file to my controller.
So the file data will store into flash memory.
10-05-2021 08:08 PM
@Madhav241296 wrote:
Actually I am using MSP430 microcontroller as a embedded device. So I have made a GUI from which I wanted to transfer .text file to my controller.
So the file data will store into flash memory.
Things may seem to happen magically when you are an end user, but when you are a software developer, it's your job to make it seem like magic. 😄
Unless the microcontroller has embedded file transfer routines, you'll probably have to write them from scratch.
10-06-2021 04:31 AM
Right now I am in developing the GUI which will transfer the data of file through GUI.
So my idea is to first the take the data from file store into an array and so checksum then transmit it over UART.
But I am facing an issue while reading the data from file.
Actually my file is having 125 rows. Each row containing one hex value for example 0x005432. Likewise total 125 values.
But while reading I am not able to read that on array.
Can you guide me with proper theory or VI example?
10-06-2021 05:03 AM
Hi Madhav,
@MadhavMalaviya wrote:But while reading I am not able to read that on array.
Maybe it would help when you attach your VI and file so we could tell you how to solve this problem!?