05-18-2012 02:00 PM - edited 05-18-2012 02:01 PM
I'm trying to control an Agilent 34790A via LabVIEW. I've made two sets of adjustments to the Advanced Scan example that I got off the driver but I can't make them work together.
The first adjustment is to update the channels selected in real-time as opposed to having to stop the VI running to input new ones. The second modification I made is to make it so that the instrument doesn't switch when only one channel is selected. The instrument switches the channel to initialize once at the beginning but because it isn't cycling between different channels doesn't need to initialize.
The two modifications work just fine on their own (each was built off the Advanced Scan example with some indicators for readings added identically to both) but putting them together is proving quite a challenge. I know it was foolish to do them seperately; it started out as a mistake I ran with. I thought I could just bring one modification into the VI of the other but that is not the case.
I've attached both independant modifications would really appreciate some advice.
Solved! Go to Solution.
05-18-2012 02:49 PM
Here is my attempt at joining the two; currently the channel update is not successfully going through.
05-21-2012 08:38 AM
Would really appreciate some advice. I've attached several probes to the last attachment and narrowed the problem down to the the inner while loop as it goes to the case structure inside it. When I update the channel list, a probe of the string shows it is being updated but nothing is happening so the actual process of reconfiguring which channels to scan is not going though. What could be the problem?
05-21-2012 10:22 AM
It would be helpful if you could attach a screen shot of where you see the update on the probe and where you dont see the update with some captions and drawings. This will help us to understand where you have narrowed the problem to. It could be caused by the use of nested while loops, but it is hard to tell without some more information. Thanks!.
05-21-2012 11:00 AM
Thanks so much for the quick reply. I've attached two snapshots of the front panels that include captions that should explain the problem I am having. I've labelled the string indicators to reflect their position on the block diagram but please let me know if you would like me to attach a screenshot of the block diagram as well. I've also attached a VI I made that tries to simplify things by keeping only one of the loops. The results I get are the same; the single channel runs as it was meant to and there are no errors (in LabIEW or the instrument) but the channels to not update in real time.
I really appreciate the help, been racking my mind for some time now.
05-21-2012 11:26 AM
My apologies. I attached the old version of the Only_Volt VI. Here is the updated one I was talking about.
05-21-2012 12:28 PM
05-21-2012 12:52 PM - edited 05-21-2012 12:58 PM
Ofcourse. I used string indicators instead of actual probes in this case, made for easier viewing.
You are correct. I need the channels to update in real-time rather than having to stop the VI and enter a new channel list. The multiple loop VI that I initially included accomplished this but without the addition of the modification that allows for only one switch at initialization when a single channel is selected. Foolishly I did this in peices and hoped that it would come together and was hit with the reality last week.
Hope to hear back from you,
05-21-2012 04:17 PM
How are you verifying that you are not sending the new string with the correct channels to read to the instrument?
05-22-2012 08:38 AM
In the original VI I had posted, the string indicator inside the loop that contained all the subVIs provided in the example (besides the initial channel configure) would not display the updated channel list. I actually solved the problem yesterday and would be happy to share it with anyone that was interested:
The issue was that I was originally setting the conditional of the single channel modification based on the number of iterations of the while loop. If there was only one channel the case structure reverted to wires running straight across, circumventing the two subVIs in the 0 case, and so no change was possible. The key was to switch the conditional of the case structure to be a true/false containing the same objects as the original. The true case would depend on the input string being 3 characters long, not empty and the same as it was in the iteration previous thereby setting up the exact condition where a single channel did not change. The VI currently works exactly like I wanted it to minus some messy programming I will be cleaning up today.
If my solution is unclear or someone would like to see the VI please message me.
Thank you for the help,