LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

no I/O assistant indicator data output

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

0 Kudos
Message 11 of 15
(831 Views)

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

 

0 Kudos
Message 12 of 15
(811 Views)

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

0 Kudos
Message 13 of 15
(795 Views)

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

0 Kudos
Message 14 of 15
(786 Views)
Hi Hannah,
 
Thanks for the returned code,  will investigate it, and try and modify it soon.
As for using a \n command in the Instrument I/O Assistant, that is what the default was, and I kept getting a 'Timeout expired before operation completed' unless I use anything except a \r terminator.
Just a reminder that 'Value' box in the I/O assistant after an auto parse shows the correct value with no leading spaces. So there is a difference between the shown value in I/O assist and the output value after closing the assistant.
I have tried the I/O assist again and the values shown after a 'Read and Parse' all show correctly for all reads after the write command.
For information, the Binary representation window shows a '0A' before the data and a '0D' after.
Cheers,
 
Mike
0 Kudos
Message 15 of 15
(779 Views)