Many Horner All-in-one Controllers have the unique ability to display live video from a USB camera. What could you possibly do with that? How about extending the operator’s view inside the machine to a key area where a part is nested? How about an overhead view? What kind of resolution is supported? Join us as we demonstrate this handy feature with Canvas – the very latest Horner PLC+HMI.

 




0:02

Good morning everyone, thanks for joining us on this webinar of using a USB camera with Canvas.

0:07

It’s a relatively short presentation, if you have any questions you can pop them in and we’ll get them at the end.

0:12

Hello and welcome to today’s webinar. Today we will be looking at how to use a USB camera with Canvas.

0:21

Let’s look at our agenda for today.

0:23

We will start with a quick review of how to use a USB camera with Canvas, followed by an overview of the Canvas all-in-one controller from Horner.

0:33

We will then discuss its video capabilities, including the Cscape 10 Canvas video object.

0:40

There will be demonstrations throughout, and we will finish with a Q &A session.

0:45

Let’s begin by reviewing the Canvas all-in-one controller.

0:49

Canvas is the most advanced line of all-in-one controllers from Horner.

0:54

These controllers are basically PLCs with a built-in HMI and the Horner OCS products offer control with built-in display, lots of networking and plenty of either built-in or remote I.O. for your application.

1:09

Horner has several different all-in-one controller product lines and Canvas offers three primary differentiators.

1:16

First of all, it has an advanced graphics engine, so it does much more advanced graphics than any of our other products.

1:24

It also features a dual-core microprocessor, so you have one microprocessor core that’s dedicated for logic and networking, and another microprocessor core that’s dedicated for graphics.

1:37

This will ensure that you always have really fast control with your application.

1:41

Canvas also includes several built-in protocols that either aren’t available on other product lines or are available only at an extra cost for an upgrade, such as IIoT functionality.

1:54

Canvas stands out for its enhanced graphics capabilities that it has to offer.

2:00

That means even simple objects like switches, buttons and gauges are enhanced and have a newer, more modern look.

2:08

Canvas allows you to be more creative with your backgrounds, with the ability to use graphics, patterns and images.

2:15

There are also plenty of completely redesigned graphics objects that are only available on canvas, and that includes the trend object, where you can have up to 16 pens on a single trend if you choose and the ability to turn individual pens on and off at runtime so that you don’t cluster up your view if you want to focus in on a specific trend line.

2:37

In addition to trends, there’s an all new XY graphic object, all new alarm capability, and the recipe object has also been completely redesigned.

2:48

There is also a video object, which we will look at in more detail today.

2:53

There are many ways that you can use the video object.

2:57

For example, you can play back pre-recorded video files, such as mp4s.

3:03

Videos can be ideal as help files for operators if you want to show the operator how to load a part or show a maintenance person how to do maintenance on the machine.

3:13

You now have the capability of displaying and playing those help videos right from the front of the OCS screen.

3:20

We will note that any video files will be presented without audio so you may need to have subtitles or some sort of graphics on the screen to explain everything.

3:30

The new canvas video object also includes video control.

3:34

You can restart it from the beginning, you can zoom in to full screen, or you can push it in repeat mode if you want.

3:41

So there’s a lot of functionality with the built-in controls with the Canvas video object.

3:46

By connecting a USB camera to a Canvas controller, you can do some things like show the operator live video, maybe from a hidden or dangerous area of the machine, giving operators visual access areas they can’t see directly so that they can see what’s happening from their operator station.

4:05

So if they want to double check that a part is nested or that a machine is in the home position they can get a visual validation of that specific machine state which can be really useful.

4:17

And when you’re displaying video on the front of the canvas unit you can choose to display that video in a push buttons, graphs, or meters.

4:30

Or the operator can choose to hit a button and to view everything full screen.

4:35

So the operator has some options when it comes to viewing that video.

4:39

What types of cameras would you be using in this setup?

4:42

You will want to include a camera which includes a USB port, and through that USB port can support the UVC video standard.

4:51

The UVC video standard is the same standard that’s used on webcams when you connect an external webcam to your computer, so there are plenty of cameras available that support that standard and you can find them packaged for industrial type applications with removable lenses and other features.

5:11

To connect that camera to a canvas OCS, you need to connect it through the full-sized USB, which is available on all canvas units, and it could be directly connected there or it could be connected through a hub.

5:24

When you’re connecting a USB camera to Canvas with a USB cable, you’re limited to about 15 feet of distance.

5:33

There are USB extension cables available that can expand that distance, so that’s an accessory you would need to use if you want to mount your camera further than 15 feet away from the Canvas OCS.

5:46

In your application, you will also be limited to a single camera connected to the Canvas.

5:52

Now we will look at how to set this up in Cscape.

5:55

Cscape is the all-in-one programming software for the all-in-one Horner controllers, and setting up the canvas video object in Cscape is straightforward.

6:05

You will select a video object from the project toolbox while you’re editing a screen, which is in the Live Graphic Data Toolbox group.

6:14

You will then select the approximate size that you want, and then double-click on that video object to configure it.

6:21

There are a few different things you will need to configure.

6:25

First of all, you will need to select whether you want to stream through this video window or to playback.

6:32

If we’re displaying live video through a USB camera, streaming playback is strictly used for playing back files such as MP4 video files for help purposes.

6:42

You will also need to select channel 1 and that’s because today canvas strictly supports one camera and it’s going to come in through channel 1.

6:52

Next you need to assign a trigger bit as well as a status variable.

6:56

Here we have created a start camera variable which is an integer type variable as we will be using the lower bit of that variable to actually enable video for instance.

7:07

So you could use the always on bit in that scenario, and then the stashes word or the stashes variable is another integer that you will monitor that will tell if everything’s working properly.

7:20

Those stashes bits and trigger bits have more meaning when you’re playing back help videos than they do when you’re just using a live camera all the time.

7:29

So more than likely, these aren’t really critical in the application, but are useful to assign anyway.

7:36

Next, you will want to select the aspect ratio for the video that you want to display.

7:42

For example, is it a 16 by 9 aspect ratio, which is traditionally called widescreen, or is it a 4 by 3 aspect ratio?

7:51

Most cameras today use a 16 by 9 aspect ratio, but you should check this on your camera spec sheet.

7:59

Now let’s go through some details on the trigger bit, as well as the status variable.

8:04

As we mentioned earlier, these particular variables have much more meaning when you’re talking about playing MP4 help videos.

8:12

They don’t have as much importance for cameras, but we will use these anyways.

8:17

The trigger bit is the first bit of the trigger variable, and when that’s turned on, it’s going to allow live video to be happening.

8:24

Then with the status variable, there’s really only two bits when it comes to live video that we need.

8:30

These are the first bit, which tells us that live video is playing, and the seventh bit, which tells us if there’s a frame rate compatibility error.

8:40

So that would be something you would only get if you selected a camera which, for whatever reason, isn’t set to a frame rate which is going to work with canvas.

8:49

With most cameras, you won’t have this issue, but in case you did, that bit would turn on in the status variable.

8:57

Now let’s look at our demonstration in Cscape 10.

9:00

Here we have a Canvas 10D selected as our controller of choice for this demo.

9:06

We have created a screen which we’ve just named camera. That’s screen number one.

9:12

We also have a background pattern here that we’ve placed on the background of this particular screen and in the foreground we have a video object.

9:21

We found this video object from under Live Graphics Data here in the Project Toolbox while we’re editing a screen under Video.

9:29

So we clicked on that, placed it on the screen, and then we can size it however we want, depending on the aspect ratio we’ve chosen.

9:38

We can’t have this object full screen by default.

9:41

It can only take up a portion of the screen by default, but at runtime, the operator has the ability to hit a button and bring it to full screen.

9:50

Let’s double click on this object and take a look at the configuration here.

9:55

So we have the video object set to stream.

9:57

That means we’re going to connect it to a camera and it needs to be set to channel number 1, because that’s all that Canvas currently supports.

10:07

So just leave that at 1.

10:09

Next we need to assign a camera trigger bit, which is actually an integer variable.

10:15

We’re just going to be turning on the first bit of that integer and leaving the rest of them alone.

10:20

From the standpoint of live video, if we were showing help files, We could do other things with those bits in that word on the status side of things.

10:29

We’ve assigned a status word and once again we are only really concerned with the first and seventh bit.

10:36

Then this is where we select our aspect ratio and we have selected 16 by 9 for our demonstration.

10:44

So this is our configuration for our video object and now we will look at how to size it on the screen.

10:50

When adjusting the video object, we have a few options for what size we want.

10:56

Seascape will automatically make some adjustments depending on how big we want it.

11:02

For example, it will lock it into a particular aspect ratio, but we do have some choices of selecting different sizes, and if it’s displayed in a relatively small window on the screen, or even if it’s displayed in a somewhat larger window, we have plenty of room around it for other objects such as push buttons or meters if needed.

11:23

For our demonstration we are going to drag it back out to more or less the biggest size that it will allow which is about here.

11:31

Once again we are using a canvas 10D so this is a 10.1 inch diagonal screen.

11:38

So this is all we need to do to set up our video object in Cscape.

11:43

Now let’s take a look at our setup for this demonstration.

11:47

So this is what it looks like if we’ve left the trigger bit on all the time.

11:52

As we can see here our video object actually takes up most of the screen.

11:57

If we want to zoom in the operator has the ability to press the screen and press the expand control which will fit the object to the full screen and then if we want to go back to the normal view we can do that as well.

12:10

That concludes our webinar for today. Thank you so much for listening and the Q &A session will begin shortly.

12:25

Okay, so a relatively straightforward one for you this morning. I don’t see any questions in on that.

12:31

We are back to weekly webinars at the moment, so if you go to the support tab on the website, you’ll see all the webinars that are coming within the next month.

12:41Okay, other than that, I think that’s everything for today.