取消
显示结果 
搜索替代 
您的意思是: 

hightlight

已解决!
转到解答

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 项奖励
1 条消息(共 13 条)
3,878 次查看

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

0 项奖励
2 条消息(共 13 条)
3,865 次查看

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

0 项奖励
3 条消息(共 13 条)
3,854 次查看

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 项奖励
4 条消息(共 13 条)
3,825 次查看

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 项奖励
5 条消息(共 13 条)
3,804 次查看

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

 

 

0 项奖励
6 条消息(共 13 条)
3,781 次查看

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



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 项奖励
7 条消息(共 13 条)
3,770 次查看

@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 项奖励
8 条消息(共 13 条)
3,762 次查看

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

0 项奖励
9 条消息(共 13 条)
3,757 次查看

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 项奖励
10 条消息(共 13 条)
3,750 次查看