LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone please help me with some code

Hi i'm designing a chilled mirror hygrometer for my college project. I'm controlling the cooling of the mirror with a thurlby thandar power supply. when the dew point occurs, the mirror fogs up and light being reflected off the mirror reduces. at this point i want to reduce voltage and current to the cooler to keep it at the dew point. i do this by employing case structures which resets the power supply parameters when certain photodiode light detector conditions are met. the problem is the case structures are inside my while loop but the power supply must be configured and initialised outside the loop because if its not it keeps resetting it in a cyclic fashion. can anyone help with this problm or is there a different and better way of doing this. any help would be appreciated i'm fairly stuck. my vi is posted below thanks
0 Kudos
Message 1 of 13
(3,094 Views)
Since all of your vis are not included I can only guess what they do. I think that your "TSX3510P Initialize.vi" performs the communication configuration and that the "TSX3510P Configure.vi" actually writes data to the power supply. What you should do is initialize as you are and then inside your case structures use the "TSX3510P Configure.vi" (probably in conjunction with the "TSX3510P Send Command String.vi") to make the changes only when necessary. You do this inside the case structure where you are currently writing to property nodes so that it will only execute on the appropriate cycles of the loop.
0 Kudos
Message 2 of 13
(3,076 Views)
Hi RyanCork,

I've modified your VI to set the Voltage and Current Limit... Is this what you were after?

Charlie Rodway,
Test Engineer - Goodrich Control Systems.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 3 of 13
(3,063 Views)
Thanks a lot that seem to help, theres one small problem though because there is a default in the case structure it keeps resetting to 10 volts 3 amps everytime it goes through the loop the power suppply doesn't like the continual changing if i take out the default will it mess it up
0 Kudos
Message 4 of 13
(3,038 Views)
Sorry I was actually wrong in what i was saying. What i meant to say is it possible in not resetting the power supply to default settings in the case structure if differential value is within the limits > & < there is no need to continually set the power supply. so can i stop execution until its necessary to change again.
thanks for your help
0 Kudos
Message 5 of 13
(3,026 Views)
Hi RyanCork,

I've updated the VI to update the voltage/current limit only when out of limits.

Charlie Rodway,
Test Engineer - Goodrich Control Systems.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 6 of 13
(3,009 Views)
Top man sandman very impressive work i'm only starting out in Labview so i don't think i would have been able to solve that problem on my own thanks.
0 Kudos
Message 7 of 13
(2,997 Views)
Hi RyanCork,

Ah... just looked at it again - realised that it will set the voltage/current limit *every time* on each loop if it is out of limits.

Fixed the VI so that it will check the previous iteration first and then set the voltage/current limit if it has changed.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 8 of 13
(2,998 Views)
I dont really follow the changes you made but thanks alot. I think diff4 works very well sandman and it was diff 3 that kept setting the voltage when it was inside the limits, but theres a good chance i could be wrong so i saved diff 5 anyway thanks. your help has been top quality
0 Kudos
Message 9 of 13
(2,967 Views)
I dont really follow the changes you made but thanks alot. I think diff4 works very well sandman and it was diff 3 that kept setting the voltage when it was inside the limits, but theres a good chance i could be wrong so i saved diff 5 anyway thanks. your help has been top quality
0 Kudos
Message 10 of 13
(2,968 Views)