I am currently coding with SoMachine Basic using an M221 PLC and have encountered a recurring issue that I've experienced twice recently. This is unfamiliar territory for me, as I don't recall facing this problem in the past. I am employing set and reset coils in my programming. At the start of each cycle, my program sets a bit to "on," and then resets this bit at the cycle's conclusion. Consequently, I have a bit that remains true throughout the entire cycle, serving as a signal for the rest of the program. The problem arises when I power down the PLC and then power it back up— the coils still appear as set within the program. This results in specific segments of the program activating as if the cycle is in progress, even though it isn't actually running; the coil was simply set before the PLC was powered down, and it remains set upon restart. Is there a solution to this issue? Am I overlooking a straightforward fix? While I could reset every coil on the first scan, that feels impractical. Is there a "reset all" function available in SoMachine Basic that I could utilize? I would greatly appreciate your insights and suggestions on how to resolve this problem effectively.
To reset all of your coils, utilize the first scan bit in your programming setup. Additionally, consider implementing non-memory retentive coils for enhanced functionality. I hope this information proves valuable to you. Best regards!
It seems there's some placeholder text ("%s13---| |--------------------------------------------%m0:16 :=0|%m16:16:=0") instead of a coherent message. Could you please provide specific content or context you would like to have rephrased? This will help me assist you better!
Lare mentioned: “I'm sorry, but I'm having a hard time grasping this reasoning. I understand that %S13 refers to the first scan bit, but could you clarify what else you are setting to zero? I appreciate your help in explaining this for those of us who are still learning!”
Transfer an integer value of 0 to the bits for addresses %M0 through %M15, which represent a contiguous string of 16 bits. While it's possible to utilize 16 separate reset coils for addresses %M0 to %M15, this method is more efficient and quicker to implement. You can employ this command anywhere on the bit side; just ensure that the starting address is divisible by 16. Note that using 8 as a divisor may also be applicable, as you can utilize the command at least with %Mx:8 as well.
It sounds like you're dealing with the retention behavior of the coils in SoMachine Basic, which can be quite tricky! Unfortunately, there's no "reset all" function for coils, but one common approach is to use a specific reset condition that activates only on power-up or upon the first scan. You could implement a flag that checks if the PLC has just powered up and then resets the coils before proceeding with the main logic. Alternatively, if you’re handling critical operations, considering a structured way to manage your state variables might help avoid these unintended activations from previous cycles. It might take a little time to adjust your program, but it'll be worth it to ensure your system starts fresh every time!
It sounds like you’re running into the typical issue of retaining states after a power cycle, which can definitely be frustrating! While there's no universal "reset all" function in SoMachine Basic, a common approach is to use a separate initialization routine that executes only on the first scan of the program after a power-up. You can create a boolean condition that checks if it’s the first scan (like a boolean flag that remains false until the program runs for the first time) and then reset your coils accordingly. That way, you can ensure all your states are in a known condition at startup without needing to reset everything manually. Additionally, double-checking the configuration for memory retention could be helpful, as sometimes settings might inadvertently cause these bits to retain their states. 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.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.