LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA TCPIP is difficult to be established

Solved!
Go to solution

That Configuration(read) --Device settings include most of parameters I need, but still somethings are missing for example "Ramp Rate".

The required sampling frequency is 5Hz.

 

Your VI does not satisfy my need.

Say Temperatures are ramping following a ramp speed of 5K/min from 1.4K to 300K,  Then I have to change the PID based on a PID table by watching the moving setpoint.

 

Anyway, I will modify your VI for repeatedly " Configuration(read) --Device settings" and "Configuration(set) PID" and see what happen.

 

Thanks.

WT

0 Kudos
Message 11 of 17
(1,345 Views)

@weitong wrote:

That Configuration(read) --Device settings include most of parameters I need, but still somethings are missing for example "Ramp Rate".

The required sampling frequency is 5Hz.

 

Your VI does not satisfy my need.

Say Temperatures are ramping following a ramp speed of 5K/min from 1.4K to 300K,  Then I have to change the PID based on a PID table by watching the moving setpoint.

 

Anyway, I will modify your VI for repeatedly " Configuration(read) --Device settings" and "Configuration(set) PID" and see what happen.

 

Thanks.

WT


No, you still did not understand what I try to point out. You should change settings of the device only when needed, and NOT at every iteration! This does not make sense. For example, when you ramp up the temperature, you should ONLY change the PID parameters when you need to, not at EVERY iteration. Lets say, you start with some PID values at 1.4 Kelvin, then you keep these parameters and only doing reading values. When you reached 300 Kelvin, you can change the PID parameters again, but only firing ONCE the required VI. That is why you SHOULD use a proper State Machine with the required condition checks (elapsed time, temperature limits, etc...)!

Do not use the "Configuration(set) PID" VI repeatedly in a While loop! This is just silly if you do not want to change the PID parameters at EVERY iteration (and I do not see any real life scenario when one would do this)...

0 Kudos
Message 12 of 17
(1,341 Views)

As the PID settings, my way is not silly. Please refer to Lakeshore 336 Temperature controller and Cryocon 22C Temperature controller. For whole range of 2K--300K, usually one has to set several domains PID. These Temperature controllers have a PID table function and Ramping capability. If you want to sweep temperature with a speed of 5K/min or set Temperature point by point, the controllers automatic change PIDs by interpolating the PID tables.  Instead of using the controller's PID table, what I am doing is programmatically set PID by interpolating a user defined PID file(table). Of cource I have a rule that every cycle if the last setted PID is the same as this time interpolated PID, it will not be written to the instrument.

PS: the VI your suggested misses some parts.  It contains several channel(Devices).  For example,  one channel for system (VTI chamber), other for sample holder, etc.

捕获3.PNG

0 Kudos
Message 13 of 17
(1,334 Views)

Ok, clear, you can programmatically change PID values, but you need to do so only at certain times when you reach some temperature range limits, yep? So when your temperature is inside a certain interval where you can use a single PID param set, you should NOT change these parameters at EVERY reading iteration. I imagine, at the device hardware level, changing PID parameters requires more time than a simple result read out...?

 

I do not have time to examine your hardware and how exactly the device can be addressed using the driver VIs, but here is just an example with manual PID change, it might give you idea how to use a State Machine...The manual boolean control ("Change PID!") can be replaced by a temperature limit check, so you ONLY fire the PID settings VI when needed, and NOT at every iteration. Fix up the code with missing VIs as needed...But do not forget, the only repeated action should be the simple "Read results" VI...

 

Example_VI_BD_1.png

 

Example_VI_BD_2.png

Message 14 of 17
(1,328 Views)

OK. I will try your suggestions.

Thanks for your enthusiastic answers!

 

WT

LV2013SP1

0 Kudos
Message 15 of 17
(1,322 Views)

Normally, lv will take care of resource release it self. But sometimes it will not be done automatically. You'd better close the connection in your programme and make sure it's executed.

0 Kudos
Message 16 of 17
(1,299 Views)

VISA GPIB resource seems very flexible. I haven't seen this kind of problem(error) even without VISA close in my programs.

VISA TCPIP connection/communication is sensitive.

0 Kudos
Message 17 of 17
(1,291 Views)