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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Having problems changing sample rate from 1 HZ to 10 Hz myRIO - PmodGPS

Here is the code pertaining only to the GPS.

 

I'm getting the same error message with the GPS only as I am with the whole program. (see earlier attachements for the other code).

0 Kudos
Message 11 of 21
(1,269 Views)

After messing with the program for a little while, I see the error is coming from my VISA reader just inside of my loop.

 

I did some searching online and found that my serial port and device may not be configured the same.

 

I opened Measurement and Automation explorer to check out what is going on. It appears that my port is stlill configured at 9600 but now the program is at 38400 (is that right?)

 

Port_config.GIF

 

I opened the VISA test panel and I'm getting the following error

Measurement and automation explorer.GIF

0 Kudos
Message 12 of 21
(1,263 Views)
I can't look at the program - posting from my phone.

The settings in MAX are irrelevant. The program is not supposed to change them. The error happens because you can't open the serial port from two different programs. Your LabVIEW program has to close first.
0 Kudos
Message 13 of 21
(1,251 Views)

What about not being able to access or read the ASRL10::instr "LPT1" ?

 

Both of my computers have this issue. My desk top has COM1 and 2. I can change the Baud rate on those. But I cannot get into the ASRL10::Instr "LPT1" in either computer

0 Kudos
Message 14 of 21
(1,248 Views)

That is because it is on a real-time target like your myRIO

0 Kudos
Message 15 of 21
(1,236 Views)

So, what do I need to change or add to get this code to work, in order to change the sampling rate?

0 Kudos
Message 16 of 21
(1,231 Views)
LPT1 is a printer port. Don't attempt to use something that physically doesn't exist.
0 Kudos
Message 17 of 21
(1,223 Views)
Ok, so I will ignore all of the measurement stuff, but then I'm back to where I started. How do I change the frequency?
0 Kudos
Message 18 of 21
(1,211 Views)

I found a thread with someone having a similiar issue. Here is what he did.

 

"

My solution..

My program use wait on event triggered by the termination character and when the error occurs I just remove the error, flush the buffer, (wait for the next termination character) and read again. Seems to work like a charm

"

 

Is this a valid solution? Also, I don't understand what he is saying. How do you "just remove the error"?

 

(Here is the link http://forums.ni.com/t5/LabVIEW/Error-1073807253/td-p/306687/highlight/true/page/2

0 Kudos
Message 19 of 21
(1,199 Views)

@cwestfall wrote:

I found a thread with someone having a similiar issue. Here is what he did.

 

"

My solution..

My program use wait on event triggered by the termination character and when the error occurs I just remove the error, flush the buffer, (wait for the next termination character) and read again. Seems to work like a charm

"

 

Is this a valid solution? Also, I don't understand what he is saying. How do you "just remove the error"?

 

(Here is the link http://forums.ni.com/t5/LabVIEW/Error-1073807253/td-p/306687/highlight/true/page/2


I'm not sure how this is relevant to the changing the sample rate. Are you getting Error -1073807253 on the VISA Read call? I'd take a look at this article if you are:

http://digital.ni.com/public.nsf/allkb/F3E0621CB71AA16786256F970000FC57?OpenDocument

Daniel C.
Applications Engineer
National Instruments
0 Kudos
Message 20 of 21
(1,159 Views)