Become part of our community to take part in the Q&A as well as get early access to many of our Podcasts and Shows with a one-time or monthly pledge of $5
Vendors:Would you like your product featured on the Podcast, Show or Blog? If you would, please contact me at: https://theautomationblog.com/contact
Until next time, Peace ✌️
If you enjoy this episode please give it a Like, and consider Sharing as this is the best way for us to find new guests to come on the show.
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
With separate script files all able to run the individual components (including the two fans), it was relatively easy to merge them all into one main script file. But the system needed more functionality than just the internal components.
The scope of this project called for data not only saved to the attached USB drive (easily configured to a network drive if desired), but also to communicate specific data to a web-based dashboard (used Adafruit IO) and locally to an industrial controller (PLC) or display via Modbus TCP.
Modbus is a serial fieldbus communications protocol. It is a master/Slave protocol that can be handled by wiring from device to device with the typical transmit and receive wiring of a 9-pin d-sub connector or sometimes with two-wires daisy-chained between screw terminals.
For this application, and a growing use of it these days, it can be implemented over ethernet.
With industrial equipment made by OEMs such as Keyence (i.e., camera controllers) and Mitsubishi (PLCs, VFDs, and HMIs), it can be referred to as ModTCP or Modbus TCP.
One author refers to it as the “grandfather of modern fieldbus,” and states that it is still doing the job after four decades.
With Modbus, you read and write from holding registers. These registers are then transmitted internally to tags or data registers determined by the manufacturer but are still within industry standards.
For the two prototypes discussed here, there are pyModbusTCP API and Modbusclient declarations that are declared in the setup portion of the script.
From there, it is some simple connection open and monitoring commands in partnership with the connection write or read commands.
The final script configuration utilized 4 script files (Modbus TCP used in Comms script, Data Logging, System Operations, and a MQTT connection script for the URL dashboard connection) that all started on power up.
I decided it was best to break up the main script file as well as the others for them to operate asynchronously.
I utilized the autostart file setup (/home/pi/.config/autostart) I found while researching the best way to start up a script automatically on Pi boot up.
It worked just as I had hoped and would be easily setup even by the greenest of coders.
With an additional fan and some vent holes made in the enclosure necessary for needed air flow and reducing backpressure, both prototype systems were able to run for many hours (full workdays on several instances) at my desk.
The field test went smoothly with both prototypes for a good three-hour run. Then a final overnight test was run with the #1 prototype.
When analyzing the captured data file, it went very smooth. The ambient temperature was even low enough on the factory floor to keep the processor temp down and the fans only turned on and off a couple times to start. They then remained off for the remainder of the trial (22 hours).
Creating the CSV file (for data logging) was just as simple to implement as other components of this system.
With some simple examples and tutorials online and even YouTube, the format was somewhat simple and straightforward.
### Print to a CSV for recording data or system info ###
file = open(“/media/pi/USB_Drive_Name/file location if desired/filename.csv”, “a”)
file.write(“Message to write to file”+”\n”) #file write of message plus a carriage return
file.flush() #clear writing cache
file.close() #close file
The “a” option at the end of the command line specifies the file will be opened and entries will be appended at the end of the file. The file write would look a little different depending on if writing to the data log file or the system message file (as is shown here).
If a new file is needed or the datafile is a single line that gets written over, the “a” would change to a “w”. This same setup was used for the system log, data logging, and output to the Modbus TCP script.
The main file would write (and overwrite) a single line in the modbus.csv file. The script would then read that one line and output the corresponding values out to the Modbus registers.
Conclusion
This project was fun as well as challenging to work through to completion. Watching the two prototypes simultaneously communicate over VNC to a laptop, Wi-Fi to the dashboard, and over Modbus TCP to a Mitsubishi HMI was very rewarding.
I can obviously never include every little detail in a writeup like this, so feel free to post questions or email me ( cntrlengr at hotmail dot com ) and I will do my best to answer the questions or help in any way I can.
Don’t be discouraged to try your own Raspberry Pi industrial project. I feel it has a great niche in respect to some R&D prototyping, automating a single process, or even a complete shop floor. There are so many examples of currently running projects but go ahead and try something new!
Thanks for reading this short series I created during and after my Senior Design project made as part of completing my B.Sc. in EET at Purdue Fort Wayne (completed as of May 12th, 2021).
I would like to say a special thanks to Fort Wayne Metals for making it possible to return to school, for some of the funding of the project, and allowing me to run the prototypes on the shop floor to help monitor an existing process.
#DONEIN21
Written by Paul Hunt Senior Automation Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
Up to this point I have a complete system… almost. The enclosure (still with a few revisions to go) is essentially complete, and everything has been mounted and fits.
However, the system still needs code to function. So now I dive in headfirst with a system I have never used before and code I do not know.
I spent quite a bit of time searching the web for various help topics and forum posts to help with various aspects of troubleshooting as I got on with the setup and power up. This is definitely a good use of the web as a tool for research and support.
Turns out that I am NOT the first noob to try and set up a Raspberry Pi with an LCD or any of the other components. There are also plenty of experienced users that are willing to help in forums or even by email.
I started with the Raspberry Pi and the PiTFT from Adafruit. There were plenty of helpful tips out there that can get anyone to the point that it will power up and display the same as the Pi does by default out the HDMI port when first powered up.
This may take some trial and error with the editing of a couple config files, but not something too difficult to do with some careful following of a web tutorial or two.
The functioning LCD got me excited since the touch and both the display options were all nice additions, essential in my opinion, to this system.
If I could do it again, I would go with one a larger screen (LCD used is only a 2.8”). Other larger options looked to interface the same.
I feel that the use of references and tutorials is a crucial aspect of any project you undertake like this. The less familiar you are with components or the combination of, the more imperative it is to have resources (web searching, journals, or specific websites) that you can refer to for ideas to help with what you want to achieve.
Using the standard Python editor (Thonny) that came included on the OS worked perfectly for me. The only thing to keep an eye on when doing this is the version of Python being used.
I did have to be sure I was editing and running on a specific version that worked with all the code examples I was using.
One instance was with the Scipy code being used for the thermal sensor. I ran into an issue when compiling with a fault for the module not being found.
I then ran a command line using a direct reference to the Python version (3) I found on a forum:
That seemed to not only go through a complete install but also ran some additional items. It then worked perfectly!
To save this image as a file that could be viewed later, I had to do a screenshot. This was done easily by using a specific Raspberry Pi API.
Declaration:
#use pyautogui for screenshot
import pyautogui #added for screenshot function
Use in script:
screenshot = pyautogui.screenshot()
screenshot.save(“screen.png”)
Now with the thermal sensor working, I can come back to the full implementation later. For now, it was time to move on to the function of the camera.
Since the Pi is set up and all ready to take a camera so easily, this was not too difficult. But for a noob, it was just a matter of following the code and setting things in the code that may be needed for the specific application.
For my application this involved some research onto some of the built-in parameters like rotate, setting the size of the image, and naming of the output file.
At the start of the code, I used the following to initiate the use of the camera…
import picamera
camera = picamera.PiCamera()
# ROTATE
#camera.vflip = True #can do horizontal flip too
camera.rotation=90
This line then is used in the code to do the capture, size it, and set the name for the output file.
camera.capture(‘image.jpg’, resize=(320, 240))
With the two imaging components functional, time to get started on the ambient sensor. This took a little more than the other sensors to implement.
I had to select a specific input point on the Pi as well as soldering a resistor into the circuit. On top of that, in the end, I had to use another 5 Vdc source for the sensor instead of an open and unused 3 Vdc.
The implementation of the sensor still had issues. I got data back from the sensor easily enough but found that it was not 100% consistent.
Also, the background process was causing issues when the script was run, stopped, and started again.
The fix for this took some time and lots of web crawling to figure out. The consistency issue had a work-around as well in the form of error trapping in the code.
In this project, I chose to simply write a line of text out to a log file that also monitored communications errors and timestamps of power cycling.
To get around the issue with the background process (libgpiod_pulsein), at each power-up I programmed a check to see if it was running. If it was, I killed it so the DHT sensor could then initiate properly.
I tried one suggested approach of killing the process using the process ID. This was not working as the ID was different in every instance.
I then chose to use the libgpiod_pulsein by name. This was easy to monitor using the “lxtask” from the command prompt. This pops up an app similar to Windows Task Manager.
########## DHT22 Sensor Process Kill if active ###################
def check_kill_process(pstring):
for line in os.popen(“ps ax | grep ” + pstring + ” | grep -v grep”):
fields = line.split()
pid = fields[0]
os.kill(int(pid), signal.SIGKILL)
check_kill_process(‘libgpiod_pulsein’)
# Initial the dht device, with data pin connected to:
Now I was able to get values from the sensor and not shut down, restart, or fault out if issues arose with the connection. Time to move on.
One other issue the system had that was important to correct was the seemingly unstable and continuously dropping Wi-Fi.
There are a few things I found to try on the web that include setting the country code in the OS settings. This seemed to help at first.
The main stable fix came when I replaced the 24 Vdc to 5 Vdc regulator. The output when the input was 24 Vdc was only 4.6 Vdc.
This was affecting performance as well as posting a warning on the display for low voltage. This was fixed with a variable buck-boost power supply.
This component was twice the size as the original regulator but luckily it fit. The power supply was purchased from DFRobot and allowed for 3.3-28 Vdc in with 3-24 Vdc out at 25 Watts.
At 5 (or 5.1) Vdc out, this gave me plenty of current supply (5A) for the needed 3A the system required. When using one of these power supplies, be sure to check the output voltage first… I found out the hard way that the output was set to the max (24 Vdc) by default.
The Pi DID NOT like this.
One more item I tried with the Wi-Fi that the 3B+ Pi did not like was a USB Wi-Fi antenna.
This was apparently too much for the Pi to supply with the already connected LCD, camera, thermal sensor, and ambient sensor. It seems that the internal power supply bit the dust on that one.
Come back for Part IV (the final one) that will discuss the various script files and implementation.
Written by Paul Hunt Senior Automation Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
I’ll admit, I don’t always investigate every new feature that I read in a software’s release notes and many times I fail to utilize them for some time. Such is the case for tag extended properties in Logix Designer and View Designer.
Having used RSLogix 5000 since version seven, I have tried to keep with the new features at nearly every release and utilize them whenever possible. This week, I finally investigated this feature called tag “extended properties”.
Extended Tag Properties in Logix Designer:
In this screenshot, I am looking at my controller tags in which I have a tag called “TankLevel”.
On the right-side of the database, I can select “Properties” and expand the “Properties” window and select the “Thumbtack” to keep the window open.
Next, I will want to select the “Extended Properties” drop down and I picked all three properties (Engineering Unit, Max, Min) as shown.
I can now assign values to the Engineering Unit, Max and Min properties as they appear under the “Data” tab of the tag properties window.
Here, I am giving a digital tag called “Motor_RUN” a description of the motor’s equipment number.
Extended Tag Properties in View Designer
In View Designer, I can access the tag extended properties in the HMI screens. The extended property is accessed with the <tag name.@> syntax as shown below.
In these screenshots using numeric displays, we will display the “Max” and “Min” extended properties.
In the next couple of screenshots, we use the text display to display the engineering units for the “TankLevel” and tag description for “Motor_Run”.
At Runtime:
At runtime, I can see the extended properties the same as any other dynamic value displayed on the HMI, and the difference is that a View Designer Modification and Download to the Panelview would not have to be made to make a simple change with a range or description. It can easily be modified online in the controller via the Logix Designer application.
Tag Extended properties are not only available in View Designer, but Factory Talk ME/SE latest versions as well.
Both the L7X and L8X lines of controllers have the ability to utilize tag extended properties in AOIs (Add-On instructions). In the L8X line of controllers, tag extended properties are available in alarm messaging as well.
This creates added flexibility and utilization when building a project, especially a new project from scratch.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
I will be honest, when I read the release notes for the latest release(s) of Logix Designer, I didn’t spend much effort on the parts about alarm enhancements with CompactLogix and ControlLogix Controllers.
But over the last couple of week I’ve come to learn about and appreciate some of these features.
There are two types of alarms that can be used today in View Designer projects, and in this article I’ll walk you through how I implemented and tested them using a Panelview 5510 and a CompactLogix 5380.
Instruction Based Alarms
Instructions based alarms are Logix instructions added to a Logix project in Studio 5000 Logix Designer.
With instruction based alarms, all of the alarm configuration is does in the Alarm Instruction itself, and the status of the alarm is published at runtime for clients like the PanelView 5000 terminals to subscribe to.
The instructions themselves come in two variants: The ALMD for Digital Alarms, and the ALMA for Analog alarms.
The result of adding these alarm instructions to a Controller which a PanelView 5000 is connected is that all of the instruction alarms become immediately available to be displayed on your PanelView 5000.
The picture below shows the ALMD active in the Alarm Summary of the Panelveiw 5510 without any configuration in View Designer.
Editors note:Alarm Instructions originally appeared in RSLogix 5000 version 16 with support for the L55 and L6x controllers, but were not widely adopted because (1) they consumed substantial resources of controllers, and (2) initially only FactoryTalk ViewSE could subscribe to these alarms (see my ViewSE course for implementation details.)
As far as View Designer, initially the only alarm system it supported were Logix Instruction-Based Alarms, and through v6 Rockwell still recommends no more that 1000 of these Alarms per PanelView 5000.
Tag Based Alarms
Tag based alarms are created from any tag in Logix Designer Database, and became available in Logix Designer Version 31 (and version 5.01 of View Designer – Ed.)
They can be used in CompactLogix 5380, 5480 Controllers (Not the 70 series,) as well as the ControlLogix 5580 Controllers (again not the 70 Series.)
Up to 4,000 Tag Based Alarms can be used in a View Designer Project, and when you add the alarm in your Logix Controller, it is immediately active in your Panelview 5000 HMI.
The main advantage of the new Tag Based Alarms are that they are not part of the logic program and therefore do not increase the controller’s scan time, unlike Instruction Based Alarms.
Editors note:In View Designer v6 Rockwell raised the Tag-Based Alarm limit to 16,000 for the PanelView 5510, however the 5310’s limit stayed at 4,000 – Ed.
Creating A Tag Based Alarm
Right-Click on the tag that you wish to add an alarm to and select “Add Alarm for <tag>”
On the general tab, I give the alarm a name, configure the conditions to generate the alarm, add messaging and there is an important check box at the bottom next to “Use and evaluate alarm” that needs to be checked to be active/used in your Panelview 5000 series project.
On the Class/Group Tab, you can add a class and group or area descriptions to help with Sorting and Filtering of like alarms in the Alarm Summary.
In the advanced tab, you may choose to “Latch” the alarm or run a Factory Talk View Command as well as other settings that are available.
Tag based alarms are in the Logix Designer Alarm Manager after created
PanelView 5510 At Runtime
The Alarm Summary displays the Tag-Based Alarms configured in Logix 5380, 5480, 5580 Controller without any configuration in View Designer:
Alarm History Example:
Conclusion
In years past I can remember building many HMI projects where you not only had to keep up with a tag database, but you also had to keep up with an alarm database as well.
How things have changed when you implement Logix based alarms. With the correct revisions and controllers and PanelView 5000 series, you can utilize low effort alarm creation with Tag-Based alarms.
My best to you in creating alarms in your Logix/View Designer Project.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
Become part of our community to take part in the Q&A as well as get early access to many of our Podcasts and Shows with a one-time or monthly pledge of $5
Vendors:Would you like your product featured on the Podcast, Show or Blog? If you would, please contact me at: https://theautomationblog.com/contact
Until next time, Peace ✌️
If you enjoy this episode please give it a Like, and consider Sharing as this is the best way for us to find new guests to come on the show.
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
If you enjoy programming your ControlLogix/CompactLogix system utilizing Add-On instructions, then you will want the same compatibility when building graphics in View Designer.
No PLC/HMI developer wants to re-create the same displays over and over with copy/paste/replace monotony.
Today, I want to look at the capability of the View Designer project to match the Logix Designer Add-On Instruction/User-Defined Data Type.
Basically, View Designer has an Add-On graphic or a Pop-Up Window that can be implemented using tag aliasing.
In another words, when we have objects that are alike or use the same tag structure, we can reuse the same graphic over and again.
Today, I will create a Pop Up window that will display status information from a VFD (Variable Frequency Drive).
User Defined Data Type in Compact Logix/Logix Designer:
I created a simple UDT in my Compact Logix 5380 to use with two tags: “MOT1_VFD” and “MOT2_VFD”.
I also created some simulation code for use with the two pumps in my simulation project.
I call this UDT “VFD_Status”.
Creating a Pop Up Window
In Project Explorer, under User-Defined Screens, I created a folder called PopUps and then after a right-click, selected “New Popup”
Creating Aliasing
In this Pop-Up Window, I have a numeric display selected.
At the right in the “General” Properties window, I did not bind the “Value” parameter to a particular Logix Tag, instead, I right-clicked and selected “New Alias”.
As shown at the bottom window of the display, I called this Alias “Current” and added the NumericDisplay_001.
Value in to my “Value” parameter. I did this same property/alias setup for each parameter in my Pop Up window.
You may right-click on any supported property and select “New Alias” to create an alias for that parameter.
Calling the Pop Up Screen
To call up my Pop Up screen at runtime, I created a small VFD that acts as a button.
From that button, I select an event that will “Open popup on release” and selected my “VFD” Popup.
Under “Property Configuration”, I can then browse next to each Tag Alias and bind it to a particular Logix Controller tag.
In keeping with my “Current” example, I selected “PVTEST.MOT1_VFD.CURRENT”
Each VFD popup I wish to add, I can simply copy and paste the button and change the Logix tags and I am done. I can reuse my Pop Up window over and again.
In the next screenshot, I show the second VFD button with the MOT2_VFD logix tags.
When developing a project, it is desirable to create programming and graphics that create consistency as well as save time and money by cutting development time. It also allows for reuse in other projects.
The use of Add-On graphics or Pop Up windows using Tag Aliasing will allow you to create one window and reuse it over and again.
If I had twenty-five motors in a project and all had VFDs running them, I would not want to build twenty-five Pop Up windows to see the status of each one and that is why this feature is important to utilize.
My best to you in your View Designer Project ahead.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
Become part of our community to take part in the Q&A as well as get early access to many of our Podcasts and Shows with a one-time or monthly pledge of $5
Vendors:Would you like your product featured on the Podcast, Show or Blog? If you would, please contact me at: https://theautomationblog.com/contact
Until next time, Peace ✌️
If you enjoy this episode please give it a Like, and consider Sharing as this is the best way for us to find new guests to come on the show.
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
When creating an operator interface, one piece of the puzzle is to think about security before getting too far into the project.
This is because you can spend a lot of time reworking and cleaning up if you don’t put thought into it ahead of time.
Security is a necessary component because certain features need to be accessed by everyone and some features need to be accessed, but only by certain people.
I wanted to give an overview here of the basic setup in a View Designer project and see how it functions at runtime in the PV 5510 HMI.
Log On Method
Under Project > Properties, one of the five project settings’ tabs is to configure the “Log On Method”.
Here, you will decide if you will require a Username and Password or simply a PIN for logging on.
The username and password is obviously more complex, but likely a better solution in the real world. For simplicity here, I am choosing a PIN for logging on.
The next step is to select Tools > Security Administration
Setting Up Users
In Security Administration, I set up two users: Admin with an administrator role and Supv with a supervisors role. Operator remains the default account.
An important note here is that once you set up an administrator account, the operator account can no longer modify the system settings of the terminal:
Screen Security
Graphic screens have security settings within the screen.
To access them, right-click on the Screen and the “Security” settings will display on the right side of the project explorer pane.
Here, I give the operator account “No Access” to this screen.
Object Security
After giving the operator account “No Access” to my entire screen, I must now give each object on my screen (that I want the operator to access) “Full Access”.
I choose here to give “Full Access” to the “Start SIM” button, the “Reset” Button and the “PV5510 Manual”, but not the “SIM TIME” setting.
Here, I leave “SIM TIME” with the “Inherit” security setting of the screen.
At Runtime
With the default/operator account logged in, the “SIM TIME” numeric value has cross-hatch lines over the numeric indicating that it cannot be modified.
After logging in with the user PIN for the “supv” account, the cross-hatch lines go away and I can modify “SIM TIME” as shown below.
Different Accounts
In this scenario, we discussed three accounts:
Admin Account – accesses terminal settings
Supervisor Account – used to access items above the operator account as specified
Operator Account – default account for basic operations
There is also an Engineer Account, Maintenance Account and Restricted Account that can be utilized in your project.
One Last Item – the Admin Account
I earlier mentioned that after creating the admin account, system settings could no longer be modified with the default/operator account.
These next two images show the cross-hatch lines over system settings within the terminal.
They go away when accessed under the admin account.
While not difficult to grasp or set up, security is a vital setup that needs to be thought about ahead of the project, so that it can be implemented consistently and correctly.
While only utilizing a couple of the accounts here, they all will work the same, giving levels of security that can be accessed as needed at each particular level.
Hopefully this will give you a good starting place as you begin your security measures in a View Designer project.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
In my experience, it is the “little things” that can make a big difference in an HMI Project.
Simple features can save time and money by providing valuable information at the touch of an operator or technician’s fingertips.
I noticed in the View Designer manual, a pre-built “PDF Viewer” graphic object that can be inserted into a graphic screen to be accessed at runtime and I found that it is simple to configure and implement, but the possibilities of what can be done with it is nothing close to simple.
What I will provide here are the steps to implement a PDF document into a runtime display, but take a moment and think about the possibilities of custom PDF documents with operator procedures and how to operate and troubleshoot the equipment run by this control system.
When an operator has questions of how a certain object operates or what a particular machine setting does, in the middle of the night, he/she could quickly access the valuable documentation. I think this is a great feature to utilize.
The first step is to add your PDF Document to the “Documents” folder in your View Designer Project. As shown below, right-click on the “Documents” folder and Select “New Documents”
Browse to and select the .pdf document that you wish to add to the View Designer Project and select “open”.
I then right-click and renamed the document “PV5510_Manual”
The next step is to create a New Screen in my “User-Defined Screens” folder
In my new Screen called “PV5510Manual”, I can click on and drag my “PV5510_Manual” PDF document into the screen. It will then prompt me to select which viewer to use. I select the “PDF_Viewer” as shown below.
Now that I have my pdf viewer in place, I need a button to call it up when needed.
In the “Events” tab of my button, I can select to “Navigate to screen on release” and select my Screen: User-Defined Screens\PV5510Manual
Download the project to the PV 5510 Terminal and View the PDF at runtime.
Scroll through the PDF document or select a page number
Navigation
The built in PDF Viewer has features for page forward/ page back, numeric page selection, zoom and can be scrolled via the touch display of the PV 5510.
The bookmarks tab displays the bookmarks of the PDF document. The bookmarks must be set before adding the PDF to the View Designer project.
Whether you utilize the PDF Viewer as a library for system and user manuals, custom operator procedures, safety procedures or all the above, I believe it is a very powerful tool to add to a control system.
This can be implemented in only a few minutes and, with a little organization, can be easily maintained. I am really enjoying working through the features of the Panelview 5000 series and View Designer.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
In this episode of The Automation Podcast, I sit down with Stephen Mustard, President of the International Society of Automation, to get an introduction to the organization.
For more information, check out the “Show Notes” located below the video.
Watch the Podcast:
The Automation Podcast is also available on most Video and Podcasting platforms, and direct links to each can be found here.
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
If you have watched any news the last few weeks, you have likely noticed that a global issue has surfaced around the availability of electronic components and raw materials that are used in nearly every industry and sector of manufacturing.
There are many combined reasons for the shortages.
In the United States, substantial sub-freezing weather in February caused outages for several manufacturers in Texas such as Samsung and NXP.
Across the world, a fire in March at the Renesas plant near Tokyo shortened supplies even more.
Furthermore, manufacturing was not prepared for the increase in purchases of electronics and automobiles that has been driven by the multiple stimulus packages that have given the public extra money to spend.
All of these things added to the COVID pandemic that still looms across the world has created a difficult scenario for possibly hundreds of manufacturing markets.
It is my understanding the automotive industry is one of the hardest hit of them all. This is evident when you drive past a dealership with historically low inventory levels.
The reality is, that not all sectors are having shortages, but the ones that are can make getting parts that you may need, difficult to obtain in the amount of time that you would normally see them.
Some preventive measures that we should all think about during this time:
Evaluation of Critical Spares:
It could be the right time to evaluate your control systems and look for any critical spares that you do not currently have in stock. It could take longer to obtain those spares in an emergency.
Projects in the Works:
Are you about to embark on a new project? Whether it is a new controller, a new line of VFDs or smart MCC, don’t delay on getting orders in. Automation vendors have dedicated teams to do everything they can to get you the parts that you will need for your project, but if you wait until the last minute, lead times could set you back.
Not all parts are affected, so reach out to your distributor or vendor and see what lead times are published for any project parts that you are considering.
Being aware of the problem is most of the battle, not simply just aware, but thinking about what affects it could have on your project, your operation, your company and taking action to minimize the risk whenever possible.
I’ve seen projections from one to three years of how long this component crisis could last. As with any difficult crisis in manufacturing, or specifically in automation/control systems, the best defense is to be proactive and not complacent.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
In my last article here, I covered getting to know the PV 5510 terminal in terms of navigation and system settings. I
’ll now take a step further and begin developing a project. The first lesson that I was given by the terminal is the lesson/reminder of going through the compatibility matrix of any Rockwell products before using them.
If you don’t, you may spend hours, like I did, making little progress.
Referencing the PCDC would have saved time and heartache learning which version of Logix Designer that the PV 5510 is compatible with.
After referencing it, I upgraded the CompactLogix 5380 to version 33 firmware to use it with the PV5510 which was already flashed to version 7.002 that matched my View Designer Project which was created in version 7 as well.
These settings allowed full compatibility as well as support of the latest features.
Matched Firmware & Software – PanelView and Studio 5000 View Designer
Project Properties
The project properties window, as two tabs are shown below, contains five tabs that contain Application settings such as Panelview location and type, Reference settings such as controller connections and other project system settings.
In the Reference settings tab, you will add the path to your controller(s) as well as the path to the Logix project (.ACD) file. The PV 5510 will connect with up to four controllers.
After Initial Settings
After setting up the communication and system settings, I was able to go to work on a graphics page.
For simplicity, but for examples of how to accomplish graphical tasks, I set up a couple of tanks that will pump liquid from one to the other in a simulation mode.
Code is added to the Compact Logix Controller and I just need to add the graphics to interface with it.
Graphics and Library
I was pleasantly surprised at the library of tools that are available to work with.
Here I selected a couple of “Tank Storage” units from the “Tanks” library. On the right of the screen, I can browse to the “Level” property and give the tag name of the level that I wish to monitor, the min and max properties and the color that I wish to fill the tank.
On the animations tab, I can give the range and colors if I wish for my tank level to change based on the level.
Here, I can make the level change from green to yellow at 90% and then to red at 96%.
To display a button animation, simply writing a value of “1” to the controller tag “Start_SIM” is shown below.
There are many options with buttons, when and how they are pressed, when the tag can be written, the actions taken etc… this is only one scenario or way to do it.
As with most graphics packages, the graphics are not difficult to figure out the basic operations.
I’ll leave off here with graphics and pursue some other features and settings, but I wanted to give an overview of the graphics and basic examples to get you started.
I then downloaded the View Designer Project to the PV 5510 and started the simulation.
Conclusion
I really like having the View Designer software installed with my Logix Designer software and not having to download and license a completely different software, so that is definitely a good thing.
After the initial research project for compatibility and getting all of the pieces to the puzzle at the needed revisions, I now have a functional PanelView 5510 application loaded and running, working with a Compact Logix 5380 controller to accomplish a basic simulation here in my living room, but installed in the right place it could be operating a piece of complex equipment.
I plan to dive deeper into security and other features in the future. My best to you in your first experience with a PanelView 5K terminal.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
When I think of a Panelview, so many experiences come to mind.
I have worked with so many hardware models, software such as Panelbuilder 1400E, Panelbuilder 32, Factory Talk ME versions 4.0 up to the latest, communications using DH+/RIO, ControlNet, & EtherNet.
In each of these cases, it was a completely different software than the software that I would need to program my PLC.
Well, that has finally changed with the Panelview 5000 series.
I was recently able to get my hands on a PV 5510 demo unit and get acquainted with both the hardware and the software and I want to share the things that I learned along the way.
Notable Features:
Shared Logix Tags help simplify engineering time by browsing straight to your Logix controller tags without having to create HMI tags.
Logix-based alarms are automatically available on the PanelView 5510 & 5310 graphic terminals – eliminates additional programming and reduces network traffic
High-Speed Button Controls – can interact with Logix controller at I/O Speeds
Runtime Language Switching
Alarm History – up to 40,000 alarms and can be exported to SD card or USB Drive
Terminal Settings:
Terminal Settings are straight-forward and easy to figure out if you are familiar with Panelview terminals in general. I’ll go over a couple of the settings in further detail.
HMI Device:
On the HMI Device tab, you can disable downloads and firmware updates if you wish to “Lock Down” the Panelview so that the configuration cannot be modified.
Network:
In the network tab, you can set the IP Address, Speed/Duplex settings and monitor port configuration such as DLR detection, duplicate IP detection and other parameters.
Restoring to Factory Defaults:
If such a need arises to restore your PV 5510 to factory defaults, this short procedure will allow you to do so:
Cycle Power to the Terminal
When the A-B logo appears as shown above, wait a few seconds, then Tap the logo.
You will be asked if you would like to restore the terminal to defaults. Tap “yes”
You will be asked for confirmation, again, Tap “yes”
The terminal will display “Scrubbing” while the restore is taking place, but then will reboot normally and take you to the “Terminal Settings” display when complete.
Opening Studio 5000 – Selecting Logix Designer View
Open Studio 5000 Software
Select “New Project”
Select “View”. This will give you the Panelview models to choose from instead of Controller models that you will normally see with “Logix” Designer Software.
The PV 5510 is similar in appearance to many previous models of a Panelview as far as hardware is concerned, but it pretty much stops there.
Logix View Designer software has a completely new look and feel from the Factory Talk Studio software.
The PV 5510 also has many built-in features and controller integration with Logix controllers that I hope to explore and pursue in the very near future.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
Important – Read First: New for Summer 2024 to address Rockwell’s recent website changes, the new article here has the updated procedure and video walk through on how to get RSLogix, Emulate and RSLinx for free.
NOTE: The free “RSLogix Micro Starter Lite” software I show how to download in this article only works with the MicroLogix 1000, MicroLogix 1100, and free SLC-500 Emulator.
If you need help learning to use RSLogix, check out my Five-Star Rated PLC Courses at The Automation School. They come with instructor support and never expire.
NOTE: About programming software for other A-B PLCs:
As of today there is no free “programming software” for the following A-B PLCs:
Step 2) Next select “Downloads” on the front page (the links may not be in the same order shown below:)
Step 3) Now click on “Downloads By Product”:
Step 4) And search for “1763”:
Step 5) Select “1763-Lxxx” from the list, and choose version “10”:
Step 6) Then click on the “Downloads” button as shown below:
Step 7) And now click on the small “Download” icon:
Step 8) In the popup window that comes up, select the check-boxes for RSLogix Micro Starter Lite w/o RSLinx EN, RSLogix Emulate 500, and RSLinx Classic Lite as shown below. Then click on the “Downloads” link on the top right of the window:
Step 9) Now select the “Download Now” button on the bottom right on the next popup window:
Update for August 2022:
If you are running into an issue when you get to Steps 9 to 11, you may need to clear your browsers cache. I had the issue pictured below in both Chrome and Edge, and clearing the cache fixed it:
Step 10) At this point you may be asked to sign in:
NOTE: If you don’t already have a free account for Rockwell’s website, go ahead and create one (be sure to use a valid email address as you’ll need to open the email they send you to confirm your registration.) Once your account is setup, sign in so you can continue with the download.
Step 11) Once signed in, accept the end user license agreement:
Step 12) Here I use to recommend selecting “Direct Download,” but as the download manager now automatically downloads, it easier to just run it after it downloads:
That said, if you’d prefer to manually download the files, you can do so by clicking here:
Step 13) Once the downloads complete, you can click on this link to open the folder they downloaded to:
NOTE: In this example RSLinx was downloaded into the MicroLogix folder along with RSLogix.
If you run into issue using RSLogix, feel free to sign-up to my Locals community and I’ll help you there, or grab my PLC Basics course at TheAutomationSchool.comand I’ll support you as the instructor of that course.
Compatibility Note: Below you’ll find a screenshot of Rockwell’s website showing which versions of Windows 7 RSLogix Micro 8.3 is supported on (it does work well on Windows 10, but the free version is not officially supported on it:)
For information on other operating systems check out Rockwell’s compatibility website using the link below:
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
In my last article, I went through the necessary steps to read and write data to and from tags in a ControlLogix via a program in a Siemens S7 PLC.
In today’s article I’ll go a step further and implement the communication into an application as it could be used in a real life scenario.
Logic in the ControlLogix processor
As I stated in the previous article, I am simulating that the ControlLogix Processor is controlling a garage door unit. I have code written in the ControlLogix processor and simulation that the up and down limit switches make so many seconds after the direction commands are submitted.
The limit switches are written to the “DINT.0” and “DINT.1” tags. The commands to open and close the doors are coming from the S7 1200 “DINT2.0” and “DINT2.1”.
S7 1200 Data Mapping
I wanted to be able to take the “DINT” tag and split it into 32 bits. I created a data block called “Logix_ReadArray” and created an array of 32 BOOL tags.
I was then able to bring in the DINT tag from ControlLogix and use the “SCATTER” instruction to map it to the 32 bit array (data block) that I created in the previous step.
After this, the individual bits are accessible as BOOL data types.
As for the commands back to the ControlLogix processor, I created a 32 bit “Write_Array” as well.
As the opposite of the “SCATTER” block, I was able to use the “GATHER” block to collect the 32 bits that will write to the ControlLogix processor and put them in the “DINT2” DWORD.
HMI Controls – Basic HMI is connected to the S7 1200 – S7 1200 communicates with ControlLogix
Here I set the Up and Down Limit Switches to turn green when active and black when not active. I created two buttons with set bits and reset bits for up and down commands.
What are garage door controls without some animation? I created simulation timers for the garage door that will allow me to implement “Vertical Movement” properties into my garage door and make it open and close.
Garage Door Up
Garage Door Down
Conclusion
Once I was able to get the LCCF_CIPClient function block working and had the peer to peer communication established, then I had to decide what to do with the data.
I found the “SCATTER” and “GATHER” blocks to be very helpful and I am learning that any time I deal with arrays, I must create data blocks for them.
Mapping the data and keeping it from getting unorganized is very important, especially in a large project with many tags going back and forth.
Comments and descriptions are definitely worth the time and effort. I hope this series has been of help to you if you are looking to make your S7 “talk” with a ControlLogix controller.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
I would think that it would be extremely nice to have an entire manufacturing environment using the exact same control system with the same hardware and software throughout, but I can imagine that there are very few, if any, systems that are this seamless.
Image by Brandon Cooper
When multiple control systems are working together to automate equipment, it is vital that they can integrate and communicate with one another.
Here I want to take a look at communication between a Siemens S7-1200 and ControlLogix L62 processor.
To implement this, I learned several things that I hope to share throughout this article.
The LCCF_CIPClient Function Block
The LCCF_CIPClient Function block (for use with the S7-1200 and 1500) was designed to read and write values from Rockwell Automation Controllers, including ControlLogix, CompactLogix and SLC500.
Documentation and Downloads for this instruction can be found at the Siemens website here:
To start, you will need to download “109782317_CIP_Client_DOC_V1.0_en.pdf” document and “LCCF_CIPClient Library” as shown below:
Image, Documentation and Downloads can be found below at the Siemens website linked to above.
Once downloaded, I opened the global library in my TIA Portal Project:
In the ControlLogix Processor
I created a tag called “DINT” that is a “DINT” Data type that will be received by the S7 1200 as Read from ControlLogix.
I also created a tag called “DINT2” that is a “DINT” Data type that will be written to by the S7 1200 as Writes to ControlLogix.
There is more to the story as I will be creating a project where I will be using my ControlLogix Processor to operate a garage door and all of the data will travel from my Basic HMI to my S7 PLC, then pass peer to peer with the ControlLogix. I will put that piece on hold for now and come back to it.
The ControlLogix tags in the TIA Portal Project
The manual is extremely helpful here as I had to create a Data Block called “Logix_Tags” that contains the tags that I wish to receive or send to the ControlLogix Processor.
The arrays must be of type “LCCF_typeTagDef” where I had to give each tag name that would be received or sent, the tag type and whether it is a receive or send tag.
The LCCF_CIPCLient Block is inserted into my Main [OB1] program block, although it can be done in a cyclic interrupt program block as well.
Configuration for the LCCF Function block includes the enable bit for the function block to execute, the Profinet Interface that will communicate with the ControlLogix Processor, the IP Address and Slot number of the ControlLogix Processor and the Data Block of tags to receive or send to the ControlLogix Processor. This is shown below inside the data block.
The LCCF Function Block contains its own data block called “PC_LAB_Comm_DB”
Conclusion
This is the basic setup needed for peer to peer communication between the S7-1200 and ControlLogix processor.
The ControlLogix processor acts as the CIP Server and the S7-1200 is the CIP Client that submits the read and write messages to the ControlLogix.
In the next article, I will go further into manipulating the tags that are to be received and sent, how to manipulate the arrays, and as I stated earlier, how to get the HMI involved to control that garage door across the two systems.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
After getting my electronics degree over thirty years ago, I landed my first job in the industrial automation industry as an Inside Technical Specialist. That job was basically a technical support position with some sales functions mixed-in.
At the time I had no idea that what a PLC was, but since I’d been coding since I got my first PC (VIC-20) at the ripe old age of 11, and I had recently worked building IBM compatible PCs as well as using MACs in an engineering department, I went ahead and applied for that position which required both PC and PLC expertise.
As the story goes, I told my that I wasn’t going to let that fact that I had no clue what a PLC was stop me from applying, since I already had lots of experience using PCs, and it was just an “L” after all.
During the first few weeks on the job, it was quickly obvious that the PLC-5 was the top choice among Allen-Bradley controllers, with the PLC-2 and SLC-100/150 coming in second, and the highly anticipated SLC-500 just coming into stock.
Shawn teaching an in-person SLC-500 training course in Albany, NY
Since then I’ve the opportunity to teach hundreds (if not thousands) of people how to use the PLC-5, and thanks to a recent donation of RSLogix 5 I’ve decided to add a course on the PLC-5 to my upcoming course development schedule, along side updated courses on the ControlLogix, CompactLogix, SLC-500 and MicroLogix.
The thing about all of these controllers is that they share a whole lot in common. So unlike my previous courses, which I filled one at a time, these new courses will be all filmed concurrently.
This approach will allow me to do things like record a generic lesson on Data Highway Plus, which I can then include in all of the courses in which DH+ can be used. Because of this, I’ll continue to offer discounts to those who purchase multiple courses since some overlap is unavoidable.
That said, while I have a very good idea of the topics I want to include in my upcoming PLC-5 course, I also wanted to reach out to you, the readers of the blog, to see what topics or questions you’d like to see answered in this upcoming course?
So if you still work with the PLC-5 and have some things you’ve always wanted to know about it, please take a moment to drop me a comment below, or use this form to send your question in to me anonymously.
My plan is to start answering these questions in the course’s “Ask Me Anything” lesson here, which anyone who pre-orders the course will have immediate access to.
That said, I also wanted to include the following links to content we’ve previously published on the PLC-5 in case any of these existing articles already answer your questions:
Eliminate commercials and gain access to my weekly full length hands-on, news, and Q&A sessions by becoming a member at The Automation Blog or on YouTube. You'll also find all of my affordable PLC, HMI, and SCADA courses at TheAutomationSchool.com.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
Sometimes it’s hard writing PLC code in LAD (ladder logic) or FBD (function block diagram). Especially, if you have to do some math work or mass operations.
In these cases you can easily use SCL/ST (Structured Control Language/Structured Text.)
Writing your first TIA code in SCL:
Step 1 – Create or open TIA project
Just like programming LAD or FBD, it’s necessary to create or open a project with a PLC to program in. SCL is supported by all SIMATIC PLCs (S7-300, S7-400, S7-1200 and S7-1500).
In this example, I’ll use a S7-1515-2 PN, but it will also work with other S7-1500 or S7-1200 PLCs.
Step 2 – Add FB/FC
After the project is opened and a PLC is available, we can add a function [FC] or a function block [FB]. The difference between FC and FB is the storage capability. A FB can store data which is still available after a PLC cycle. In our case we only need a FC.
Double click “Add new block” within the “PLC/Program blocks” folder. Now the “Add new block” dialogue is opened. Here we can select the block type to create, in our case FC.
After the block type is chosen, we have to select the language to program in. The drop down list will show all possible programming languages available for the selected block type in combination with the PLC type. We will use “SCL” of course.
If you want, you can also add additional information below in the Additional Information compartment e.g. author, version, etc.. Now we can create the block by click OK in the dialogue.
Step 3 – Modify the block interface
After the block is created, we can modify the Interface of the FC. In our case we will enter an input of type [Array[0..5] of INT], an output of type [INT], and two temp variables of type [INT].
Note: In a FB there is also a static section shown due capability to store data for more than the actual PLC cycle.
Step 4 – Enter SCL code
In the next step we enter the code to determine the maximum value of the array elements. The code will iterate from index zero to five through the array and compare if the actual value is greater than the “tempMax” value. At the end we will get the maximum value contained in the array.
At the line one we set the “tempMax” to a defined value. In this case zero.
In Line three we start the “FOR” loop. This will use the “tempCount” variable to store the actual index of our loop. It is set to zero for the start and will run until it has reached five. So we will run the loop for six times (0->1->2->3->4->5). The code of the “FOR” loop is encapsulated by the “FOR …” statement in line three and “END_FOR;” statement in line seven.
This code block contains an “IF” block which will only process its inner code if the statement “#In[#tempCount] > #tempMax” will return a “TRUE” and so the actual “maxTemp is smaller than the value of the array element with index of #tempCount.
Due to intellisense the TIA portal provides suggestions while typing code. Additional you have a favorite instruction list at the top of the text editor area just like in the editor of the other languages. Here you can add other instructions by drag them from the instructions tab.
Step 5 – Provide some data
To be able to provide our program with some values we have to create a global data block [DB] to provide some data, like we did it for the FC.
We will also enter some startup data, which is provided to the global DB at Startup of the PLC.
Step 6 – Call the FC in OB1
To use the FC in our PLC, we can call the block within the Main [OB1] and provide it with values from the “dbGlobal”. After we added the call, we can compile the program code and load it into our PLC or simulate it with PLCsim.
Step 7 – Testing
After connecting to the device (by selecting the PLC and click “go online”) and activate observe mode in the blocks, we can check the behavior of our program.
We can create a watch table to observe and modify values to test our code. Enter in the column “Modify value” a new value to set and click on the set button in the tool bar. The new value will be set into the variable and the code will process with the new values.
Note: Keep in mind a variable which is set by the PLC program will overwrite the manual set value at every new cycle.
You can modify the display format to e.g. show a variable in hex or binary notation like 16#09 or 2#0000 1001. So it is easier to read e.g. “status words”.
Step 8 – More generic approach
At the block interface it is possible to define the input array with variable limits to offer better reusability for blocks with arrays of different length. Here for we have to adapt the interface at the FC and add code to determine the lower and upper bound of the array. It is also able to do this with multidimensional arrays.
Note: Keep in mind this feature is only available in the newer PLCs (1200/1500).
Pros and cons
Pro
Con
Easy to write complex code
Hard to track signal sequences (reason why it is not used for failsafe PLC coding)
Good for mass operations
Bad logically overview
Easy programming of switch case
Sometimes hard to read
Note: You are free to use the programming language of choice which fits best to your needs. In previous courses we saw using SCL networks within FBD code. E.g. program complex code in an SCL Block and interlocking section of Outputs in an FBD Block.
Some other hints
To get an overview over the available commands in the different languages, there is a document from SIEMENS online support which helps me a lot.
Written by Michael Elting Mechatronics & Automation Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
I was nineteen years old the first time I ever used a computer and learned the possibilities of what would be my career ahead, but young people today have an advantage.
They have used phones, tablets and laptops since a very early age. All it takes is a little interest and they have the background to easily jump into a field in what is known to them today as STEM (Science, Technology, Engineering, Mathematics)
My daughters are a testament to this and since they have shown interest in the S7 1200 PLC I have been working on, we have worked on a few things together to both spend quality time as well as see what sparks interest for them in the years ahead.
Siemens Stack Light
We have a Siemens Stack Light (part # 8WD4408-OAE) that we want to connect to our S7 1200 PLC.
Wiring the Lights
A look at the manual shows us how to connect the stack light to our 24VDC Outputs as follows:
24VDC + from our power supply connects to the L+ terminal
24VDC – from our power supply connects to white wire of stack light
0 – Output 0 connects to our brown wire of stack light (RED LIGHT)
1 – Output 1 connects to our green wire of stack light (GREEN LIGHT)
Actual Wiring of outputs
Writing Her First Logic
What we decided to do was write logic that would make the lights blink alternately.
Brooklyn created a timer that would run continuously. She then used two “IN_RANGE” instructions to evaluate the “Elapsed Time (ET)” of the timer and turn on each output for one second intervals.
We also adjusted the timer preset “PT” and In_Range “MIN” and “MAX” parameters to make the lights blink at different intervals.
This helps them see physical change in the real world as a result of the program changes that they make and you can see their minds working as they catch a glimpse of what the possibilities are in the world.
When I discovered control systems and how much I loved to “Make Things Go” for a living, I have always enjoyed sharing it with others.
While I would never “push” a career path on my kids (nor anyone else) that they would not want to become involved in, I do love to share the experience and the exposure to them.
Who knows, maybe they just had a quality afternoon with ole’ dad and maybe a seed was planted for a future path. Only time will tell.
Written by Brandon Cooper Senior Controls Engineer and Freelance Writer
Have a question? Join our community of pros to take part in the discussion! You'll also find all of our automation courses at TheAutomationSchool.com.
Sponsor and Advertise: Get your product or service in front of our 75K followers while also supporting independent automation journalism by sponsoring or advertising with us! Learn more in our Media Guide here, or contact us using this form.
I'm a lifelong Technology Enthusiast who began programing in the early 80's on the Apple II and VIC-20 personal computers. After earning a degree in Electronics, I worked as a Certified Controls and Information Automation Specialist for 25 years before leaving to become a full time Industrial Automation instructor and mentor at TheAutomationSchool, as well as publishing industry interviews, news, and product how-to’s at TheAutomationBlog.com. If you're interested in my training, mentoring, or becoming a sponsor, please schedule a teams meeting with me via https://calendly.com/shawntierney/business-meeting
You must be logged in to post a comment.