05-15-2013 06:56 AM
Hy ya the code is working. Thanx a lot yar. But y havent u set the baud rate n al?
05-15-2013 07:04 AM
If you don't wire those inputs, the values used will be those inside the ()
E.g, the default baud rate is 9600.
So, the configuration values are (here)
I suggest that you unmark that first answer as a solution and mark the answer where Ranjeet_Singh attached the VIs. It may help someone in the future.
Regards.
05-15-2013 09:14 AM
I would like to add that Ranjeet_Singh's VIs are written as standalone VIs. Normally you would only have one place where you configure your serial port and one place where you close it.
05-15-2013 09:18 AM - edited 05-15-2013 09:18 AM
Bill,
Just checkin':
When you say "place", you mean the code?
Because that's what the way I've learned 🙂
05-15-2013 09:32 AM
@joaopam wrote:
Bill,
Just checkin':
When you say "place", you mean the code?
Because that's what the way I've learned 🙂
You are correct. Usually you have just one place in the code where you initialize the serial port. And then one place (usually not in the same place as your init) where you close it.
The rare exception is if you expect something outside of LabVIEW to be using that COM port also. But this is messy and it's better to avoid this if you can.
05-15-2013 11:26 AM - edited 05-15-2013 11:26 AM
Yes, I agree with you.
The messy you've mentioned, I've experienced in my first months with LabVIEW. I don't have good memories with that. 😄
Thanks for the answer.
Regards
05-16-2013 02:45 AM
anyway.. Both the solutions helped me out !!
05-16-2013 03:17 AM
Hi buddy,
Actually in all my application I am using 9600 as baud rate, 8 data bits, no parity and unfortunately labview uses this values as default values so
05-16-2013 03:20 AM - edited 05-16-2013 03:24 AM
Friend billko,
I wrote this by taking into consideration that both the VI is running on 2 different PCs and will run only once i.e. if it either read or write the data from or to serial port then it will stop. As our friend is new in labview I tried to make it as simple as possible
And this is just a sample example and nothing
05-16-2013 12:46 PM
@Ranjeet_Singh wrote:
Friend @billko,
I wrote this by taking into consideration that both the VI is running on 2 different PCs and will run only once i.e. if it either read or write the data from or to serial port then it will stop. As our friend is new in labview I tried to make it as simple as possible
And this is just a sample example and nothing
And that is exactly how I interpreted it. The first thing I mentioned was that I thought you wrote it as two separate standlone VIs. I didn't want to make it sound wrong, I just wanted to make sure he knew your VIs were intended for a specific use. 🙂