LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to separate two GPS signal in one COM Port

Thanks for replying!

Did you mean 'write characters to file'?     I'm using version 7.1.

0 Kudos
Message 41 of 60
(1,745 Views)
Go to the File I/O palette. The is a VI called "Write Characters To File", that takes a path and a string. The string is written to the file indicated in path.


You'd probably want to generate the path automatically. Build a string with a date and time in it with "Format Date/Time String" (in "Time & Dialog" palette). Convert this to a path with the "Path To String" function (String>String/Array/Path Conversion), or use "Build Path" in the File I/O palette.


Regards,


Wiebe.



0 Kudos
Message 42 of 60
(1,739 Views)
Am I right to say that i'm suppose to bundle all the outputs (time, alt, lat , long) together then connect it to a "write character to file" and it will output it to a text file?
Another problem is that altitude is found only in gpgga format while date is only in gpmrc format. This two are as different case in the main garmin.vi, hence what should be the the procedure to link the two together as a single text file?
 
Thanks!
0 Kudos
Message 43 of 60
(1,726 Views)
> Am I right to say that i'm suppose to bundle all the outputs (time, alt,
lat , long) together then connect it to a "write character to file" and
it will output it to a text file?

No. Use Format Into String in the string palette. Wire that string to "Write
Characters To File". If you do it like this, you get binary data in the
file, not text.

If the VI main garmin.vi (I'm not familiar with it) returns strings, you can
also use the "concatenate string" function. If this is the case you might
get away with the bundle approach, but it's not very nice programming.

> Another problem is that altitude is found only in gpgga format while date
is only in gpmrc format. This two are as different case in the main
garmin.vi, hence what should be the the procedure to link the two
together as a single text file?

Make a sub VI that waits for both messages (use the main garmin.vi twice).
Put the results in the Format Into String function.

Or use (a copy of) the main garmin.vi to build your own vi, that stops once
it received the two messages. Put the results in the Format Into String
function.

Regards,

Wiebe.


0 Kudos
Message 44 of 60
(1,720 Views)
Sorry i'm really new to labview, is it possible to elaborate on the steps! I need it to have a button on the main garmin VI whereby it will create the text file everytime it's being pressed. Thanks in advance! 😉
0 Kudos
Message 45 of 60
(1,703 Views)
What I described is pretty much the best I can do without making the code
for you. And I'm not going to make it for you (because you wouldn't learn
anything).

Can you describe what the first problem is that you run into?

Did you take any course, or read any books or online tutorials? You really
should.

Regards,

Wiebe.


0 Kudos
Message 46 of 60
(1,698 Views)

Hi, I totally agree with you that I should do it myself! I think I phrase my question wrongly!

 I have tried and I managed to obtain the text file but my prob now is whether I can make it so that it will only sample the readings when I toggle a 'button'?

0 Kudos
Message 47 of 60
(1,675 Views)
Search the examples for "event structure". Once you get the hang of this,
you'll leap forward in your possibilities (and get a few new problems as
well).

A simple way to do this is to wire a case structure to the button. Make the
button "Latch when released" (right click the control, "Mechanical Action"),
so it will only be true once.

We're all glad to help, so don't be shy with your questions.

Regards,

Wiebe.


0 Kudos
Message 48 of 60
(1,670 Views)
Thanks! I managed to obtain the function! 😉
Will continue to work on the remaining parts. Really thanks for your help!
 
0 Kudos
Message 49 of 60
(1,653 Views)
Hi I'm back! I found a prob that is my gpmrc time is one sec faster than gpggc one! Anyway to resolve this?
0 Kudos
Message 50 of 60
(1,637 Views)