Announcement

Collapse
No announcement yet.

P2k Analog Input Issues

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts


  • P2k Analog Input Issues

    Short disclaimer, I've only been working with PLC's for the past few months so I am by no means an expert. That said, I have a P2k with a 7-slot base as shown below. There is a lot going on with this setup so I'll try to keep it simple; if more info is needed just let me know.

    Click image for larger version

Name:	image_3473.png
Views:	1
Size:	138.8 KB
ID:	117708

    I'm using the PLC as the brain for a tester of ECU's that my company designs. I've got a 12V power supply, a 24V power supply, a couple boards simulating loads for specific components the ECU's see and an HMI; everything works great except some of the analog inputs (on the P2-16AD-2).

    I am using it to measure five different voltage signals and only three of them work. I have tried a few things to determine what it could be but all I have determined is that I have no idea what's going on; I have tried switching to different channels (including ones I know work) to see if its just a faulty channel, I have tried switching out the module entirely to see if its just a faulty module, and I have tried switching them with one of the three working channels out of curiosity. I've had no luck with any of these methods.

    The first signal that's failing starts at around 9.5V and drops to around 5V in certain subroutines. I've measured the current through the module and observed the voltage with a multimeter and an oscilloscope to verify this is actually happening and that it's happening within the safe parameters for the module. When the subroutines are called, the signal seems to freeze and stay at 9.5V (about 61000 counts).

    The second signal is similar. It goes from 0V to 8V and 9V (in separate subroutines), however, I don't see any change. I have measured this signal the same as the first with the same results. Unfortunately, I can't tell if its freezing or not for this one since it starts at 0V.

    Lastly I'll throw in some other info that may be pertinent; I'm sure I'll forget something though. I have double and triple checked that I am using the correct ports for the specified channels, I have ensured that the wires have good connections all the way through to the PLC, and I have made sure all my commons are tied together where appropriate. Just to reiderate, everything else on the machine works perfectly.

    Has anyone else ever seen this "freezing" on their analog inputs?

    Thanks in advance.


  • #2
    When you look at the OLED on the module for these channels what does it show?

    Click image for larger version

Name:	16AD-2.PNG
Views:	1
Size:	186.6 KB
ID:	117710

    Comment



    • #3
      Verify the 24VDC connection +V to pines 19 & 7, -V is to pins 20 & 8. Next make sure all unused inputs are connected directly to the COM.
      Make sure the channels being used are selected in the Hardware Config.
      Next I would not use subroutines that you would CALL. Move your analog I/O routines it to the RUN EVERY SCAN, not RUN WHEN CALLED.
      Last edited by LWgreys; 09-12-2018, 10:49 PM.

      Comment



      • #4
        Originally posted by techme View Post
        When you look at the OLED on the module for these channels what does it show?
        I didn't know you could do that, thanks. So, for what I referred to as the first signal, it shows about 61000 or 9.5V when I'm expecting it to drop. It freezes at this number; what I mean by this is that it doesn't fluctuate at all. When the channel is working, it will fluctuate by roughly 3mV or 20 counts; it doesn't do this which is how I know something is wrong. The second signal I have a problem with just says "UNDER" always.


        Originally posted by LWgreys View Post
        Verify the 24VDC connection +V to pines 19 & 7, -V is to pins 20 & 8. Next make sure all unused inputs are connected directly to the COM.
        Make sure the channels being used are selected in the Hardware Config.
        Next I would not use subroutines that you would CALL. Move your analog I/O routines it to the RUN EVERY SCAN, not RUN WHEN CALLED.
        I just checked these things again. The 24VDC and COMM connections are good to each of the respectively necessary pins. I'll ground all the unused inputs now and post again with the results of that. As for the subroutines remark, I cant move the analog I/O routines to RUN EVERY SCAN; the ladder code is now hundreds of lines (maybe up to a thousand or so) and that would require a complete restructuring of the program's flow. Could this really be the problem?

        Comment



        • #5
          Ok, I have grounded every unused input as suggested. Unfortunately, it didn't effect the freezing. Any other suggestions?

          Comment



          • #6
            Are you using a single 24Vdc power supply for all devices? What happens if you use a separate 24Vdc power supply for the Analog input module (if available)?

            Is you 0V on your power supply also tied to ground?

            Comment



            • #7
              Just to isolate the problem from the scan frequency, maybe put together a blank program that just looks at the analog inputs and runs every scan.
              If the inputs work, then it is likely in the programming / subroutines / timing.

              Comment



              • #8
                Originally posted by dnj View Post
                Are you using a single 24Vdc power supply for all devices? What happens if you use a separate 24Vdc power supply for the Analog input module (if available)?

                Is you 0V on your power supply also tied to ground?
                Yes, I am using a PSB24-480 as the 24V power supply and it is used to power the analog output module (P2-16DA-2), the analog input module (P2-16AD-2), and the digital output module (P2-15TD-2). Unfortunately I don't have an extra 24V power supply. All grounds are tied together including the 24V power supply, the 12V power supply, all the COMM from each module, the unused analog input channels (as of an hour ago), a couple potentiates (for servo position sensing), and a few other things.


                Originally posted by RogerR View Post
                Just to isolate the problem from the scan frequency, maybe put together a blank program that just looks at the analog inputs and runs every scan.
                If the inputs work, then it is likely in the programming / subroutines / timing.
                I'll give that a try.

                Comment



                • #9
                  Ok, I tried the simplified program to see if it's a programming or timing issue. The changes from the subroutines that should cause the change in the signals are all based on turning on and off digital signals and relays so it was fairly easy to write and test quickly. However, I observed the same freezing issues even when simplified. I still cannot tell what is causing the freezing for some signals but not others (even when the channels are switched). Any other ideas? Should I provide any more info?

                  Comment



                  • #10
                    Originally posted by xyouman View Post
                    Ok, I tried the simplified program to see if it's a programming or timing issue. The changes from the subroutines that should cause the change in the signals are all based on turning on and off digital signals and relays so it was fairly easy to write and test quickly. However, I observed the same freezing issues even when simplified. I still cannot tell what is causing the freezing for some signals but not others (even when the channels are switched). Any other ideas? Should I provide any more info?
                    There is only one power supply and the plc is turning on and off inductive loads (relays etc).
                    There may be a lot of noise and power spikes. This would especially be true if the relays were cycled quickly.
                    Do the relays have any surge suppression?

                    DNJ spoke earlier about having a separate power supply for the analog. Substituting another voltage source would eliminate that possibility.

                    If you have a problem freezing on an analog signal and that problem moves from one working channel to another when the analog input is moved, then I would look closely at that signal or signal delivery. Does that signal change with a relay activation/deactivation? Do you have an oscilliscope to view the analog signal?

                    Comment



                    • #11
                      I do have surge protection and the relays are switched at least 2 seconds apart and never in the middle of a "test" (which is when the issues are occurring). I have delays and time outs to ensure issues like that are minimized.

                      Are you suggesting I use a different power supply for each analog module? I may be able to test that with some bench power supplies. I'll try this right now and get back to you.

                      I have observed both the voltage and the current of each signal. The voltage stays above 0V and below 10V and the current stays below 40uA. Due to the aforementioned delays, the signal does not change with relay activation/deactivation.

                      Comment



                      • #12
                        Not for each analog module, just keeping the analog and plc supplies separate from the rest.

                        Comment



                        • #13
                          The 24VDC power supply only powers the analog input, analog output, and the digital output modules. Is that enough separation?

                          Comment



                          • #14
                            Is the power to the digital output modules driving relays?

                            Comment



                            • #15
                              No the digital output module only sends on/off signals to a separate board. The board has a safe separation between the signals and the actual operation the board is used for (RPM simulation).

                              Comment

                              Working...
                              X