10-17-2011 04:12 AM
sir here i am attaching the vi file including all the dependencies..
so u can verify the code from this folder named a1.zip
10-17-2011 04:17 AM
sir
The above attached folder doesn't contains all the dependet files..so i am attaching new folder and sending again..please refer the latest folder for checking0 the code of my project.
10-17-2011 05:10 AM - edited 10-17-2011 05:13 AM
Sir
In a hurry to get reply from you i have attached the files partially so please ignore the above 3 (attachments) posts and refer the latest attached folder(ars.zip) to view the code of my project that contains all the depending files with it..
10-17-2011 09:58 AM
While I sympathize with your need for "hurry" you should understand that I don't really share that need. I, like most people on this forum, am a volunteer. I have a full-time job, and on weekends I try to have a real life. As much as that's possible. If you are in need of immediate assistance, then you need to contact NI Tech Support directly. Public forums are not the avenue for immediate assistance.
That said, your VI..... where do I start? Well, I can say that 1000 word aren't going to be nearly enough to describe it. Your wiring is a complete mess. If you want people to understand your code you have to program properly. Whether it's text-based code or graphical programming it doesn't matter. Easy to read code translates into easy to debug code and easy to modify code. Your code is none of that.
The issue:
See attached cleanup of your code for a starting point for a much cleaner and easier to debug program.
Now, as to the original problem, which is the timeout issue, your the VISA Configure Serial Port will, by default, set up the VISA session so a VISA Read will stop reading once it sees the termination character or it reads the number of bytes you tell it to read. The default termination character is a linefeed. You can enable/disable termination and you can also set the termination character. You have to look at the documentation for your reader to see what character, if any, is used to indicate the end of the serial number. It may not be a linefeed. It may be a carriage return. If that's the case, you need to wire the appropriate value to the "termination charater" input of the VISA Configure Serial Port VI. That input is a numeric value, which corresponds to the ASCII code of the character that is used to indicate the end of the message. A linefeed has an ASCII code of decimal 10. A carriage return has an ASCII code of decimal 13.
10-18-2011 08:25 AM
Hello sir
Thank u very much for briefly describing the dos and don'ts in my project and about the code complexity.which helps me a lot to modify it in a simple way and to know about some new vi modules..and i am sure from now i will use the related vi modules effectively to write code efficiently..as u mentioned in the previous mail i have tried to configure visa serial port with termination char by giving a value 13 and enabled terminal char..
but still it is showing the same error as timeout expired before operation completed.
when i tried to read the card in the labview help example vi that named "advanced serial write and read.vi" it is reading the card as \020B0070CAC1\r\n
and can you tell me on which basis we will give byte count to visa read,and how it varies.
so help me out in clearing the mentioned error
Thank u