11-05-2019 08:44 AM
@GerdW wrote:Lots of true stuff...
(With LV2019 you can even wire the error cluster to the case structure selector and choose which error codes to handle.)
This doesn't catch warnings though...
11-05-2019 09:01 AM
@cbutcher wrote:
@RavensFan wrote:
As for your 2nd picture, if you had also attached the VI, it would be easier to know for sure, but my guess is that you have the wrong setting on the Equals comparison. Right click and set the Comparison Mode to Aggregate rather than Elements.
I also suspect the Source string would be populated, so the Equals on the cluster won't work.
GerdW's suggestion to unbundle the code and use Equals on that will work.
You can also use the Clear Errors function, which doesn't require an error (it will also check a warning). Note you have to specify the code to have it output a true value.
As RavensFan said though, perhaps reconsider if you're using Bytes at Port. It's usually unnecessary and causes problems.
Edit: I see you're not using Bytes at Port from your message (you replied whilst I did).
Does the device return a longer error message? If so, make sure to take care of the left-over bits of that message before just blindly repeating. VISA Clear might be appropriate, buta better method would be to specify a larger number of bytes (100, 1000 etc) then use the Termination Character (if it exists) to parse the messages.If you don't have a term char, you're more or less stuck with what you have...
Edit 2: I see you set Term Char false, presumably because you don't get one?
I'd suggest you might want to try creating a VI to receive the entire array and parse it into a cluster, because currently it's quite difficult to follow.
You could of course index only the bits you want, but I'm guessing you intend to use some of the "First subarray" outputs in the future?
Parsing into a cluster would both clarify the message structure and give you executable code in the place of the comment you have on the block diagram.
You could move the comment into the parsing VI, assuming I understand what it means...
This is a lot of good info, Iv'e only been through core 1 and doing this a few months. I will have to mess around with it to parse it into a cluster. I will use some of the subarrays in the future, but really I just broke it down this way because it was easier for me to count what bytes had already been broken off. Also, this VI will be shared to other people who may have a use for grabbing those other bytes of info to suit their needs.
As for the solution to my problem...
I added a byte return count indicator to my connector pane in the G100 and then compare that value to what I should get, then repeat the command if I don't get it. The UUT sometimes throws out less bytes than the 177 that I should get.
Wouldn't have come up with it without everyone's help, thanks!
11-05-2019 10:19 AM
You can add a "Clear specific error" if you want the error wire to be clear of this 'safe to ignore'-error.
/Y