LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization of Temperature Controller with a Keithley

Hello,

 

I have 2 devices: an Eurotherm temp-Controller and a keithley  to apply voltage.

 

I have two separate VIs.

 

Now I want to apply them into 1 VI and then Measure Current against Temperature .

 

I tried using the State Machine concept for this, but I am still getting an error and I am stuck in between.

 

Please could someone take a look at the individual VIs for

Keithley,

Eurotherm

State Machined VI.

 

I am attaching the .llb files and the VI in this post and the next one. Please help.

 

 

Best Regards,
Poulomi Das.
Institute for Microsystems Engineering.
University of Freiburg.
Freiburg, Germany.
Download All
0 Kudos
Message 1 of 8
(3,007 Views)

continuation to above post

Best Regards,
Poulomi Das.
Institute for Microsystems Engineering.
University of Freiburg.
Freiburg, Germany.
Download All
0 Kudos
Message 2 of 8
(3,006 Views)

I'm not familiar with those particular devices and you didn't state what kind of error you are getting but reading through your code, this is what I see it doing:

 

  1. You initialize a serial connection to the Eurotherm [Initialize case]
  2. You initialize a bunch of settings on the Keithley over GPIB [Initialize case]
  3. You initialize a bunch of settings on the Eurotherm [First frame of Eurotherm case]
  4. You calculate the desired step size and loop through each step, sending the new setpoint to the Eurotherm and waiting 500ms before sending the subsequent setpoint. [Second frame of Eurotherm case]
  5. You then sit in a loop monitoring the process value, processor utilization, and alarm state until either an error occurs or the user presses the stop button. At which point you close the connection to the Eurotherm [Third frame of Eurothem case]
  6. You wait until the system clock hits the next multiple of 2000ms.[First frame of Keithley case]
  7. You set the built in voltage source of the Keithley [Second frame of Keithley case]
  8. You take a single reading of the dc current from the Keithley, display it on a graph and indicator, and write it to a file along with the final process value that was read in the third frame of the Eurotherm case. You don't proceed to stop until the system timer is a ms multiple of 1000ms. [Third frame of Keithley case]
  9. The program stops

Each of these steps is sequential. You have implemented a state machine but the state order is always Initialize->Eurotherm->Keithley->Stop so you have basically built a future proofed stacked sequence structure (future proofed in the sense that you can reorder the states, opitonally visit states, or revisit states, much easier due to using a state machine rather than a sequence structure).

 

Does this sound like what you intended for your program to do? In order to plot current vs temperature I would imagine you'd want multiple current and temperature readings. This would require you to operate both devices at the same time either in the same loop or in multiple parallel loops.

 

Hope this helps, good luck.

 

Simon

0 Kudos
Message 3 of 8
(2,991 Views)

Hi Simon,

 

That is exactly my problem.

 

In the steps you have mentioned,

In step 4: the Setpoint Value and Stop temperature are to be taken same, from what I understand. Isn't it so? But the problem is if they are same, it is always sending  FALSE to the smaller case structure and its continuously rotating in that very loop. So the data is not even reaching the last sequence where I can Read the process value, see alarms etc.

 

First doubt is:

 

Should not the stop temp be equal to the setpoint value?

 

Secondly,

In step no.8 of yours, I want to read each temperature and every current value at those temperature(say at a step of 10K ). How can I implement that? When you say putting multiple parallel loops, doesn't it mean using ,say, 2 while loops for 2 separate devices? in that case, does it any longer remain a state machine?

 

Please advice.

Best Regards,
Poulomi Das.
Institute for Microsystems Engineering.
University of Freiburg.
Freiburg, Germany.
0 Kudos
Message 4 of 8
(2,964 Views)

I think the state machine part may be confusing you a little. The states don't run in parallel so your values are never changing. You just sit in a loop computing the same result over and over.

 

You didn't post exact specifications and I don't have any hardware in front of me but I think a simple single loop will work for you. I've made a quick attempt at reorganizing your VI and adding some comments.

 

The loop will execute the specified number of steps and for each step:

  1. Send the new setpoint to the ET3506
  2. Read the current
  3. Read the process value
  4. Check the status of the ET3506 whilst simultaneously writing the current + process value to a line of the spreadsheet file.
  5. If the ET3506 reports an error or the user clicks the stop button the loop will exit
  6. Make sure that at least "Delay in ms" has occured during this step, if not wait the remaining amount of time before moving to the next step
  7. Goto #1.

Since we know how many steps we want to make and what our start and stop temperatures are we don't need to check to see when we should stop -- we know that we have a finite number of steps.

 

I also moved all the initialization code into two subVIs to make the diagram easier to read.

 

 

 

Screen Shot 2013-08-28 at 11.54.40 AM.png

 

I hope this helps. Good luck on the rest of you application.

 

~Simon

Message 5 of 8
(2,953 Views)

Hello,

 

that solution was really helpful but still it is not SYNCHRONIZED: in the sense that, the for-loop is continuously setting the 'next step set point' and lets say

start temp = 390K

Stop T = 450 K

Step = 10K

 

So the for-loop is automatically going to next temp.but in reality NOT WAITING for the ET3504 to get heated and reach the next temp.

 

So when loop has moved to  400k Temp. the ET3504 is still heating up from 390K.

 

How to synchronize that?

 

So my device is at 296K(lets assume) but I want to measure from 390 to 450K. So first I should wait to reach start temp=390K and then read current at every 10K step . So everytime LV Code should check with device ET3504 the current temperature before reading current or going to next temp.in the for-loop.

 

 

Best Regards,
Poulomi Das.
Institute for Microsystems Engineering.
University of Freiburg.
Freiburg, Germany.
0 Kudos
Message 6 of 8
(2,903 Views)

If you put a while loop around where you read the temperature and current and only exit that loop once you are up to temperature then I think you'll get the behavior you want.  The inner while loop (the one you need to add) will keep you at the same set point until it is reached before exiting and allowing the outer for loop to iterate to the next setpoint.

 

Inside the new while loop you could also add a case structure to determine if you want to take and save a current reading or not depending on what temperature the ET3504 is currently at.

Message 7 of 8
(2,895 Views)

Hello Simon,

 

Your tips were very useful. thank you.

 

plzz could you take a look at the screenshot pic of my final block diagram.

 

Problem 1:

In the last flat sequence , where I have the text block to save my current and temperature on a text file, my datas in real are getting saved like:

 

temp

current

temp

current

temp

current

 

But I would like the text file to look like

 

temp                  current

temp                  current

temp                  current

 

Problem 2:

The XY Graph - Current over temp , also placed in the last flat sequence, is only plotting instantaneous current value for its corresponding temp. I would like to plot a continuous graph, where the last data point is also shown on the graph when the next point is plotted.

 

What should I do about it. Please help!

 

 

I am also attaching the VI for your reference.

Best Regards,
Poulomi Das.
Institute for Microsystems Engineering.
University of Freiburg.
Freiburg, Germany.
Download All
0 Kudos
Message 8 of 8
(2,865 Views)