07-22-2009 08:22 AM
07-22-2009 08:30 AM
Here is the VI that I am using, it was an example vi that came with the converter and I modified it with a while loop; timer; and file i/o. I have also attached the log file so you can see what I mean about losing characters.
07-22-2009 11:07 PM
07-23-2009 07:06 AM
I am quite new to all of this and I am sure that my vi has some unorthodox things going on. I appreciate any comments that you can give to me the design of this VI; I have 1 week on lab view so far, I am as green as they come. So, I will move the set serial stuff outside the loop, and also I will move the visa close outside loop and see what happens. I will report back today. Thanks for the reply, I was really at a loss for answers.
07-23-2009 08:06 AM
Also be aware, while 256 bytes may be perfect for the *idn command, it's not going to work for some other commands. You can wire the Bytes at Port directly to the Read function. Put a wait after the Write, such as 10 to 50mS.
08-06-2009 09:28 AM
Well, it turns out to be the *idn? command that is messing things up. If I only use the Prologix commands, I get the measurement everytime, nice and stable.
This string does not work:
*idn?
++auto 0
++addr 17
++read eoi
This string works good:
++auto 0
++addr 17
++read eoi
So also I think that I only need to issue these commands outside the while loop; does that sound right. Now they are inside the loop and get written everytime. Can I just issue these once, and then continue to read inside the loop?
08-06-2009 09:45 AM - edited 08-06-2009 09:46 AM
How is the Write initiated? When the user starts the program? If it happens once per running the VI, and that's the end of it, then yes, put the Write outside the loop. There are several architectures which will work, but it depends on the purpose of the VI: To have the write sent upon pressing a button, put the Write inside the loop, but within a case statement which is triggered with a latch-type boolean button (so that it fires once per button click). Ultimately, you'll be better served with a State Machine, or Event Structure. To do write/reads properly, you need to get comfortable with these architectures.
Genesis712009 wrote:...
So also I think that I only need to issue these commands outside the while loop; does that sound right. Now they are inside the loop and get written everytime. Can I just issue these once, and then continue to read inside the loop?
08-06-2009 09:52 AM
08-06-2009 12:36 PM
You'll generally get better help if you post a VI; otherwise, you'll get very general broad answers like my last one!
08-10-2009 02:12 PM