Learn how easy it is to read temperature with a Productivity Series PLC. This example uses a Productivity 2000 but will work the same with a Productivity 3000 controller.
Reading temperature with a Productivity 2000 controller is easy. In fact this is all the code you need right here. Don't see any? Me neither - there isn't any. You don't have to write a single line of code to get the temperature values with a Productivity 2000 controller! You'll have to write code to USE the temperature, of course, but once you configure the temperature modules, the temperature values just appear ready for you to use. Easy. In this example we have a Productivity 2000 connected to 2 thermocouples, 2 RTDs, and 3 different types temperature transmitters, a Sensor Head Mounted Transmitter, an integral transmitter, and a fixed DIN rail mounted transmitter. Here's what it looks like on the test rack- Here's the Productivity 2000, and here's the 2 thermocouples, 2 RTDs, and 3 different types temperature transmitters. They are wired exactly like the block diagram shows. The sensor wire shields are grounded only at the sensor end - if you ground the shield at both ends you just created another current path which can cause ground loops and actually make things worse than having no ground at all! So be careful to only ground sensor shields at one end. Preferably the sensor end. The thermocouples use the special thermocouple DIN rail terminal blocks - these ensure continuity of the special thermocouple wire by clamping the wires together instead of connecting them through a terminal block bus bar which would create unwanted thermocouple junctions. Well, that's it for the hardware, let's look at the software. As we mentioned earlier, you don't have to write any code to get the temperature values, you just configure the Productivity 2000 Modules to do it for you. When you start a new project, select a CPU and then hit this button to configure the hardware. Click on this button to automatically read the system configuration, but if it is grayed out like this one is, then it means your controller switch is in run mode. I'll reach over and flip the switch on the controller to STOP mode and sure enough the button appears. Click on that and the Productivity 2000 software automatically discovers all the hardware. First it tells me what base it found - that's correct so I accept that. I could keep hitting yes to all these questions but it's easier and faster to just hit YES TO ALL. And just like that our system is fully discovered. I love that. Double click on that and we see we have a Power Supply, a CPU, analog input module , Thermocouple input module and an RTD input module and one empty slot - exactly what we expected. To configure the modules you just double click on each one. I'll double click on the CPU so I can setup the serial port to talk to my HMI. Double click on the analog module which we have three temperature transmitters connected to so we'll deselect the others. Let's give the transmitter inputs names. For each of these inputs the module gives us an under range and over range indicator and for the entire module we have a Module failed and a Missing 24V indicator. Adding these status bits to your ladder code really helps later when you are trying to debug system issues so don't over look these. If you select this button, then the CPU will stop running if you pull this module out of the rack and you'll have to verify everything before starting the CPU again. This option let's you pull the module and replace it without shutting stopping the CPU. Which you need depends on how critical these inputs are to your system, but how cool is it that you have the option? The Module info button gives you all the details you'll need to know about the module which is really handy when you call tech support! And the monitor button automatically populates a dataview with all of this information - even the ones you didn't enable. That's it for the three temperature transmitters. Now we just do the same thing for the Thermocouple module. We;re only using two channels here and we'll create another dataview tab. We can specify that we want the results in either degrees C or degrees F. This burnout selection tells the module to send a low signal or a high signal if it detects a burned out thermocouple. Me, I like to send a high signal - that just seems more alarming to me than a low signal but it's really up to your personal preference or your system requirements. In addition to under and over range detection, the module also has a burnout status bit so you can simply check that rather than compare signal levels. This button removes all the default tags so you can just start typing your own, this button adds them back in. And the most important selection - this thermocouple module lets you select from a wide variety of thermocouple types and you can even use the module to detect several small voltage ranges. We're using Type-J sensors in this demo so this looks good. And the RTD module. Same thing. It supports all of these RTDs AND these resistance ranges plus it has this digital filter setting. This lets you choose the measurement update rate. If you choose 488ms and only have one channel it will be updated every 488ms. But we have 2 channels, so channel 1 is updated, then channel 2 is updated 488ms later, then channel 1 is updated 488 ms after that. That's important to understand - this is the measurement update rate which is spread out over all the channels you select. So in our two channel example, each channel is only updated roughly once a second which is fine for this demo, but if I was using more channels, I would probably bump up to the next sample rate. We'll that's it! We just configured 7 temperature measuring subsystems in a couple minutes! Let's transfer this new configuration to the controller and see what happens. That important - even though we didn't change any ladder code, we still need to transfer the program to the controller for the module configurations to take effect. Here are the data views we created using the Monitor button in each dialog, one for the analog module, the thermocouple module and the RTD module. I copy and pasted from those to create this one which just shows the values we need for this demo. Sure enough if I put a cup of cold water on one probe and cup of hot water on another, we see the values change. The three temperature transmitters are coming into the analog module which normally converts 0 to 20mA into numbers between 0 and 65535. The temperature transmitters are generating 4 to 20ma so the output of the analog card will be between 13107 to 65535. And we know that to corresponds to 0 to 100 degrees F. The good news is the Productivity 2000 has a Scale function that does this conversion for you. Just enter the tag to convert, the input range, the output range, and a place to put the result. Do the same thing for the other two temperature transmitters, transfer it to the controller, and we are done. Did we have to do this? No. But it makes the rest of the ladder code so much easier to work with if you can just think in terms of degrees so be sure to take advantage of this Scaling function in your code. Check this out - you can view all of the module configuration and setup data right on the display of each module AND the best part is you can see the all the real time temperature values zoomed out or zoomed in. And if there is an issue over range, under range or even a bad probe - I'll yank a wire here - you see that too. That's awesome! If you have any questions or need any help, please don't hesitate to contact AutomationDirect's free award winning tech support during regular business hours. They will be happy to help. And don't forget the forums - there are lots of folks there that love to share their years of experience. Just don't post support questions there, AutomationDirect's support staff doesn't monitor the forums on a regular basis.