Newbie Opto22 Email Alert


#1

Being mainly IT, I have never dealt with the Opto22 device and are new to the PLC world, so be gentle. We are trying to send out an email alert if our furnace exceeds a certain temp. I see from the pac manager in the “inspect opto22 device” where I can set email server, to and from email address. I also see there is a “Alarm events” under the events menu. From here I am lost. I know the hex address that needs to be monitor, but I am unclear how I can set a high alert on this peticular analog bank address. Please let me know if I can add anything.
Thanks in advance.
Quentin


#2

Hi Quentin,

Welcome to the OptoForums! There are actually several different ways to send email from a PAC device. The easiest way uses commands added in PAC Control version 9.1. However, those require a PAC “with control” like a SNAP-PAC-[B]R[/B] or SNAP-PAC-[B]S[/B] type device. You’d just use those PAC Control commands like “Send Email” or “Send Email with Attachment.” Here’s a link to a sample chart you can import into your PAC Control (9.1 or newer) strategy [click here].

If your PAC is a brain, like a SNAP-PAC-[B]EB[/B] or -[B]SB[/B], you can use the memory map option you mention, but that’s much more complicated and more limited in the types of email servers you can use. I’d STRONGLY encourage you to consider upgrading to a SNAP-PAC-[B]R[/B] or -[B]S[/B] device. Especially since, if you’re already wanting to do logic like sending an email, I’d bet you could make use of other commands in our flowchart-based programming software. This PAC Control software is part of PAC Project – the basic version is free and includes these commands. Just the time you save programming/configuration might be worth the difference in cost of the hardware.

If you do have a brain and don’t plan to buy a controller (and therefore [I]must[/I] use the memory map option), you’ll want to check out form 1465 – check the index for “email.”

Here’s a short video that shows the various PAC System pieces that might help give you and idea of “controller” vs. “brain” that I mention: [Click here for PAC overview.]

Also don’t forget our Product Support is FREE! and they’d be happy to help you get going with whatever type of email option you end up using.

Which type of hardware are you currently using (most likely it’s printed on the can and starts with: “SNAP-”)?

-OptoMary


#3

Hi Quentin,

Welcome to the OptoForums! There are actually several different ways to send email from a PAC device. The easiest way uses commands added in PAC Control version 9.1. However, those require a PAC “with control” like a SNAP-PAC-[B]R[/B] or SNAP-PAC-[B]S[/B] type device. You’d just use those PAC Control commands like “Send Email” or “Send Email with Attachment.” Here’s a link to a sample chart you can import into your PAC Control (9.1 or newer) strategy [click here].

If your PAC is a brain, like a SNAP-PAC-[B]EB[/B] or -[B]SB[/B], you can use the memory map option you mention, but that’s much more complicated and more limited in the types of email servers you can use. I’d STRONGLY encourage you to consider upgrading to a SNAP-PAC-[B]R[/B] or -[B]S[/B] device. Especially since, if you’re already wanting to do logic like sending an email, I’d bet you could make use of other commands in our flowchart-based programming software. This PAC Control software is part of PAC Project – the basic version is free and includes these commands. Just the time you save programming/configuration might be worth the difference in cost of the hardware.

If you do have a brain and don’t plan to buy a controller (and therefore [I]must[/I] use the memory map option), you’ll want to check out form 1465 – check the index for “email.”

Here’s a short video that shows the various PAC System pieces that might help give you an idea of “controller” vs. “brain” that I mention: [Click here for PAC overview.]

Also don’t forget our Product Support is FREE! and they’d be happy to help you get going with whatever type of email option you end up using.

Which type of hardware are you currently using (most likely it’s printed on the can and starts with: “SNAP-”)?

-OptoMary


#4

According to the Unit description we have an SNAP-PAC-R2.


#5

Excellent! Since you have a “controller” in that SNAP-PAC-R2, Then you don’t need to mess with the memory map for sending email, you can just write a simple strategy and use those built-in “Send Email” commands I mentioned. Have you used PAC Control yet at all?

If not, check out our “How-To” videos including three “Quick Starts” we’ve recently added to help you get started writing your first control strategy: PAC videos.

Besides free product support, we also have offer free training. If coming to beautiful Southern California is a option for you, I strongly encourange you to sign up. If you click on [URL=“http://www.opto22.com/site/training_schedule.aspx”]“Class Schedule” and see “0 Seats Left” go ahead and register for the class anyway to get on a wait list. Since so many are booked up at this point (and we have a few with wait lists) odds are good we might add another class in the near future!

Have you done any (flowchart-based) strategies yet? That’s the fun part. :slight_smile:

-OptoMary


#6

Ok, I’ll check them out. So, if I design a strategy and “upload” it, will it interfere with the current one already pre loaded? I have not done anytype of this programming. We used to have maintenance personel that took care of all this. Now we only have 2 lonely IT people maintaining the plant. I"ll take a look at the Vids and see if I can figure it out. Thanks for your help.


#7

The PAC hardware does not come from the factory pre-loaded with any strategy in it. However, if someone else before you wrote a strategy and loaded it in there, you need to use caution especially if it’s controlling some critical process.

One of the tools that comes with the (free) PAC Project Suite is called PAC Terminal and that can be used to see a variety of useful info including:

  1. If your PAC has a strategy in it
  2. If the strategy is running
  3. If the strategy has been Archived onto the controller itself, meaning you pull that Archive from the SNAP-PAC-R2 and add more logic to do your email, etc.
For example, if I want to see what's running on one of my controllers, I can go to the Windows start menu and find (under Opto 22 > PAC Project > Tools) PAC Terminal.

Your list of contollers shown will probably be much shorter, hopefully you’ll recognize the IP address you’ve been using:


When you double-click on the device you’ll see this window pop up. Where I’ve circled below in red shows this PAC has NOT had an Archive saved on it. I can also see the strategy is not running. The name of the strategy (“PulsePlus”) could be useful if you’re trying to locate the files on a harddrive or something.


There are a lot of OptoNewbies out there we’ve talked to or had in class who’ve been tasked with figuring out what a strategy they’ve “inherited” does, and how they might update/improve it. There are some tricks to sorting through a large strategy. But depending on how ugly and/or uncommented it is (or lacking of an Archive), there are situations where it’s easlier to start over. Or replace a piece at a time.

Is this SNAP-PAC-R2 currently controlling something important that runs 24-7? Do you have the original strategy? (Or see using PAC Terminal that it’s been archived on the SNAP-PAC-R2?)

As you get going on your new or improved strategy, as an IT guy I’m sure you know the importance of backup/archive. Here’s a TechTip that talks about backing up your Opto projects [click here].

You may be a lonely 2 IT guys there, but you have lots of Opto 22 folks here in Temecula, CA (and OptoFans from all over the world on the OptoForums) that are happy to help!

Cheers,
-OptoMary


#8

I have access to the original strategy. It was provided by the Kiln manufacturer when it was delivered and set up. So I could modify the original code. I just need to figure out where to start. Just a side note, this is by far one of the most helpful forums I have ever been on.


#9

Thanks for the kind words!

Good news about your access to the original strategy. As far as where to start on understanding what it does, here are some general thoughts:

  1. As mentioned before, put that strategy in a very safe place, or several, including the SNAP-PAC-R2 itself when you get ready to make real changes. The strategy is made up of a number of files. If it was Archived from within PAC Control (as mentioned previously), the zip file created should be named something like this: StrategyName.Archive.D04042012.T100312.zip.

  2. To figure out what your strategy does, sometimes it helps to start from the I/O points and work up. You can figure out what’s physically wired into your I/O points, see where those are represented in your strategy, then do a Find (right mouse click) of a particular point to see where it’s used in the strategy.

  3. Watching the strategy actually run is helpful for figuring out how it works, but you might not have extra hardware to run it on while you’re testing. Consider using PAC Sim, our Microsoft Windows-based software that simulates the control engine of a PAC. Use caution when doing this as your simulator can still talk to real I/O. You’ll want to either disconnect the PC running PAC Sim from the network w/the real I/O or DISABLE your I/O Units in the strategy.

  4. As you make changes, re-Archive regularly so you can go back to a previous version if needed.

Those are some general thoughts. I’m hoping others will jump in with suggestions and techniques. I’ll put together some examples and further details for you here shortly…

-OptoMary


#10

[B]High-level Look[/B]

When looking at an “inherited strategy,” first take a high-level view, starting with the strategy tree. For example, in this strategy I notice a few things right away:

  • This strategy includes only 5 charts so far. (See black rectangle below.) If you just want to add a little bit of functionality, [for example, a chart to send email](http://www.opto22.com/site/downloads/dl_drilldown.aspx?aid=4139), you're in good shape since a SNAP-PAC-R series controller can run up to 16 at once (the -S series controllers can run up to 32 charts at once).

  • Circled in red are several [I]Subroutines [/I]and [I]Pointer Variables[/I]. Some of our most experienced users never use either of these. Although these are commonly used by programmers/software developers, they're one of our most requested topics for Advanced Training. My point is, if you have no experience writing software or doing any kind of coding at all, and you see these in your strategy, it might be worth [recuriting help](http://www.opto22.com/site/optopartners.aspx) if you need to make changes.
  • Circled in yellow to the right above, notice the multiple hexagon-shaped OptoScript blocks. You may notice the script in those blocks looks similar to a programming language like C/C++ or Visual Basic and is favored by those who like writing code. Here's a discussion about [OptoScript Blocks vs. Action Blocks](http://www.opto22.com/community/showthread.php?t=139&pagenumber=).
[B]The Start of the Logic[/B]

Once you’ve taken a quick look at the number of charts, etc., you can dig deeper by starting where the logic starts in the Powerup chart – the only chart that runs automatically, when the PAC is powered up. This chart typically starts all the others. Here’s a discussion re: more on the Powerup chart.

You can then look at each chart, which all start running at Block 0, optionally using SNAP PAC Sim as mentioned above to actually run the logic.

[B]What’s Turning On My Point?[/B]

To do the I/O-up approach I mentioned earlier, you could start with an I/O point you’d like to understand. For example, perhaps in this system my digital output called [B]doalarm[/B] is causing unwanted noises and I want to see where that’s happening.

If I right-click on that point, I can search through the strategy to find all the places it’s used:



In this example, the search yielded one hit. If I double-click on that line, the block will open. If I see a [B]Turn On [/B]command in an Action Block, for example, I’ll have found the logic causing the alarm to go on and can modify as needed.

I hope that gives you some ideas for sorting out your new-to-you strategy!

-OptoMary


#11

Makes sense! Thanks for giving me a direction to go. I’ll start to dig around and will let you know if I need any more assistance. Thanks again for all your help.