Alvin2826

PIDAT in Sysmac Studio

5 posts in this topic

Hello all,

I am currently working on my first automation project and I have approach a problem when simulating my PIDAT function in Sysmac Studio. I found this forum in search for an solution, so I thought I would post my problem here in hopes of someone with more experience could help me out.

For this part of the project, I need to automate a modulating valve such that it allows or restricts the flow rate of water to a pool. Of course, this would all be dependent on the measured flow rate through the pipe and the desired setpoint of the flowrate. Both the flow meter and the modulating valve will be operating on a 4-20 mA signal connected to the NX1P2. Now, the problem that I am currently dealing with would be when I start the simulation, the PIDAT function immediately begins in an error state, outputting an ErrorID of #0400. From the manual, it states that the input value is outside of the valid range; however, I believe that I have set the correct range. Again, I am new to this, so there is a high chance that I am wrong.

Below are images of my current ladder logic, with the set parameters for the OrpSetParams and InitSetParams inputs. The first rung converts the flow meter signal from INT to REAL and then to the processed flow meter units (still undecided). The second rung contains the PIDAT function. Finally, the third rung converts the outputted REAL data from the PIDAT to INT, and then sends that signal to the modulating valve. 

If anything seems wrong with the ladder logic or the parameters, please let me know!

Thanks!

 

ladder.PNG

opsetparams.png

initsetparams.png

Share this post


Link to post
Share on other sites

I know the PID instruction did not work in Simulation in CX-Programmer.  I am not sure if it works in Simulation in Sysmac Studio.  I have not yet found the answer.  I can try it out myself later.

Share this post


Link to post
Share on other sites

First, try making your Proportional Band a non-zero value.

 

Also, your sampling time seems short to me.  I don't know the nature of your application, but 500-2000ms maybe a better value.   

Share this post


Link to post
Share on other sites

It does indeed work in simulation.  I agree start with a non-zero Prop band.  I would start with I and D = 0.  

Share this post


Link to post
Share on other sites

Thanks for the responses, I will definitely try it out!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now