HMI Sample Code

Sign in to follow this  
Followers 0

Panel Builder, RS View 32, Visual Basic, DDE, OPC etc...

21 files

  1. Crimson 3.0 Simple String Validation Pattern Matcher

    I developed this for work and thought I would share. It can be used for input validation and we needed it to enable validation of scanner gun input through the USB port. I also use it for serial input validation.
    Usage is: pattern.isMatch(input string, input pattern) which will return 1 if match, 0 if not a match
    I have also included toUpperCase and toLowerCase functions for strings.
    To use in your project, simply copy the pattern program folder to your project. This can be auto-migrated to crimson 3.1.
    Pattern string syntax is described in the comments or by clicking the guide button.
    Worth using this testbed to debug your pattern strings before using in a production environment. The controls and bits on the right side of the test page allow you to tab through your pattern and the string and see what matches each char.
    You can see a mockup of a real world batch-entry view on the "Demo" page and edit the input fields to try to defeat the validation.
    If you end up using it, toss a thanks my way if you can. If you find any bugs, please let me know.
    Built with Crimson 3.0 v707.000, tested in built-in emulator and used on Graphite G07s with both Crimson 3.0 and 3.1 runtimes.



  2. Crimson 3.0 "Page" List Selector

    I needed an equivalent to the Panelbuilder32 screen list selector for up to 26 pages with scrolling too, so I built one.
    I thought it would be a nice thing to have access to for those of us who have a lot of PB32 to G3 conversions in our future.
    It is built for a G310 and there are comments in the program files with some instructions for how to customize it for different lengths. Right now, it is set up for 50 pages, with a visible length of 14, but that is easy enough to change. My goal with this conversion is to make it as easy as possible for veteran operators to adjust when we replace the Panelview 1000, so I made it look as much like the PB32 object as possible.
    EDIT: I should explain, to get the the page with the page list selector, hit the button at the bottom, 2nd from the left labeled "Screen Menu".
    This app also includes SLC communications with alarming, and SLC error codes with complete text, and language switching (English and Spanish, but the Mexican flag icon was not properly saved with it, so if you click the American flag, it will disappear and switch to Spanish (machine translated!) just touch that area again to switch back to English.



  3. Crimson 3.0 SLC Error Codes with Text

    This zipped cd3 file, built with Crimson 3.0 version 469.000, contains a tag (Status.SLC_ErrorLSW_Dec) which will display all of the error codes for a SLC.
    The tag is set up with a multi-state format with 93 states to cover all of the error code texts as found in the RSLogix500 Online Help. For items that reference a slot number or a file number, that information is embedded in the text as well. You should be able to copy and paste the relevant tags into any application using a SLC, and then point the data source at your already configured device.
    There are a few other tags including one designed to interpret the SLC keyswitch and mode.
    There are a few other pages already set up for a Fault History, Active Faults list, and some Master Slides with dummy buttons on them that write to internal bits.
    The device "SLC" is set up on the RS232 port with a DF1 driver set for 38.4k baud. If you need to use Ethernet or a different port, delete the device SLC first, then add your new device and name it SLC. This will take care of any tag reference errors. After all the tags are identified with your SLC on your comms channel, you can rename the device as you wish and Crimson will rename it throughout the application.
    On the SLC Status page, the whole S:6 error code tag is set up as a data entry field (in hexadecimal). Writing a value to that S:6 address will not cause the SLC to fault, it will let you view the text for each value for testing and demonstration purposes. If you use these elements in a production situation, that field should be changed to display only.
    Note the little flag icon on the upper right? That switches languages too. I did that with a couple mouse clicks in Crimson to do the whole database from which this file was extracted. Later, I went back and deleted the translations for the tag states because many of them became too wordy to fit neatly on the screen.
    EDIT: r001: Added flashing indicators for each of the first ten slots that will light up when the respective slot generates a fault. If the slot is 31 (dec) all slot indicators light up and another text pops up to tell you that the exact slot cannot be determined. Improved one of the error descriptions based on online help at Added indicator for EEPROM Loaded on boot. Touching that indicator will allow the user to clear the EEPROM Loaded bit.
    If there are any corrections or further enhancements or suggestions to make this file better, please do let me know. I love constructive criticism.

    EDIT: I think you may find that the flag icon doesn't include the bitmap for the Mexican flag when switching languages. After I shared this file, I learned a few more things about how images can be stored relative to (or within) the application. My next revision will embed that flag icon in the application, add numbers to the slots, and not turn the processor "flashing fuschia" unless the SLC is truly halted (just 'cause the last major error word contains data, doesn't mean it ain't runnin' again...)



  4. PanelView Plus Navigation Bar

    This is a simple configuration example for navigating between Displays in FactoryTalk View ME with a "Navigation Bar".
    This example uses the Global Connections feature, pointing the Remote Display Number connection at an internal HMI Tag (Display_Number_Read).
    Whatever value is written to the Display_Number_Read tag will be the number of the Display that is shown.
    The Global Connections feature is also writing the current Display Number to another internal HMI Tag called Display_Number_Write. This is just for the purpose of showing the difference between these two features, which are very often misunderstood or confused.
    All three of the ordinary Displays are "Replace" type, which gives them Display Numbers (1,2,3). The Navigation Bar is another Display but it is an "On Top /Cannot Be Replaced" type and does not have a Display Number.
    A Global Object would be another way to implement this functionality of a Navigation Bar. The Remote Display Number tag could also reside in a PLC, rather than as an internal HMI tag.
    This project Archive was created in FactoryTalk View ME Studio 6.0 and cannot be opened in any earlier version of FactoryTalk View Studio or RSView Studio.
    The file is a *.APA Archive file, compressed as a ZIP file for attachment to the MrPLC server.



  5. Excel PLC Event Logger

    Excel file which can record when a bit or word changes state in PLC logic.



  6. RSLinxReadWriteDemo

    With some help I put together a "Complete" Visual Basic Project to use as reference for creating other Visual Basic RSLinx interfaces. This was created with Visual Studio 2005 SP1 and is the full project. There are examples of SyncRead SyncWrite and AsyncRead. I tried to document as much as possible both for future reference and to make it easier to under stand. I can't garauntee that my descriptions are the best they are just my understanding of how things work. If there are problems I will see what I can do to fix them.
    Hope this Helps!
    /dancered.gif style=vertical-align:middle emoid= border=0 alt=dancered.gif />



  7. Excel to PLC thru RSlinx Demo

    A Kernel Spreadsheet for Reading and writing Clocks of SLC PLC and ControlLogix plc's. Well Commented and can be adapted for many other DDE applications. Created June 2000 and last revised Dec. 2003.



  8. PanelView Display of multiple IO point status

    Using 1 control list & 1 Multi-state indicator select any digital IO to display its state (ON or OFF).
    Simply copy the IO you want to monitor into B3:0 onwards. Fill the control list with descriptions for the IO you wish to monitor.



  9. Excel HMI Trend graph.

    Excel HMI Trend Graph. Credit goes to justind for writting code. Thanks for the help.



  10. Test DDE Poke using Excel and PLC 5

    Test read and write from Excel to PLC5.



  11. Production TAKT Timer - Panel View Program

    Our Improvement department wanted a way for the operators to know where they were in the process based on cycle times. I came up with this little jewel to alert the operator with a buzzer half way and < 30 seconds remaining. We look at # Made Hit an



  12. Simple Excel PLC Data Logger

    Have you ever wanted a straight forward data logger?
    Have you ever wanted to log at speeds greater than 1 sample per second?
    This is a simple one off file with up to 10 streams logged but no time stamp.
    The purpose of this file is to provide a



  13. OCX Control in Visual Basic 6

    Start\Stop push buttom to be used in visual basic applications



  14. MapleSystems HMI Program w/Allen Bradley Micrologix 1500

    This is the first HMI program I did with an Allen Bradley 1500 and a Maple System HMI. The ZIP file contains a compressed file. You'll need to use the MapleSystems "Decompress" utility to unpack and open this job in Easy Builder software. E



  15. Allen Bradley using DDE with Microsoft Access Database

    Example how to use Microsoft Access to log information from your Allen Bradley PLC through a DDE link and RS Linx.
    You'll need to copy the two .mdb's to C:\Dbase\RSchmidt and fiddle with the setup table. If you want to see this



  16. Allen Bradley SLC500 DDE Link to Excel Logger 1.4

    This is an example of a spreadsheet using DDE to get data from a SLC500. We used RS LINX Single Node and a computer to read data from a SLC500. The spread sheet has alot of extra Visual Basic Scripting to handled file name & renaming. For example w



  17. VB 6.0 DDE to SLC Logger

    Sorry this is not all finished but I figured this is enough here to give someone some direction. The basic function of the application is a VB 6.0 application that was setup to read five words of data from a Micrologix or SLC PLC using DDE calls within V



  18. VB 6.0 Allen Bradley PLC Clock Synch Program

    This is a simple program that utilizes the Rockwell Software RSLinx Professional to communicate over ethernet to a SLC5/03 5/04 or 5/05 type PLC and synchronize the clock in the PLC to the clock in a computer. This utility is useful for quickly synchron



  19. RS View 32 Application Example - Logger

    This is an example RS View 32 application with a RS Logix 500 PLC program (Micrologix 1500). Basically it was an interface that captured the peak lbs reading from five load cells. Each time the station cycled RS View would log the peak lbs of force for



  20. Allen Bradley Panel View 550 Program

    Just a nice panel view application that was done on a index table machine. This panel view had manual functions for each motion and showed a picture of the index table and a status of each head.



  21. Allen Bradley Panel View 550 Application

    This is another index table type machine that used a panel view 550. This panel view controlled a high pot tester three IA servos and a Unson Leak Tester module. All the automation heads had manual functions and run one cycle buttons. There was also a



Sign in to follow this  
Followers 0