LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Touble with real time channel update and single channel switching modifications to Agilent 34790A Example

Solved!
Go to solution

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.

 

Thanks,

Yusif 

 

 

0 Kudos
Message 1 of 10
(2,958 Views)

Here is my attempt at joining the two; currently the channel update is not successfully going through.

0 Kudos
Message 2 of 10
(2,949 Views)

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?

 

Thanks,

Yusif Nurizade

0 Kudos
Message 3 of 10
(2,924 Views)

Hi Yusif,

 

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!.

 

Regards,

Kira T

0 Kudos
Message 4 of 10
(2,915 Views)

Kira,

 

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.

Yusif Nurizade

0 Kudos
Message 5 of 10
(2,911 Views)

My apologies. I attached the old version of the Only_Volt VI. Here is the updated one I was talking about.

0 Kudos
Message 6 of 10
(2,904 Views)
Hi Yusif,

Will you please post a screen shot of the block diagram showing where you have place the probes that are updating and not updating.   Also, just to clarify, you would like the list to update as the users change the input?  Thanks.
Regards,
Kira T
0 Kudos
Message 7 of 10
(2,902 Views)

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,

Yusif Nurizade

0 Kudos
Message 8 of 10
(2,898 Views)

Yusif,

 

How are you verifying that you are not sending the new string with the correct channels to read to the instrument? 

 

Regards,

Kira T

0 Kudos
Message 9 of 10
(2,874 Views)
Solution
Accepted by topic author Akello

Kira,

 

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,

Yusif 

0 Kudos
Message 10 of 10
(2,862 Views)