06-26-2015 06:58 AM
I made the proteus simulation and labview programme for interfacing between them using Rs232 .but when i used virtual serial ports emulator programme for interfacing between labview program and proteus for making sure that my simulation is fine before going through hardware part ,I'm not getting the string or any value from the proteus to labview.
I need to read the temperature from proteus and display that value to labview,and other parameter to be read are current,voltage..
I also need to write the value to microcontroller for various control mechanism in my project from the labview
The microcontroller using is pic16f877a.
Below i attached my labview and proteus simulation and program code.
Thanks.
06-26-2015
01:09 PM
- last edited on
12-10-2024
02:27 PM
by
Content Cleaner
It doesn't look like you are using any of your error clusters... this is a big no-no. You need to propogate the errors through your code and wiring them also makes sure your code is running in the right order.
In your first case structure you have the VISA Open and VISA Read right next to each other without their error clusters wired. This means that the Open is not necessarily happening before the Read.
(You are also only reading 1 byte there, I don't know if that was intended, but you might need to read more than 1 byte.)
Your timeout on your VISA is set to "4294967295". You might want to lower that so that your code doesn't just sit. Timeouts are helpful as long as they're set reasonably.
Handle your error clusters and give it a try again to see if that fixes anything.
Edit: looking back at your code, that first 1 byte read mixed with your Open/Read situation is probably your issue if everything else is set up correctly. You're reading 1 byte and then parsing it in to a bunch of other information, which means 1 byte is not enough. Set your timeout higher and read more bytes. If not enough bytes come in, it will timeout and give you whatever did come in. Ideally you would know how many bytes you're looking for.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
06-29-2015 07:36 AM
could you please send me the corrected labview program that i attached what you told me to correct because I am not able to understand correctly or completely what you just said.
It would be realy appericiate if you could do it and send me and i don't think that it will take more time of yours.
Thanks in advance
06-29-2015
09:37 AM
- last edited on
12-10-2024
02:28 PM
by
Content Cleaner
Well, it sounds like you need to further develop your LabVIEW skills, even the basic understanding. Try checking out the Core 1 and/or Core 2 training. SixClear was how I learned the basics.
I'm not going to rewrite your code for you, but here's a snippet of what I'm talking about. I have no way of knowing if this will fix your problems, but it's a good start.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'