0:01
Thank you for joining us on this webinar on CPU250 IO Configuration Using Variables.
0:08
We’ll go with the standard run of things. The presentation is about 20 minutes, but if you have any questions, put them in at any point and we’ll get to them at the end.
0:14
Hello and welcome to today’s webinar. Today we will look at CPU250 IO Configuration Using Variables.
0:24
Let us take a look at our agenda for today.
0:28
We are going to start with a quick review of the CPU 250 and then we will go straight into our topic.
0:37
Why would we use variables for configuration?
0:41
That is the first question we are going to answer.
0:44
And then we are going to talk about some of the IO adjustments that we can make at runtime and there will be demonstrations throughout and we will finish with a Q &A session.
0:55
The new micro modular controllers are the CPU 200 and the CPU 250.
1:02
They are part of the micro series which is our entry level product line for simple and smart applications.
1:10
There is a whole lot of applications you can solve with the micro series that now includes the CPU 200 which is on the right at the bottom.
1:21
With no built-in I.O. you can add I.O. strictly on the side using OCS I.O.
1:27
modules and then in the upper right we have our CPU 250 which does feature built-in I.O.
1:36
but you can also add additional IO using OCS IO modules. We have been focusing a lot on the CPU 250 for a good reason.
1:47
It has lots of great connectivity with Ethernet and serial ports and CAN ports, supports all those great protocols that you see in the lower left, has all kinds of capabilities including, As we have already mentioned, the ability to add OCSIO modules on the side directly to add additional IO.
2:10
The built-in IO for the CPU 250 has got a total of 34 built-in IO points, 8 of which are what we call flexible inputs.
2:21
They can be digital or analogue.
2:23
and we also feature 8 analog outputs, which is a large number of analog outputs for a product in this product category.
2:32
And today we are focusing, as we have mentioned already, how do you do some IO configuration with variables, so you can make some runtime adjustments of your IO configuration without having the use of Cscape.
2:47
Now let’s talk about configuration, typically with PLCs and other control type devices like a Horner OCS or a Horner Modular Controller, how does that typically work?
3:02
Well traditionally, you would use your application development software program and you would configure your I.O.
3:09
as you develop your machine and after you deploy your machine, you would make any configuration changes at all and typically that works just fine but there are some scenarios where it is useful to make adjustments without bringing your programming software directly to where the machine operates.
3:30
Let’s talk about that now. Let’s start with Ethernet type changes.
3:36
This is a very common thing that you can change right after a machine has been deployed.
3:41
So let’s see the IT department does a kind of reformatting or upgrade of the factory network and your machine is sitting on your customer’s factory network while they would like to be able to modify the IP address, netmask and those sort of ethernet type parameters without making a configuration change.
4:03
So as changes are made over time in your original program, you could utilize those variables to create some custom screens or maybe a custom screen on a SCADA package or HMI that would allow these IP addresses and those sorts of ethernet parameters to be changed.
4:25
But there is another scenario that also can occur and that is at some point after you have deployed your machine. Your customer needs to swap out a sensor.
4:36
A sensor has failed, it needs to be out and maybe the original sensor was 4 to 20 milliamps and the new sensor they cannot find one of those in stock.
4:49
There is the same sensor but with 0 to 10 volts output on it instead so it would be nice to be able to support that sensor without having to reprogram the controller. So could that be done?
5:02
Well in the case of the CPU 250 we have given you the capability of modifying some of parameters such as sensor ranges on the fly. How do you do that? Well let’s take a look.
5:16
So what we have on the screen here is a table that shows what changes can be made through variables to flexible inputs.
5:25
Now there are eight flexible inputs on the CPU 250, inputs 9 through 16 and each flexible input has four configuration words that allow you to adjust functionality so that table on the right there shows four words and that is four words for each of the eight channels and the type of things you can adjust are first of all is that input used for digital purposes or as an analog input if it is selected as a digital input what is the voltage range 24, 12, 5 or custom.
6:05
If it is custom what is the threshold between 5 and 20 volts? What is the off threshold between 5 and 20 volts?
6:15
So if you’re using a flexible input as a digital that is what you can adjust based on that third column in the chart on the right and if you are using a flexible input for purposes you can select the range it is in 0 to 10 volts 0 to 20 milliamps or 4 to 20 milliamps and then once you have selected the signal type how do you want the data to be scaled do you want to take advantage of all the bits in the analog input word and just have 0 to 32 thousand from min to max or would you something mathematically simpler like 0 to 1000 for the scale where 0 is minimum and 1000 is maximum that gives you a simple tenth of a percent resolution and in some cases can make scaling math very easy so that all comes down to your preference but that could be changed on the fly as well.
7:17
Now the most common thing that would be changed would be the signal type of the sensor whether it is analog or digital.
7:25
Now as we mentioned we have four words for each flexible input for configuring these things.
7:32
We have talked about so far for all the channels that are used as analog.
7:37
There is a separate configuration word, just one word total for all the channels that are analog for adjusting the filtering.
7:47
So zero and minimum filtering, seven and maximum filtering and it can be in between to balance responsiveness versus signal stability and then for all channels that are being used as digital you have got a single word to configure between positive logic and negative logic now 95% of the time or maybe even more than that you’re going to be using positive logic but if you do use negative it is available but you do not have the option of the custom threshold anymore.
8:23
So that is what you can do on the flexible input site.
8:27
Now just one more mention on how you would deploy this.
8:31
So for each of our eight channels, if you are using register-based programming, you would assign four consecutive R-type registers to hold this configuration information.
8:42
If you are talking about variable-based programming, which we have been encouraging for some time, Then you are talking about an ArrayType variable of the word type with a dimension of 4.
8:55
One of those variables for each of the 8 channels, so that is how you would deploy that.
9:01
And you would just need one simple variable for analog filtering, another simple variable for the digital input mode.
9:09
Now on the analog output side, you can configure signal type, data range and what is called halt stage what happens to the analog output signal when the controller goes into stop mode does it continue sending out the value that was there before the controller went into stop mode that is called hold value does it go to minimum which is usually 0 volts or 4 milliamps or 0 milliamps. So you can adjust that as well.
9:44
Now this is not as useful as making changes on the analog input side. Why is that?
9:51
Well because the analog outputs are already segregated by signal type.
9:57
So the first four analog outputs are milliamp type and next four outputs are voltage type.
10:04
So if you are going to be using a sensor instead of a milliamp sensor you would have to change channel locations where you wired the sensor so this is not as useful in terms of changing on the fly as on the input side but the capability is there as well and you can see you have got three words of configuration per analog output so that means three consecutive registers per analog output if you are using register programming or one word type array with a dimension of three for each analog output channel if you are talking about analog output configuration.
10:46
For our demonstration we are going to start by being in seascape 10.2 and let’s go ahead and take a look at our demo.
10:55
Now before we start with the seascape side of things let’s take a look at what we have going on in the bench for the so you will notice there is our CPU 250 but you will also notice we have got another Horner product here and that is because the CPU 250 does not have a built-in screen so if you are going to manipulate the hardware configuration of the CPU configuration from registers or variables then you are going to need some way of doing that and one of the ways you could do that is with a remote screen whether it is an HDMI screen or whether it is a SCADA screen from a controlled room or something similar and remember we are not going to be making IO configuration changes very frequently so it does not necessarily have to be something that you access all the time but to stimulate that remote screen or remote SCADA screen we have used the micro x7 and we are just using it as a HMI right now and we have it talking to the CPU 250 over Mudbus TCP using what we call native addressing so that the micro and the CPU can talk to each other using Horner Nomenclature.
12:20
You do not have to do any conversion to Modbus register types or anything like that, but the whole purpose of this demonstration is to show you how we can manipulate the IO configuration from a remote screen without pulling out Cscape, so that is what we have going on on the bench.
12:40
Let’s take a quick look at Cscape, now to see what programming is required.
12:45
Now we are starting in this program that is residing in the CPU 250.
12:50
Let’s start in the hardware configuration, now we will go to the local IOTAB, now there is no configuration on the fly for digital inputs, no for digital outputs so we are not doing anything there but on the flexible input side as we showed on the slides, we do have the ability to assign variables here and for each flexible input channel we can assign variable that is a word type variable an array word type variable with the dimension of four and again we have one of those array variables for each of the A flexible input channels now in addition to that we have got a single word variable for the filter with the analog channels and a single word variable for the positive or negative logic selection for all the digital channels. Those are the variables we have assigned for flexible inputs.
13:47
Now on the analog output side we also have the ability to assign varied array type variables this time with the dimension of 3 for the 8 different analog channels that we have here.
13:59
So that is all that is required there.
14:02
Now where are these variables being manipulated?
14:05
Well they are being manipulated by the remote screen that we showed you on our bench for bus TCP. So we have to set up mudbus TCP in this case.
14:17
We are just using the CPU 250 as a server.
14:21
So we have just checked that checkbox and made sure we have an IP addresses, netmask and gateway configured.
14:29
Now in a real application we would assign variables to these as well.
14:33
We have just hardcoded it here for demonstration purposes and then there is one final step and that is this because the data to manipulate those variables or to fill those variables is coming in over the network.
14:48
We had to do some variable mapping or some register mapping to those configuration variables.
14:54
So here are those configuration variables.
14:56
Here are the word arrays for the flexible inputs.
15:00
Here are the word arrays for the analog outputs.
15:03
And then here are the symbol variables for the filtering and for the positive and negative selection.
15:08
and for each of these we have assigned a starting register for these.
15:13
Why do we have to do that?
15:15
Well because the data is coming in over a network they have to be at a known memory location.
15:22
So what we have done for all this configuration data as an aggregate we have 58 registers assigned here starting at register 1001 and going through 1058 because remember 56 and there are two additional ones after that 5 7 5 8 so that is what we have going on here so there is no other programming required in the CPU 250 all the manipulation is being done elsewhere now let’s go to the hardware configuration for the micro x7 and now let’s look at LAN 1 this time We are not a server, this time we are a client.
16:07
So the Micro X7 is the Mudbus TCP client and it is scanning those registries that we talked about where the configuration data is mapped.
16:18
This also happens to be scanning the standard IO data as well, although that is not a requirement.
16:26
That is just what we have added to our Mudbus map here, but again you do not have to do mode was part to make this work.
16:35
You just have to have some way of manipulating those variables in the CPU 250 that is controlling the IO configuration and then we have some logic here for controlling things like visibility on the two screens that we have created.
16:52
So this is a screen that contains all the flexible input data and we have the ability to manipulate that the simple toggle switches for digital and analog, some text tables for selecting through different available ranges for digital and analog types and then of course we also have text tables for its different available data ranges as well and these will either be displayed or not displayed depending on whether the channel is configured for digital or analog depending on the voltage threshold if it is digital or depending on the signal type if it is analog.
17:33
Let’s take a look at what it looks like on the bench.
17:36
So for this configuration what we have is for the first four analog channels.
17:42
We have set those for analog. This is a toggle switch that toggles between analog and digital.
17:49
The first four flexible channels we have set for analog.
17:53
The first two we have a type of 4 to 20 milliamps and the second two we have a type of 0 to 10 volts and because for demonstration purposes we also set the data range or the scaling differently for the current channels as we did for the voltage channels then the final four flexible inputs we have set for digital the first three being 24 volts and the last one being set for custom on and off threshold and right now it is set for an on at 20 volts and an off at 10 volts and then over here we have a variable power supply so right now if we take a look at i16 which is the last of the flexible inputs that led is off until we get to 20 volts that led is going to stay off Once we get up to 20, then you will see it turn on, and it has turned on, and then once we get back down to 10, you will see it turn off again.
19:01
Got to go further down, down to 10, and you can see it is off.
19:06
We are down around 7 volts now.
19:09
Now let’s adjust the range, and let’s say we want to adjust the threshold for on to 18 volts instead of 20 so now as soon as we get to 18 we should see it turn on and we did and then again we have to get down below 10 before it turns off again so as you can see we can very easily manipulate any of these parameters through those configuration variables that we assigned and then if we move here to the analog output side.
19:43
You can see we have got similar things happening here as well. So we have set the first four channels for 4 to 20 milliamp.
19:52
The next four are 0 to 10 volts.
19:55
We have manipulated our scaling a bit or our data range there.
20:00
We have set our stop value to be minimum for all the analog channels but we could change these on the fly if we had the need to.
20:10
Again as we mentioned earlier having the ability to change analog input settings is more valuable than analog output settings because you run into that scenario much more frequently. That concludes our webinar for today.
20:26
Thank you so much for listening and the Q &A session will begin shortly.
20:38
Okay so we are on again next week with the CPU and OCSIO can wearing so if you’d like to register for that then that registration link is up.
20:48
Other than that there’s no questions in so we can leave it there.
20:53
Thank you again and we’ll see you next time.