LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with UART Write

Hello. I am currently working with a GPS module and I need to write data to the GPS to change its update rate and I'm trying to do that using UART, as the GPS is sending data back through UART. Attached pictures shows the data I need to write and the code I tried. I cant seem to figure out why its not working. The array is of U8 type Hexadecimal. One of the NI help guides showed the same thing too.

http://digital.ni.com/public.nsf/allkb/6C24F2F07BC23BB78625722800710865

Download All
0 Kudos
Message 1 of 5
(3,518 Views)

@deepen_solanki wrote:

Hello. I am currently working with a GPS module and I need to write data to the GPS to change its update rate and I'm trying to do that using UART, as the GPS is sending data back through UART. Attached pictures shows the data I need to write and the code I tried. I cant seem to figure out why its not working. The array is of U8 type Hexadecimal. One of the NI help guides showed the same thing too.

http://digital.ni.com/public.nsf/allkb/6C24F2F07BC23BB78625722800710865


Try to Re define your code, In such a way that it will initialize once and then Write data, then wait for sometime based on data availability or poll for Number of Bytes at Port if the Number of Bytes is Greater than 0, then Read

 

This is how you need to Frame a Driver

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 5
(3,512 Views)

Make Sure you are calculating CRC and Appending with the data if Required

You can try communication in Hyperterminal or Putty Software before running in LabVIEW as a Debugging Technique

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 5
(3,502 Views)

I figured it out. I was closing the NI Serial Visa and then re-opening it. That didnt work. I then changed it.

 

Thank you.

0 Kudos
Message 4 of 5
(3,462 Views)

If you are done with your requirement you can mark as solution, it may be your own answer, so that other members wont be providing inputs

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 5 of 5
(3,429 Views)