08-25-2021 02:19 AM
I'm using NI (9229) to acquire data from analog sensor and stamped the location and time from GPS using arduino (as attached VI). My problem is with Scan From String function because, it only separate the output according to the defined following formate (Satellites in view: %d Lat/Long: %f %f Date/Time: %<%d/%m/%Y %H:%M:%S%2u>T). However, for any unpredictable input from GPS other than the defined format, it complains.
Kindly, how to solve this issue, or restrict the input to Scan From String function if and only if identical to defined formate.
Great Thanks
Solved! Go to Solution.
08-25-2021 02:30 AM
Hi Emad,
@Emad_NRIAG wrote:
However, for any unpredictable input from GPS other than the defined format, it complains.
Implement some error handling…
ScanFromString has an error output: you just need to use it!
Btw. also get rid of BytesAtPort, especially when your Arduino messages come with a TermChar!
08-25-2021 06:29 AM
Great Thanks, @GerdW. Your suggestions solved my problem 🙂