Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO GPS serial port interfacing

The code I'm using is identical to the one here http://zone.ni.com/devzone/cda/epd/p/id/2197

I've simply copied the code over onto the cRIO controller without modification, but can't see why it won't work.

I'm not particularly experienced using the cRIO but have been able to get the seiral port working for basic I/O.

Thanks,

Chris

0 Kudos
Message 11 of 16
(1,539 Views)

Hi Chris

 

I have looked at the example you are using, the main code will work fine on your device, but you will need to create a project with your device as a target. Within the project will be your code, your device and the modules you have. A project makes finding dependent code a lot easier, if you would like to send me your code I can take a look at anything you might have added or changed. National Instruments try to offer a number of ways to get support, our website has a lot of tutorials and suggestions to help you with your development, the cRIO page has a lot of resources. There is also a page on serial communications, it doesn't refer to the cRIO specifically, but the practices are good.

 

If you would like to look into where your hardware is referenced in your code and ask any further questions if you come across anything.

 

Thank you

Stephanie L
Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 12 of 16
(1,532 Views)

Sorry I've not been very clear. I've created a project as I've done with many applications I've got running on the cRIO. I've managed to log data from different modules, store them etc etc. I've also run basic serial communication loopback tests within a project on the cRIO and it's worked fine. I've copied the GPS code over in the exact same way (create a new project with a blank VI and then copied and pasted the LabVIEW code into this VI).

I'm using the serial port on a cRIO-9012 (with a 9113 FPGA).

Could it be to do with the GPS hardware? Although it does work when connected directly to the computer I did have to remove an extension cable to get the total length from around 3m to 1.5m. Would the cRIO serial port possibly not work quite as well as the PC Serial port in terms of cable length etc?

I've attached a screenshot of my code. It's exactly the same as the one in the example and has the following settings:

Baud rate - 4800

Parity - None

Data bits - 8

Stop bits - 1

Flow control - None

(All exactly the same as when connected directly to the PC)

Many thanks for your help

Chris

 

0 Kudos
Message 13 of 16
(1,521 Views)

Thank you for filling in those blanks, I have continued to look for some information regarding your GPS serial port issue, but have been able to find any useful suggestions, I have a few ideas and some additional resources to have a look into for now.

 

1) Do you have the same software and versions on your cRIO as you have on the PC?

2) I have checked the specifications against your code and can see nothing that could cause problems, but you may want to double check your serial port specifications and confirm your configuration.

3) I found some previous forums who talk about acquisition rates and types.

At the GPS end, you want to send a bit of data, pause and wait until the cRIO has the data, then send next bit, this is the ideal. "The GPS is constantly sending data which may be part of the problem."

The other suggestion mentioned is to continuously acquire the data from the GPS to ensure that the whole parcel is received.

I recommend that you read through the forum threads to get some confirmation that you are taking the correct steps and some ideas for tests to try.

 

As I have previously mentioned your code seems fine, I can't see anything that would cause any issues, the express vi may slow the process down, but it should still work fine.

 

I have also found some additional examples for you to look into, one is looking at serial communication and the other GPS data.

 

I apologies for not having a direct solution for you, but we will continue working to find the problem, if you could give me a detailed description of what you have attempted and the result you see when trying to implement the code in your next reply, I will have a look at that as well.

 

Thank you

Stephanie L
Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 14 of 16
(1,507 Views)

The software is the same, as is the configuration. It has however been a while since I've tried it on the PC. I'm currently waiting for a serial port adaptor so that I can try it again to double check any differences that I might have. I'll try the other example and follow some of the suggestions and let you know what happens either way.

Thanks again,

Chris

0 Kudos
Message 15 of 16
(1,480 Views)

hi, can i get your cRIO GPS serial port interfacing program..i want try to my project..i'm still new in labview..i have a cRIO9022 and want to integrate with GPS. TQ

0 Kudos
Message 16 of 16
(1,233 Views)