Eschubertsson Posted October 17, 2017 Report Posted October 17, 2017 Hi! I have a project where I need to connect a PLS to a Universal Robot via MODBUS and have it run different programs based on user input. The idea is basically this Display a screen asking for a part ID Operator enters part ID based on the part he wants the machine to make Based on the partID the PLS will send a signal via modbus telling it to setup for that program, and the PLS will load a certain ladder logic path for that specific program. I tried to do this on a Samba 4.3 but I got stuck on in two places which seem to be hardware limited 1.It didn't allow me to have more than 5 digits in a numeric input, I'd prefer it to have 7 since that's how long the part ID's of the customer is 2.I didn't find a way to mix letter and number in a input box Is this a a hardware limitation of the Samba, if so is there a PLS/HMI you offer which could support the requirements I have? If the other PLS system supported a keyboard that would also be a bonus, typing on a keyboard is a lot better than a touchpad.
MVP 2023 Flex727 Posted October 17, 2017 MVP 2023 Report Posted October 17, 2017 5 hours ago, Eschubertsson said: 1.It didn't allow me to have more than 5 digits in a numeric input, I'd prefer it to have 7 since that's how long the part ID's of the customer is Link the numeric input to an ML instead of an MI. 5 hours ago, Eschubertsson said: 2.I didn't find a way to mix letter and number in a input box Use a string input instead of a numeric input.
Eschubertsson Posted October 17, 2017 Author Report Posted October 17, 2017 Thanks! That seems to have solved both issues. A question about the ASCII String tool, it converts the strings to decimal then saves it to ML. Is there a way to stop it from converting the string to a decimal and just saving the string to ML as plain text? Figuring out what each of my 60 strings is in decimal is a bit of a hassle if it's not necessary to do.
MVP 2023 Flex727 Posted October 17, 2017 MVP 2023 Report Posted October 17, 2017 Strings are stored in a vector of MIs, two characters per MI. 1 hour ago, Eschubertsson said: Figuring out what each of my 60 strings is in decimal is a bit of a hassle if it's not necessary to do. Not sure what you're trying to do here. Are you entering a string via HMI or are you storing already known string for use in the program?
Eschubertsson Posted October 18, 2017 Author Report Posted October 18, 2017 I am trying to build a machine that is going to make 60ish different parts. And I want it to be as simple as this: Operator enters program ID into a text box on the HMI. The PLS takes the String/Program ID and loads it into an ML. Then it takes that ML value and compares it to the database of 60ish programID's, and finds the program associated with that program ID and loads it. Then finally when the operator presses cycle start it starts the cycle and loops the loaded program until the operator presses cycle stop.
MVP 2023 Flex727 Posted October 18, 2017 MVP 2023 Report Posted October 18, 2017 What would be an example of a "Program ID" that would be entered into the text box?
MVP 2023 Flex727 Posted October 18, 2017 MVP 2023 Report Posted October 18, 2017 Just to shortcut this a bit. I would enter the 60 Program IDs into a Data Table then use the "Find Row" function to compare the HMI entry to the Data Table column with the Program IDs. This function will return the row number which you can then use to key the 60 different cycles.
MVP 2023 Joe Tauser Posted October 19, 2017 MVP 2023 Report Posted October 19, 2017 Understand that all data (including strings) is stored as an integer. Each character requires 8 bits (one byte), and two characters are stored as hex in a regular 16 bit MI. That doesn't mean you have to decipher MI values into hexadecimal string values. The data table search and string HMI elements will do that for you. Read the Help on how Data Tables work. They are a little daunting but very powerful. You can enter data into the table on your PC, but don't forget to download it. It doesn't go down when you download the program. You may or may not want additional screens to enter data on the PLC. Experiment with your code on a live unit until you understand them. If you have questions, post your code. Troubleshooting ladder logic with words is hard. I've attached an example. Joe T. Data table lookup example.vlp 1
Eschubertsson Posted October 19, 2017 Author Report Posted October 19, 2017 16 hours ago, Flex727 said: What would be an example of a "Program ID" that would be entered into the text box? An example would be RV12345 15 hours ago, Flex727 said: Just to shortcut this a bit. I would enter the 60 Program IDs into a Data Table then use the "Find Row" function to compare the HMI entry to the Data Table column with the Program IDs. This function will return the row number which you can then use to key the 60 different cycles. I'll try getting datatables working with the example Joe gave me and see if I can make better progress that way, 1 hour ago, Joe Tauser said: Understand that all data (including strings) is stored as an integer. Each character requires 8 bits (one byte), and two characters are stored as hex in a regular 16 bit MI. That doesn't mean you have to decipher MI values into hexadecimal string values. The data table search and string HMI elements will do that for you. Read the Help on how Data Tables work. They are a little daunting but very powerful. You can enter data into the table on your PC, but don't forget to download it. It doesn't go down when you download the program. You may or may not want additional screens to enter data on the PLC. Experiment with your code on a live unit until you understand them. If you have questions, post your code. Troubleshooting ladder logic with words is hard. I've attached an example. Joe T. Data table lookup example.vlp Thanks! I'll try this and see if I can get this working! It'll probably be a whole lot easier to upgrade with more programs if the customer would like in the future!
MVP 2023 Flex727 Posted October 19, 2017 MVP 2023 Report Posted October 19, 2017 Another option for you that's a bit more straightforward, if a bit more cumbersome: If you can group your 60 Program IDs into some logical grouping, say 6 groups (each on a separate HMI screen) of 10 program IDs, you could just have pushbuttons for each program ID. Label each pushbutton with the program ID instead of having the operator enter it each time on the HMI (which can be a pain). Pressing the button turns on a bit that activates the cycle associated with that program ID.
Eschubertsson Posted October 20, 2017 Author Report Posted October 20, 2017 15 hours ago, Flex727 said: Another option for you that's a bit more straightforward, if a bit more cumbersome: If you can group your 60 Program IDs into some logical grouping, say 6 groups (each on a separate HMI screen) of 10 program IDs, you could just have pushbuttons for each program ID. Label each pushbutton with the program ID instead of having the operator enter it each time on the HMI (which can be a pain). Pressing the button turns on a bit that activates the cycle associated with that program ID. Sure, that could be a solution if I really really couldn't get my head around data tables. But I feel like the customer would be more happy with a single screen (plus one or two for alarm, different status of the different main components of the machine). Sleek was a word he often said during the "consultation", so to speak.
MVP 2023 Flex727 Posted October 20, 2017 MVP 2023 Report Posted October 20, 2017 7 hours ago, Eschubertsson said: Sleek was a word he often said during the "consultation" Can't argue with this. "Slick and professional" is what I try to achieve with every project.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now