Jump to content

cantcliff

MVP 2015
  • Posts

    146
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by cantcliff

  1. hi canvj

     

    Thank for your answer 

    But I have a other question, its' about the ladder, what we need to use, (a coil, a direct contact ? ) for do this ? 

    And for the output, who I can choose and configure the outpout  that I need ? 

    Thank ;)

     

    A coil and a direct contact are programmatically the same and function the same inside the PLC.  The difference is a direct contact has an effect on the physical world, where as a coil is logic internal to the PLC only. To make a coil performance physical changes, you need to link it to a direct contact.

     

    There are advantages to using coils and energizing contacts with them, and there are also advantages to driving the contact directly.

  2. You're running into a common problem using input buttons.  The program is scanning several times during the time you have the button pressed. You need to prevent your code from executing your start rung more than one time.

     

    There are a lot of ways to do this.

     

    I tend towards Positive transition contacts because most my programs are relatively small but those aren't always preferred as they can cause weird issues when you start using a lot of them.  I have yet to have issues.

     

    You can also work multiple rungs together to control the logic so that a single press one registers for a single scan.

  3. Personally, I would look more into a micro controller solution for running an RC aircraft.  Something like a decent arduino board or propeller (seems appropriate doesn't it) setup. 

     

    They run on lower voltages, they are significantly lighter in terms of actual weight (always important when you're talking things that fly), they will allow you to interface readily with many off the shelf solutions like GPS, wireless communications, etc.

  4. To add to what Joe stated.

     

    The raw value is going to be dependent on the bits of your A/D converter. 

     

    12 bit = 2^12, or a range of 0 - 4095

    14 bit = 2^14, or a range of 0 - 16384

    16 bit = 2^16, or a range of 0 - 65535

     

    From there you need to use the linearize function block to get the actual reading using the scale you want, 0-10v, 0-20ma, etc.  For example, on a 0-10v sensor, the A/D should output 65535 when it receives 10v and 16 bit, for 12 bit it would output 4095 for the same 10v.

     

    The conversion time is in the spec sheet for each snap plugin or add on and it can vary if the input allows you to choose between 12 bit, or 14 bit, with the higher bit depth being slower.

  5. Even if everything has power, the EX-A2X *requires* that the communications module and the PLC are on the same power supply (Page 5 of the documentation for the adapter). I've experience this issue in my own box when first using on of these as I missed that portion of the documentation as well and used a secondary power supply to power the EX-A2X but was having comms issues like you're having.

     

    Both units must power up simultaneously as well.

     

    How long have they been running that cable?  If they wired it as a standard RJ45 network cable it won't work.  There is definitely something different about the EXL-CAB100 as even plugging it in backwards can cause communication issues (Personal experience for not reading labels).

  6. You could create a counter at the high and low end of the oscillation that when it reaches a certain value triggers an auto-tune.  This is a band-aid fix though, as you shouldn't need to auto-tune frequently unless there is some inherent instability in the system process on it's own.

    You might want to try manually adjusting some of the PID values after you've auto-tuned to force a more stable system over time.

     

    Couple of things that might help:

    Increase the P-value. Outside of the P range you're valve is either fully open, or fully closed.  Increasing the P-Value range (100% is allowed) forces the PID function to always run it's calculations instead of going full open on the valve.

     

    Increase the I-value.  Larger I-values smooth out and tries to prevent overshooting of the process variable based on the error.   It may take longer to stabilize, but it helps prevent overshoot.  If fact if you just run a PI system with a larger I-value, you will never hit your process variable.

     

    D-Value, I forget which way this one affects the system as I usually set it to 0 for most my applications, but this is your predictor variable.  It tries adjust the response based on where it believes the system is going.  Strong D values create strong responses to a change in system state and can lead to oscillation.  Tweak this so that your system doesn't react as fast, but still catches some of the error.

    • Upvote 1
  7. https://en.wikipedia.org/wiki/RS-485

     

    Please read the section named as "connectors".

    IMHO: network without SG (signal ground) worked very bad.

     

    Andrey,

     

    Typically yes, if you use 0v as your reference.  RS-485 two wire uses the voltage differential between A+ and B- as it's reference on a twisted pair wire.  The biggest advantage is both wires would be prone to the noise.  So if A+ is offset, B- is also offset by an identical amount and the differential is maintained.

     

    There are also a 3 wire spec, and a 4 wire spec (4 wire is used for full duplex communication).  As always, you should still use grounded cable with the ground connection on one end to improve performance and minimize noise.

     

  8. The response time should be the same as the response time of the input.

     

    The main variation would come from the program scan time as the immediate read would update the value mid scan instead of waiting until the next scan cycle to update.

     

    If your scan time is 20ms and your input updates 1 ms into that, after inputs are normally read, it would be 21 ms before the value changes (assuming logic doesn't affect it). 

     

    With the immediate function all logic following after the update portion would use the new value, maybe just a few ms to update from the immediate read.   This could cause some interesting logic bugs though, with one rung using a different value than another rung than intended due to the update.

  9. I know certain config blocks state they need to be called every scan, and I have some of those in other programs running both in, and outside of, the main ladder.

     

    The order doesn't seem to matter with the NUM to ASCII block though.   It only misbehaves when I put it within a subroutine regardless of the subroutine being called every scan.

     

    Operand A, start address of the vector, which is not dependent on any logic, shows 0 when I attempt to run NUM to ASCII from outside of the Main!.  As soon as I put it in Main! operand A takes on a value.

     

     

    If you'd like I can get some screen shots of the behavior.

×
×
  • Create New...