09-21-2006 08:01 AM
Hi Mike,
According to this vi, you're not getting any data back from the second Visa Read vi? Is this correct, I thought that you had said that it was appearing here, just not parsing correctly?
Can you just double check that you saved all the defaults correctly, just so I know which bit of the code is causing us the problem
Hopefully we'll get there soon!
Thanks
Hannah
NIUK & Ireland
10-02-2006 03:33 PM
Hi Hannah,
Apologies for the late reply, I had a change in my shift pattern, and was difficult to get any time on this problem.
I have re-evaluated what is going on and there is a strange thing happening.
When I ran my original opened code, I put a 'probe' onto the output from the 'VISA Reads', that was what showed an output from both VISA reads.
When I ran your modified coding, the first value is displayed in the 1st Read Output, but 2nd Read output stays blank. If I put a 'probe' on that wire, it shows the correct value in the probe box! So it reads in the probe box, but not on the display.
Any ideas?
Mike
10-04-2006 06:40 AM
Hi Mike,
I've realised I have been a bit dense with this, the VISA reads are both fine - if you make the '2nd Read Output' indicator a bit bigger (more than one line) - then you'll see that the string is returned correctly as expected (it starts with a new line, hence we can't see it on the smaller 1 line displaying control)!
Ok - so the problem is with the regular expression and pattern matching rather than the VISA communications. I've taken a look at this in more detail, and have changed the regular expression that is being used, and now the string is returning as expected. Basically, it was first looking for 2 newline characters - but the 'Vol' string only has one.
Take a look at the modified vi, which should hopefully work fine now. I'm still not sure why the instrument I/O assistant is generating incorrect code - I'm escalating this to our R&D department and will let you know what I find.
Sorry that this has taken a while - but hopefully you can get up and running with some coding now.
Please let me know if you have any questions, or have any more issues with your instrument communications.
Regards
Hannah
NIUK & Ireland
10-05-2006 03:35 AM
Hi Mike,
I've taken another look at the code, and I think I've spotted the issue. The instrument I/O assistant is generating the code correctly, for what is specified in the 'Select Instrument' step. You've specified the termination character as '\r' and I think that for your instrument the termination character between each message should actually be '\n'.
Can you try and set up the instrument I/O assistant using '\n' as the termination character and let me know if this works?
Regards
Hannah
NIUK & Ireland
10-05-2006 11:27 AM