LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabVIEW for temperature control with AMREL SPS200-50-A022 power supply

Hi, I hope someone can help me out. I'm an ME undergrad with pretty much no knowledge of LabVIEW. I am working a project which requires a temperature controller. Previously, we were using an SPS120-10 power supply from AMREL and a grad student wrote a LabVIEW VI which performed feedback temperature control. The VI would acquire temperature from a Benchlink which acquire the temperature from a thermocouple. The VI also monitor the output voltage & current and determine the power output and heater resistance from those values. When a desired temperature is set, the VI compares the actual temperature to the set temperature and adjust the voltage/current setting to achieve the desired temperature. The VI was designed to keep temperature deviation to within +/-0.5 deg C. I'm not sure of the data refresh rate, but it's on the order of seconds since the system has a small thermal mass and we're operating in the 800+ deg C range. When we were using the SPS120-10, the device used GPIB for communication with the PC. Due to higher power output demand for the heater, we switched to an SPS200-50, which only has an RS-232 port. First of all, I was wondering if someone could help me modify the VI so that it could communicate with the SPS200-50 through the serial port? In addition, the drivers for the SPS120-10 and SPS200-50 might be different. If modifying the VI to communicate through the serial port isn't enough, I would need to figure out where to modify the VI with the SPS200-50 drivers, which is provided by AMREL. If anyone would like, I can send you the VI files so that you can take a look at the block diagram and tell me where to modify it. I'm still not 100% certain I understand how to read LabVIEW block diagrams.

Please let me know if you need any additional information. Any help would be appreciated. Thanks in advance!

0 Kudos
Message 1 of 27
(5,293 Views)

Does anybody have any suggestions? I see a few views but no replies. I would happy if you all could help me to get the power supply to communicate with LabVIEW. I want to know how to write commands to the PS and read back it's settings. We can solve this one step at a time.

 

Thanks

0 Kudos
Message 2 of 27
(5,255 Views)

Hi DinhT,

do you have original VI's from AMREL or are they written by your company? You need the datasheet of your new SPS Power Supply to see how to communicate to your device. Are you sure you have to make changes? Maybe only the range is different now.

 

Mike

0 Kudos
Message 3 of 27
(5,256 Views)

Try Google and this phrase -> AMREL labview driver

Is you communication setting correct like baudrate, and other RS232 setting. You will find this information in the maual. If you do not have the manual request from AMREL. Without it you can not do this project.

Also check your RS232 cable. This must be 100% correct. RS232 cables are not standardized like the GPIB cable. You will also find the RS232 wiring information in the manual. If not call AMREL and ask them for help

Good luck



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 4 of 27
(5,250 Views)

Hello DinhT,

 

There shouldn't be too many changes to implement when switching from GPIB to Serial, are you using the VISA vi's? You can replace the VISA Open.vi with VISA Configure Serial Port.vi  and then wire this to the VISA Read or VISA Write VI's. To get a look at how the Serial setup looks, please refer to the example: Basic Serial Write and Read.vi in the Example Finder:

 

in LabVIEW navigate to Help >> Find Examples. Then Seach for VISA and the example I mentioned above should be near the top of the list.

 

As far as the changes that you might have to make due to changing power supplies and therefore drivers, I would like to take a look at the code you have to give some advice on that you'll want to replace. If you don't mind attaching the code or even a screen shot of the Block Diagram, it would give me a better idea.

 

Regards,

Anna K.

National Instruments
0 Kudos
Message 5 of 27
(5,236 Views)

Thank you to everyone who chimed in! I still have the original VIs/drivers from AMREL for the SPS200. I think those VI were intended to be used as sub-VI in a larger VI to control the power supply, not as stand-alone VI. They only perform one function, such as initialize, read, or write. I don't want to make changes if it's not necessary, but at the moment, the temperature controller does not communicate with the power supply.

I have the manual for the power supply. AMREL includes the LabView drivers for users to develop their own controls, but they offer no support for it in their manual. The manual guide the user on how to remote control the power supply using HyperTerminal or a software that AMREL includes with the manual. Using that software, I can communicate with the PS, so I know there's nothing wrong with the physical connection. However, the goal is automatic temperature control, not just manual remote operation. If that was the case, I would have stick with the AMREL software. I've been in touch with AMREL tech support, unfortunately they do not have a LabView person on staff. According to them, their LabView PS drivers were written by NI.

 

Hi Anna,

 I've attached the code along with the associated sub-VIs. Hopefully everything you need to run it successfully is there. If not, let me know and I'll search for the missing files.

I tried changing the VISA open to VISA Configure Serial Port. However, this added the front panel control to adjust the settings under the PS initialize VI, which is nested under the Temp Controller and does not show up on the Temp Controller's front panel so I couldn't adjust the settings.

 

Thanks for all the help so far!

0 Kudos
Message 6 of 27
(5,220 Views)
To add serial support to a VISA driver is really pretty simple. Look at the shipping example of the 34401 Initialize function. In there, there is a case statement that is wired to the Int Type property. If the interface type is serial, the port is configured. The configuration is probably different for your instrument but the principle is the same. Note also how the serial case sets the ASRL End Out to TermChar and how the termination character is set. If you don't want to change the serial parameters from a higher level VI, just set the parameters in the initialize function to a default value.
0 Kudos
Message 7 of 27
(5,206 Views)

I tried adding a VISA serial port configurator to the top level VI. Where would the VISA resource name out go? The ARSPS Initialize only has input for error and instrument descriptor. I think instrument descriptor is just a string and it doesn't do anything. How can I get something like the 34401?

Can you explain the ASRL End Out to TermChar in more detail? I'm not familiar with how these machines communicate.

 

Thanks again for all the help. Sorry if I'm thick-headed, but I am learning!

0 Kudos
Message 8 of 27
(5,194 Views)

I have looked over your vi. First of all you have to do some changes in the "ARSPS Initialize.vi" See picture.

The best way to check instrument communication is to send the *IDN? Command. The instrument will indentify itself in response to this command. The vi I have included is a labview example. Use this Vi to test your communication. Do not progress before this is working. The VI is also an excellent example on how to set up and close down RS232 communication.

The VI "Tfeedbackpowercontroller-nolvdt-Dinh.vi" looks OK so I guess it will work then your RS232 communication with the SPS200-50-A022 is working

good luck

PS as mentioned before you will find all the RS232 details in the instrument manual



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Download All
0 Kudos
Message 9 of 27
(5,181 Views)

It really does not matter what you've done in the top level. The critical mod is in the initialize function and you have not shown that. At least try to do the modification I mentioned. Post what you've got.

 

A termination character is usually required for a serial instrument because it does not have a dedicated line like EOI with GPIB. A termination character is often a Carriage Return or a Line Feed (sometimes both). The example of the 34401 driver uses a VISA Property Node to set the termination character. That way you do not have to manually add it to each command string that is sent.

 

to6afre,

 

Before the *IDN? is sent, the post has to be configured and I don't see anything like that in what you have posted. Deleting the VISA Open is not the correct way to modify the driver. That accomplishes nothing.

0 Kudos
Message 10 of 27
(5,176 Views)