I received an email from a customer seeking assistance with setting up an ASCII input on the Weintek HMI to identify and save process data by part number. The customer is using a Micro850 PLC and wants to display alphanumeric part numbers. They have tried looking for solutions in manuals but haven't found much help. The only input/output object they found is the ASCII object. They have experimented with setting up variables as strings and arrays of strings in CCW and EASYBuilderPro, but encountered limitations with data type and size. The customer is unsure if setting up an array of characters for each string is the correct approach to achieve an ASCII input. Any assistance or guidance on this matter would be greatly appreciated. Thank you for your help. - Mark
These Weintek HMIs are equipped with ample memory capacity. To streamline the process, consider storing strings in a reference table on the HMI and transmitting them to the PLC as numbers using a consistent part number. On the AB side, creating an array for the "String" is essential. On the HMI side, your client should set up an ASCII input box to input data into memory. This input box can be used to initiate a macro for transferring the part to the PLC as shown in the code snippet below: macro_command main() char recchar[60]="" GetData(recchar[0], "Local HMI", LW, 0, 10) SetData(recchar[0], "Allen-Bradley EIP", "LOG_FILE[0]", 10) end macro_command Depending on the number of parts, your client can utilize a drop-down combo box for selecting parts, which will be converted into numbers before being sent to the PLC. This method is more efficient and space-saving. Upon selection, the part can be displayed as text on the HMI.
I appreciate the valuable information provided, and I will be sure to share it with others.
I encountered a similar issue and found a solution by counting the characters in the data and then copying them to the desired length. In a programmable logic controller (PLC), you can achieve this by using the following code snippet: ``` VAR vari: INT; myString: ARRAY[0..255] OF INT; charCount: INT := 0; END_VAR FOR i := 0 TO 255 DO IF myString[i] = 0 THEN charCount := i; EXIT; END_IF END_FOR (* charCount now stores the length of the string *) Simply copy the length that you require but are currently not receiving. I hope this explanation helps.
Hi Mark, it seems like a tricky situation but not impossible to solve. Both EASYBuilderPro and the CCW are quite able tools. It sounds like you might be dealing with a situation where you're trying to fit a larger string of ASCII characters into a data area designed to hold a smaller size. An array of characters for each string does sound like the correct approach to start. What you could also try is splitting up the ASCII input into smaller, more manageable strings that can then individually be loaded into the PLC. You should also consider using STRING data types to allow for more alphanumeric characters. Depending on the volume of data you're dealing with, you might look into options like data compression or more efficient data encoding strategies. If the restrictions persist, it might also be a good idea to look into potential firmware updates, or even consider an HMI or PLC that offers larger data size limits to meet your needs. Hope this helps.
Hi Mark, sounds like a complex situation you're facing! Based on your description, setting up an array of characters for each string could be a valid approach. However, you might want to try using a Structure of Arrays (SoA) method in CCW. This could potentially get around your data type and size limitations. Also, try delving deeper into specific ASCII configuration within the EASYBuilderPro manuals. There's usually more detailed information on handling alphanumeric part numbers there that may not be immediately apparent. I hope that helps and look forward to hearing about your progress!
Hi Mark, I believe the issue here could be simplified. Instead of setting up an array for each string, one thing the customer could try would be working with the inbuilt ASCII instruction (ASC) in the Micro850 PLC. Using the ASC function, you can convert alphanumeric characters to ASCII values and save them into a word or array of words - no need to set the variable as a string. The Weintek HMI should be able to handle and display these ASCII values. I've encountered similar situations and this method typically offers greater flexibility with data types and sizes. Good luck, hope this helps!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: To set up ASCII input for alphanumeric part numbers, you can utilize the ASCII object available in Weintek HMI. Experiment with setting up variables as strings and arrays of strings in CCW and EASYBuilderPro to overcome limitations with data type and size.
Answer: Answer: If you are struggling to find solutions in the manuals, consider reaching out for assistance through forums or contacting the Weintek support team for guidance on setting up ASCII input for alphanumeric part numbers.
Answer: Answer: Yes, setting up an array of characters for each string can be a suitable approach to achieve an ASCII input for displaying alphanumeric part numbers on a Weintek HMI with a Micro850 PLC. Experiment with this method and adjust as needed based on your specific requirements.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.