Dippy

MrPLC Member
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Dippy

  • Rank
    Sparky

Contact Methods

  • Website URL http://

Profile Information

  • Country United Kingdom
  • Interests Control Systems Design
  1. energy management

    Hardware or Software side of it? Hardware. Electric: It depends on how much detail you want to data-log and how big your budget is. You can start by fitting Electric energy meters into your main incomming distribution board. Choose one with Modbus Ethernet TCP/IP. It makes extracting the data easier. From there, you can put Meters on each of your plant for more detail electric usage. Hardware. Gas: Fit in-line gas flow meters to measure your gas consumption. Most meters have pulse outputs which can be scaled depending on the volumn of gas your plant consumes. Again, if you budget allows, try getting a meter with Ethernet TCP output. Software: There are Software already sold out there for this purpose. I remember seeing one sold with their range of Metering devices. Can't remember the name but its a French manufacturer. If you want to write your own, I have used CITECT Scada in the past. Using the Process Analyst ActiveX, you can create your own custom data-logger very quickly. ie. 30min, 1 hour, 1 Week, 1 month, Yearly reports. The PC runs 24/7. All comms between the SCADA PC & Meters is via standard Ethernet connections.
  2. You can use a Photoelectric Sensor mounted on your frame along with a reflector at the other end so when a basket breaks the line of view, it will trigger a circuit. This works well with our Auto Blackening line and the baskets looks very similar. An example is Telemecanique XUX0ARCTT16. This works with 120VAC. There are lots out there. There main things is you want one with a Relay output. As for the control circuit, I would recommend a Q12H PLC system with Single Phase Speed Inverter and a full SCADA license. Only Kidding1 Try this.
  3. problem about timers in citect scada

    There are no user friendly timer functions available in Cicode and I wouldn't even try to start using CiVBA. You can use a 1 second event and count the seconds triggered to perform some non important task but I wouldn't recommend it for critical timing applications. Use a PLC or external timing device if possible but if you dont have that option, then you can use the Time and Date cicode functions. You will have to create your own functions to do this. A simple example. You start a process and want to timeout after 30 mins Create a LONG variable and store the TimeCurrent() when the process starts. The TimeCurrent() increments a numerical value once every second. Therefore 30 mins = 30 x 60 seconds = 1800. Add this to the LONG variable. Now create a 1 second event to call a function that checks the TimeCurrent(). ie. IF TimeCurrent() >= LONG variable THEN... (30mins has completed). To monitor the Duration of the Time done so far, just use the DateSub() cicode function. ie. LDuration = DateSub(TimeCurrent(), <LONG Variable Name>)
  4. From 'Citect Project Editor/system/Events', Create a 1 second event to call the cicode function fnTimeCounter() From 'Citect Project Editor/Tags/(Variable Tags or Local Variables)', Create your digital tag. Using the Cicode Editor, create a function.. INT icounter; ! This is Global Variable   FUNCTION fnTimeCounter() icounter = icounter + 1; IF icounter <= 5 THEN dTag1 = 1; END IF icounter >5 THEN dTag1 = 0; END IF icounter = 7 THEN icounter = 0; END END Compile and Run the Project. dTag1 will now switch ON for 5 seconds and Switch OFF for 2 seconds continously.
  5. CITECT

    Use a Super Genie Page to popup. You can then create as many text displaying lines as you wish.
  6. Use the cicode function ProcessAnalystSetPen((iPen, sTag [, sObjName [, iPane]]) )
  7. Here is another little tip to allow the above example popup to appear at the position on the screen where it was pressed. 1) Remove the 2 lines from the fnPumpCtrl() function. INT XPos = 100; INT YPos = 100; 2) Create these 2 Tags either in the 'Variable Tags' or 'Local Variables' so it can be accessed anywhere within the SCADA environment. 3) Create a cicode function using the cicode editor.. FUNCTION MouseCoOrd() INT iXPos; INT iYPos; DspGetMouse(iXPos,iYPos); XPos = iXPos; YPos = iYPos; END 4) From the Citect Graphics Builder, Load the screen where the popup will appear. Select 'File/Properties/Events/While page shown command', type in MouseCoOrd() This will cause the MouseCoOrd() function to be called whenever the screen is displayed. The function call rate is now based on the screen update rate(default 250 msec). If you have popups throughout every screen in your project, you can just put this in the template used by all your screens. 5) Re-compile & Run the project. The popup will now appear on the screen from the position it was called from.
  8. I have tried using the Form method of creating popups in the past but find it awkward to use. Maybe its just me but I find remembering the co-ordinates to place the inputs a pain. Its much easier to use SuperGenie instead. This way, you can create your pop-up graphically as you would with any page. Suppose I wanted a popup to control a pump. Heres an example how I'd do it... The popup has 3 buttons. A 'ON', 'OFF' and "CLOSE" button. It also has a numerical number showing the speed setpoint for the speed inverter. 1) I don't know what PLC or Device you are using so we will assume you have already created a device from the Citect Project Editor/Communications/Express Wizard. 2) In the Variable Tags, create: dPumpOnOff (Digital) iPumpSpeed (INT) 3) From your project screen, the icon input that triggers the popup, you would call a cicode function. example: fnPumpCtrl() 4) Create a cicode function using the cicode editor. The AssVarTags cicode function allows up to 8 tags with a Super Genie. The function below uses 2. FUNCTION fnPumpCtrl() INT XPos = 100; ! This is the X Co-ordinates of the top left corner of your popup being shown. INT YPos = 100; ! This is the Y Co-ordinates of the top left corner of your popup being shown. STRING sPumpOnOffTag = "dPumpOnOff"; ! This holds the name of the Variable Tag "dPumpOnOff" STRING sPumpSpeed = "iPumpSpeed"; ! This holds the name of the Variable Tag "iPumpSpeed" AssVarTags(-2, 0, sPumpOnOffTag, sPumpSpeed); WinNewAt("!PumpPopup", XPos, YPos, 1+2+8+128+256); END When this function is called, it will call a screen to appear on top of the screen that called it. 5) Create a new screen page and save it with the name !PumpPopup From the 'Citect Graphics Builder/File/Properties' change the screens View Area Width & Height to suit the size of the popup. Place a BUTTON onto the screen. From the 'Button Properties/Appearance/General/Text', type in the text ON From the Button Properties/Input/Touch/Up command', type in ?1?=1 Click the OK button below. Place a BUTTON onto the screen. From the 'Button Properties/Appearance/General/Text', type in the text OFF From the Button Properties/Input/Touch/Up command', type in ?1?=0 Click the OK button below. Place a BUTTON onto the screen. From the 'Button Properties/Appearance/General/Text', type in the text CLOSE From the Button Properties/Input/Touch/Up command', type in Winfree() Click the OK button below. Place a NUMERIC onto the screen. From the 'Text Properties/Appearance/Display Value/Numeric expression', type in ?2? From the 'Text Properties/Input/Touch/Up command', type in ?2?= FormNumPad("Speed Setpoint",?2?,0) Click the OK button below. Note that we use ?1? and ?2? as the substitutions for the tag names when we assigned them using the AssVarTags() from the fnPumpCtrl() function. 6) Save the screen Compile and Run the project. Using a Super Genie page allows you to create some fancy popups such as your own popup keyboards.
  9. do i really need a PID loop?

    I dont see why this wouldnt work. Try 1 second sampling, because you will only increment/decrement the output value of 4000 numerics per band per blower. This equates to only a 40% speed adjustment on each of your blowers from 30 to 50hz. An adjustment of +/- 1 numeric per second is quite fine. I assume you are going to restrict your 2 inverters so that minimum speed is at 30hz. (This will aid in your blower motor's cooling). You can also connect the inverters to seperate Analogue outputs rather than connecting a single 4-20mA output in serial to them. This would get rid of the headache of scaling your inverters to react to the lower and upper bands of the 4-20mA signal. You can then use PLC code to output to each analogue channel if the input was below or above 4000. Dont forget to invert your input value. ie. Output_Value = 8000 - Input_Value If Output_Value < 4000 then Channel1 = Output_Value x 2 If Output_Value >= 4000 then Channel1 = 8000 Channel2 = (Output_Value - 4000) x 2 Best of luck on this project.
  10. do i really need a PID loop?

    Just a few questions to you application. With the 2 blowers on maximum speed does the DO meter reading increase rapidly? How long does it take to achieve setpoint? Are we talking seconds or minutes? Your idea is splitting the 4-20mA into a low and high band to increase your main blower to 100% during lower band and then 100% of your duty blower for higher band. Does having both blowers increase in speed simultaneously rather than sequentially increase your DO too rapidly? As your DO meter signal drops, you increase your blowers speed. You will most likely need some other code to fine adjust the magnitude of the outputs to your blowers otherwise you will see excessive hunting of your Process value to setpoint. This all depends on how fast the reaction is in your process. I have used this method in the pass on applications where PID control just could not handle the process, like controlling EB Gun power to vaporise alloys. Also try adding timers in between the DA numeric adjustments. The closer the PV is to setpoint, the slower the adjustment. The further the PV is to setpoint, the faster the adjustment. Also try adding deviation bands into your setpoint to stop continued adjustments instead of just < > from setpoint.
  11. FX3U performance for temp control

    In my own experience, I've found the biggest brain ache with all these PLC PID functions is the lack of AutoTune. Having never tried the FX3U, I cant comment on its autotune function. Also when creating loop control from PLC PID functions, its only the basic core control. You still have to create other associated functions like High/Low cutbacks, Ramps, Holdback, etc.. You feel that you're re-inventing the wheel. Also a majority of the time, the finish product is used by operators/service engineers and not us programmers. So to tell them to set up the PID means timing the time when over/under shoot occurs from setpoint and then applying a little calculation to it and then inputing that value to the PID parameters is a non starter. I've tried various Loop controls over the years, from Function created loops, FX2N-2LC to descreet Modules. It all depends on the type of control you are applying to. From single to multiple loops, I now use descreet hardware modules. Not wanting to sound like an advert for this manufacturer, I'll only link their page. RKC They are off the shelf items with CCLink and very simple to use. Excellent Autotune. This is my own opinion, but in my experience, everyone wants a single button to press and after a few minutes later, All pid loops are controlling to setpoint.
  12. FX1N- 2 ^ 1.23 calculation

    Here's a PLC example. It will work with all Q series and FX3U with maybe a small modification. I'm also sure Ive done this type of conversion working on Pirani Vacuum gauge equations wih the FX2N, but I'll need to dig up the code from those projects. For those working with GX-IEC, you simply create a Structured Text Function and write in the function block.. result := var1 ** var2
  13. Mitsubishi Programing

    Try this.
  14. Help wanted with Q68ADV

    The Welder's output differs from time to time is probably due to the process heat and other physical factors during a weld. I assume that your welding units actual output signal is wired to your Q68ADV unit? If not, you will need to wire it to a spare channel on your Q68ADV so your PLC program can see the numbers. Once your PLC can see the numbers, scale it to your welders Current output range Use the [> Data1 Data2] or [< Data1 Data2] to compare your incomming actual current to your setpoint. If its out, then trigger alarm or whatever. At present, I assume your PLC's control output signal is fixed according to your setpoint?. Why not have the output analogue signal increase or decrease to maintain your Welding current setpoint. You can achieve this using some kind of loop control method. eg. PID loop function (if you are adventurous) or a simple increment or decrement of the analogue output register. The output register usually controls a channel on an Analogue output module such as a Q68DAV for your 1-10V output to your welder. Example instruction description of a simple control loop: Compare your Welders actual output to your setpoint. If it is out of setpoints deviation band, increase or decrease output register. Create a adjustment time delay based on how close/far from the Process Value is from Setpoint. (ie.) The closer the PV is to setpoint, the longer the interval of adjustment. The further the PV is to setpoint, the quicker the interval of adjustment. Because a Q68DAV channel has a numerical value of 0 to 4000 in normal resolution to represent an output of 0 to 10V, the adjustments or +/- 1 numerical value is quite fine. You will need to play around with adjustment interval times to find the most stable adjustments to maintain setpoint.