Hello Guest it is April 29, 2024, 12:25:41 AM

Author Topic: Help with PMC logic  (Read 169 times)

0 Members and 1 Guest are viewing this topic.

Help with PMC logic
« on: March 12, 2024, 06:06:37 PM »
I am looking for some help getting a simple logic ladder in the PMC to work on my machine. I am running an ESS, with this I have created a PMC code that looks at inputs given a set of conditions, I trigger two outputs to run relays for air solenoids, and when new input conditions are met, I turn those two outputs off to return my air cylinders.

I have logic that functions, however, when it is running, it is constantly sending a signal to deactivate my two outputs. Because of this I have had issues with my FIFO drain when homing and other general lag and step loss in my motors. Is it normal for the PMC to constantly tell the controller to deactivate an output like thus even when all the rungs are false?

I tried to implement a fix where instead of using a standard coil that I turn on or off, I am using a set-only coil and and reset-only coil for those outputs. This kind of works, it eliminates the constant spamming of deactivating my outputs, and will activate the set coils and relays when appropriate. However, the reset only coils do not turn my output back to 0 and return my air cylinders. I have looked at the LUA ouptutted code and can see that it is telling those outputs to go to a 0 state, but it is not actually happening in practice.

I have attached an image of my original logic that is working while showing the log screen with the constant signal to deactivate my output.

Any help on this is appreciated, thus is not behaving like any other plc I have worked with in the past. Thanks.

Offline cncmagic

*
  •  63 63
  • what me worry? heck...it ain't my machine anyway
    • View Profile
Re: Help with PMC logic
« Reply #1 on: March 13, 2024, 08:06:04 PM »
first off.. place One Shots before the latches and unlatches so that the code doesn't continually write to the output..I'll look at the rest of the code and see if I have any other suggestions.  :o
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
Re: Help with PMC logic
« Reply #2 on: March 13, 2024, 08:19:10 PM »
Thanks for taking a look. I appreciate any input you can provde. I've tried multiple variations with one shots, however the one shot only seems to temporarily trigger the output relay which doesn't keep my air cylinder extended.

I also tried something along the following attachment, and it works, however my reset coils don't actually turn my output off and bring my air cylinders back.
Re: Help with PMC logic
« Reply #3 on: March 14, 2024, 01:38:41 PM »
I was able to get this working. I had to use a combination of OSR and resetting some internal relays to get things to fire correctly.