Upon attempting to alter the data from a specific format to another, an Error was encountered by the Programmable Logic Controller (PLC) indicating that the data type is invalid and the argument must match the parameter data type. Despite successfully changing a BOOL data type from 1 to 0 previously, I am unable to modify the values of this BOOL array to 0s. I am left with two questions: Is this error a limitation of Logix5000, or am I approaching it incorrectly? If it is indeed a limitation, is there an alternative method I can utilize to achieve my intended outcome?
Unlike boolean operations, FLL instructions primarily work with words (whole bytes) when handling values, similar to other instructions like MOV and CLR. Many users tend to steer clear of bool arrays due to the fact that most of their intended functionality can be accomplished by manipulating individual bits of a DINT. However, if you find it necessary to utilize a bool array, consider placing it within a User-Defined Data Type (UDT) as certain operations will accept a UDT as a valid destination regardless of the data types it contains.
By pressing F1 on the FLL instruction, you can access detailed information about it in your web browser. Unfortunately, this feature does not function with BOOLs. One workaround is creating a separate array of false bools and transferring them to the one you are unlatching. Alternatively, a more efficient method is consolidating all BOOLs into single bits of a DINT, allowing for easy unlatching by simply moving a 0 into the DINT.
When using a Function Block in PLC programming, it's important to remember that the input source should be an integer value (such as SINT/INT/DINT), not a BOOL value. Trying to input 32 bits into a single bit will not work effectively. It's best to avoid using BOOL arrays as they have limitations and many instructions do not support them as a source or destination. Instead, consider creating a User-defined Data Type (UDT) with multiple BOOL members. For example, I created a UDT with 64 individual bool members and used it in an FLL instruction. By manually setting some BOOL tags and triggering the FLL, I was able to zero out all 64 bits. This process may be tedious as it involves creating each BOOL member of the UDT individually, but copy and paste can help streamline the process. Feel free to experiment with larger UDTs to see how the FLL handles more than 32 bits effectively.
Clearing a Boolean array of any size is easily done using a simple loop, which requires only two rungs and a single OTU instruction.
Robertmee suggested using a straightforward loop to clear a Boolean array of any size with just two rungs and a single OTU instruction. I am interested in seeing what this would look like—perhaps a pencil sketch would be sufficient.
It sounds like you might be encountering a common mismatch error. Logix5000 should theoretically allow you to change BOOL array values as you described. However, have you checked if the BOOL array you are working with has been defined correctly? Remember there are limitations to the array logic, especially when it's part of a UDT (User-Defined Type). If there is any other process accessing or locking any part of the array, that might prevent changes as well. If nothing else works, you could consider creating a new temporary array with desired values and then copying it over to the target array.
From your description, it seems like your issue could be with how the BOOL array is referenced, rather than a limitation of Logix5000. Each element within the BOOL array has to be individually referenced and modified. So, rather than trying to change the array as a whole, try changing the individual values within the array. If the same error persists, then it could be a programming error somewhere else. Double check your program logic and make sure that the actual data type of the argument matches with the parameter data type in every operation.
It sounds like you're quite knowledgeable about PLCs, but it seems you've hit a roadblock that's not uncommon in the world of Logix5000. This could be a practice limitation rather than a tool limitation. Have you tried using an array of BOOLs instead of a single BOOL? By handling the whole array at once instead of each BOOL individually, you might bypass this data type error. Keep us posted on your progress. Hang in there!
It sounds like you're dealing with some classic type mismatch issues in Logix5000! These PLCs can be pretty picky about data types, especially when working with arrays. It might be worth double-checking how you're referencing and modifying the BOOL array, as sometimes the syntax can trip things up. If it's still not working, consider using a temporary INT variable to hold your desired values, then transferring those to the BOOL array. It’s a workaround, but it can help bridge the type gap! Also, consult the documentation for any known limitations related to array operations; that could shed some light. Good luck!
It sounds like you're facing a frustrating issue! In Logix5000, errors regarding data types can often stem from mismatches in how the array is being referenced or manipulated. Instead of modifying the BOOL array directly, try breaking down the operation—like individually assigning values to each element rather than attempting to change the whole array at once. This can sometimes circumvent the error. If that doesn’t work, consider using a temporary integer array to store the values first before converting it back to BOOL. It may feel cumbersome, but it could help you sidestep any underlying limitations with the array handling in Logix5000.
✅ 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: The error occurs because the data type mismatch between the argument and parameter is causing the PLC to reject the modification.
Answer: Answer: The error is not necessarily a limitation of Logix5000, but rather a result of the mismatch in data types.
Answer: Answer: One alternative method could involve converting the data type of the values before attempting to change them, ensuring they match the expected parameter data type.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.