Jump to content

Help with analog output

Recommended Posts


I have a problem I can’t figure out with Visilogic. I am trying to create a program in which will be used to control a hydraulic press for a plastics factory. This requires “recipes†that have different times and pressures.

I think I have figured out how to enter the recipes but the part I am stuck on is the analog output.

I am using an analog signal from a pressure transducer and outputting analog signal to a +/-10V pump control (PSI) (using an IO-AI4-AO2)

I can’t figure out how to make the program reference the current system pressure then compare that to the users desired “target†pressure then send the needed output to the +/-10v control.

EX: The user requires a pressure of 600PSI and the transducer is reading 50PSI---- The program compares the difference then between desired pressure and actual pressure and analog outputs to the +/-10V pump control.


Link to comment
Share on other sites

How fast is the shot? If the whole thing's over in a few seconds, a PID loop won't be fast enough. Please describe your process in more detail.

Joe T.

Thanks for the replies!

In answer to your question, the program will be running a press.

This is a hydraulic ram that is used in a plastics molding factory, the ram is basically similar to a giant bottle jack that presses pellets of nylon into fittings (ie; PVC type fittings).

The variables are time and pressure, the user is going to have around 5 "recipes" depending on the material he is using.

I need the user to be able to specify something like 2000PSI for 15 seconds... Then I need the program to be able to reference the MI from the pressure transducer and say "hey I'm only at 300PSI" and then pressure up to 2000PSI and count down from 15 seconds...

Link to comment
Share on other sites

A PID loop with tight parameters and the update time set as fast as you can make it will probably do the job. Take some time and thoroughly read the Help on the PID block as well as looking at the examples. You can feed the setpoint into the PID block and directly map the output register to it.

Joe T.

OK great thanks! At least I know what direction to head now.

So I have spent all morning reading about PID and I understand the idea but there is still a few concepts I'm not getting...

I understand that you must first configure your PID.

Question #1: When configuring, how do I know what to put for PROPORTIONAL BAND/INTEGRAL TIME/DERIVITIVE TIME/SAMPLE TIME???

Question #2: I am totally not understanding the AUTO-TUNE concept...

So you configure your PID then suspend it so you can run AUTO TUNE then the program is free to run the PID? Is that correct?

I apoligize for my ignorance, thanks for helping.

Link to comment
Share on other sites

  • 2 weeks later...

Hi wbv8090,

I agree with Joe Tauser, as I have already done something similar to what you are trying to do.

At first I read the feed back value and subtracted it from my command value and then with the new value that went to the analog out, but doing it this way meant that there was going to be 10-20ms lag just because of hardware update rates and your program scan rate.

So I made my own circuit board that that uses a instrument op-amp, that I connect the feed back (0-10V) to and my command (0-10V) to, it then sends the value to the valve, and it does this in microseconds, very fast.

The circuit board uses a DC converter that takes 24dc input and dual outputs, +15V & -15V for the op-amp, along with a few resistors, capacitors, and terminal blocks the board cost is around $50, the custom made board being the most expensive. (Expresspcb)

I wish Unitronics would add this kind of feature, because it would be nice to have a programmable gain setting.

Hope this helps!


Link to comment
Share on other sites

I think PID will do the job. 15 seconds is a lot of time! As I understand the system, you need to set narrow Proportional band, let's start with 50 (5% of whole range) and relativelly big Integral time. This way your press will apply full power very fast to pressure, relatively close to desired and then "slowly" will increase the pressure to desired.

Important note - there is a very helpful tool - PID server. You can find it in VisiLogic > Tools menu. This software will let you to "see" the process and will help you to improve it. In case you will need our further help with tunning the system, you can attach your application and log files from PID Server.

In my opinion in your specific case Autotune will be useless.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...