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: 

hightlight

Solved!
Go to solution

Hi all,

 

I have created a program that reads two devices in sequence. When I use highlighted mode the both sequence runs and give me the right output; but when I do a normal run it doesn't give me any result for the first case but it gives me a correct result for the second case. I try to put delay before it reads the device but it seems not to be helpful. The other thing is I try to match the baud rate for both devices to the computer parity setting; it still give me an error. Do I have use the same parity?  Can anybody help me with this please?I have attached the code

 

Thank you

 

0 Kudos
Message 1 of 13
(2,881 Views)

I haven't looked at your VI, the delay most likely needs to be after the first read.

0 Kudos
Message 2 of 13
(2,868 Views)

I have tried to put before read it but it gives me this kind of character ō. 

0 Kudos
Message 3 of 13
(2,857 Views)

Maybe your delay isn't long enough. Running in highlight mode creates a very long delay.

 

I don't understand your question regarding parity. Of course parity has to match.

 

I do have one question regarding your code: looking at it I highly suspect you're using the Run Continuously button in the toolbar. Are you? If so, STOP. Using the Run Continously is equivalent to stopping and starting your VI each and every time. That mode is intended to be used only for specific debugging operations. Frankly, I think it should be gone from the toolbar. Write your VI so that you have a while loop that runs, which you stop using a front panel button. Put all configuration and closing of the serial port outside the loop so you don't configure each and every time you iterate.

0 Kudos
Message 4 of 13
(2,828 Views)

Regarding Parity what I meant is I set up both my devices to Even and the Computer Commuication Port as well. I put up to 5secs delay time that seems not to solve it, and I don't use Countinously Run I just use Run each time. I had While Loop before which seems to not helping me. I tried puting the closing serial port outside of the loop; and none of this seems to be not working.

0 Kudos
Message 5 of 13
(2,807 Views)

I don't know how to fix this problem anybody knows

 

 

0 Kudos
Message 6 of 13
(2,784 Views)

A framing error is typically due to wrong buad rate or some other serial port setting.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 13
(2,773 Views)

@gltfrs wrote:

I don't know how to fix this problem anybody knows


The question about framing error gets asked A LOT. Did you search? NI even wrote an article because it gets asked so many times:

http://digital.ni.com/public.nsf/allkb/13A20C0F9DF265FB86256FC60066D9C2

0 Kudos
Message 8 of 13
(2,765 Views)

That seems to be not fixing. All the Port setting match with these two devices.

0 Kudos
Message 9 of 13
(2,760 Views)

Swap cables... try a good shielded serial cable, or move where you've got the cable you have now.  If you've got it next to something like a motor or motor controller, you're going to have a lot of electrical noise there that can wreak havoc on instruments/computers. 

0 Kudos
Message 10 of 13
(2,753 Views)