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.
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.
07-30-2012 02:56 PM
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
Solved! Go to Solution.
07-30-2012 03:01 PM
I haven't looked at your VI, the delay most likely needs to be after the first read.
07-30-2012 03:15 PM
I have tried to put before read it but it gives me this kind of character Å.
07-30-2012 04:20 PM
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.
07-31-2012 09:42 AM
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.
07-31-2012 11:41 AM
I don't know how to fix this problem anybody knows
07-31-2012 12:00 PM
A framing error is typically due to wrong buad rate or some other serial port setting.
07-31-2012 12:56 PM
@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
07-31-2012 01:16 PM
That seems to be not fixing. All the Port setting match with these two devices.
07-31-2012 01:27 PM
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.