LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

what is different between these two VI?

one is a single instument control vi and another("setting" case) is for multiple instruments..
8133_function_block2 works fine, but not true for multiple 8133 control vi.
 
Could someone point out what is wrong???
I looked at the 'HP8133A Voltage Setting.vi' but could not figure out any major error between two VIs.
 
do appreciate your help!
0 Kudos
Message 1 of 7
(2,667 Views)
Part of the problem could be due to incorrect wiring to shift registers. Notice that many of your shift registers are actually not wired but have another tunnel on top of them (move the tunnel to see). Attached is a before and after picture to suggest a better way.
 
(There are probably other problems, I cannot test, because of missing subVIs)
 
 
Your original code:
 
 
Suggested alternative:
 

Message Edited by altenbach on 02-07-2006 05:26 PM

Message Edited by altenbach on 02-07-2006 05:27 PM

Download All
Message 2 of 7
(2,658 Views)

Ah, how many times did I see LabVIEW students encounter this problem when teaching LabVIEW Basics I?  Time for my weekly VI Analyzer plug...the "Hidden Tunnels" test in the VI Analyzer was designed specifically to help people discover this problem (and as a result, not spend a bunch of time debugging it...)  🙂

-D

Message 3 of 7
(2,644 Views)

Thanks for pointing out those errors!

The main problem is the fact that modifying;

- 'delay' sets 'phase'

- 'phase' changes 'duty cycle'

- 'pulse amp' sets 'offset'

I have looked at the block diagram of  'HP8133A voltage setting.vi' but I cannot find anything that is obvious..

perhaps, I made a mistake with text inputs(?)

 

 

0 Kudos
Message 4 of 7
(2,617 Views)
Your problem is the order of the items in the cluster. On your front panel the order is pulse amp, offset, delay, phase, dutcycle. In the driver subVI the order is offset, delay, phase, dutcycle, pulse amp, so that's why things are shifted. You can correct this either by changing the order of the cluster elements on your "Pulse Setting" controls on your front panel or the order of the cluster elements on the driver VI. To reorder the cluster elements right-click on the cluster and select "Reorder Controls in Cluster...". Click the element that you want to be ordinal 0, then the one that you want to be ordinal 1, etc. You can find more detail in the LabVIEW documentation.
0 Kudos
Message 5 of 7
(2,605 Views)
Your cluster elements are ordered differently to what the subVI exepcts. right-click on your clusters are change the ordering.
 
If you delete the bundle going to the HP8133A Application Function_mod.vi and create a control for the input, you'll notice that the elements are ordered as (top to bottom=4,0,1,2,3), whereas your "Pulse settings" clusters are ordered 0,1,2,3,4.
 
Easiest might be to change the order in the subVI. (The image shows the ordering of elements in the subVI (left) and the main VI (right).
 
 

Message Edited by altenbach on 02-08-2006 08:35 AM

0 Kudos
Message 6 of 7
(2,607 Views)

Thank you all for your help!

Best,

0 Kudos
Message 7 of 7
(2,577 Views)