03-01-2013 04:52 AM - edited 03-01-2013 04:54 AM
Hi,
i try to use two DC Power supply HP e3631a for timed Switching with funktion like this:
DC Power Supply #1 on,enable only one channel with output 3.5 V ,DC Power Supply #2 all output off ,and runing VI for 30s,then
DC Power Supply #2 on,enable three output 1V ,+18v,-18v, DC Power Supply #1 channel off, runing VI for 20s,further periodically running like this....
i want to using timed swtiching case structure for controlling this periodically implement,but results is wrong because it doesn‘t switch exactly after 30s or 20s,here i post my code,if f anyone can give me some ideas that would be appreciated.
03-01-2013 05:03 AM
How close to the 30s and 20s are you getting?
You only need to set the supplies when you are switching cases. There's no need to set them every iteration of your loop. The communications takes time. That could be throwing you off a little bit. I don't have the drivers, but there could be some waits in them to allow for settling.
03-01-2013 05:10 AM
@crossrulz wrote:
How close to the 30s and 20s are you getting?
You only need to set the supplies when you are switching cases. There's no need to set them every iteration of your loop. The communications takes time. That could be throwing you off a little bit. I don't have the drivers, but there could be some waits in them to allow for settling.
thank you for your reply,but i don’t understand what is“ set the supplies when you are switching cases”,can you give me some details?
03-01-2013 06:09 AM
When you switch from Case 1 to Case 2 or Case 2 to Case 1, that is the only time you need to set the supplies. The rest of the iterations you can just read the measurements. You know when you change cases by the Time Elapsed boolean. So put your subVIs that setup the supplies into a case structure.
03-01-2013 09:24 AM - edited 03-01-2013 09:24 AM
@crossrulz wrote:
When you switch from Case 1 to Case 2 or Case 2 to Case 1, that is the only time you need to set the supplies. The rest of the iterations you can just read the measurements. You know when you change cases by the Time Elapsed boolean. So put your subVIs that setup the supplies into a case structure.
thanks for explain in detail,i have another question:why doesn‘t waveform chart correctly display elapsed time with case switching ?
03-01-2013 09:37 AM
There is no reason for it to display an accurate elapsed time. In order for a chart to reflect actual time when you just pass it a scalar, you have to set the offset and multiplier. The offset is the actual start time and the multiplier is the loop time. Look at the shipping example called Real Time Chart.
03-04-2013 09:16 AM
@Dennis_Knutson wrote:
There is no reason for it to display an accurate elapsed time. In order for a chart to reflect actual time when you just pass it a scalar, you have to set the offset and multiplier. The offset is the actual start time and the multiplier is the loop time. Look at the shipping example called Real Time Chart.
hi,i have another question : i am trying to switching between DC Power without same period,und with Array Controller in Attachment i want to switch between different period,for example case1→run 20s→case2→run10s→case1→run15s→case2→run20s→case1.....Array Controller have all Switching time, How to complete this function?
thanks in Advanced.