• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Read Coil Analogic Output M103

    Scheduled Pinned Locked Moved Neuron Series
    30 Posts 2 Posters 17.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Martin KudláčekM
      Martin Kudláček @Mohamed Dounnani
      last edited by

      @mohamed-dounnani You will verify, that the data you set in the Modbus registers really do what you are intending to do.

      I guess you use some LED 0-10V dimmer, similar to this one:

      0_1535107086461_0-10-LED-Dimmer.jpg

      If the D- and D+ are unconnected or shorted (connected together) the LED should be off. Is this happening to you?

      1 Reply Last reply
      Reply Quote 0
      • M
        Mohamed Dounnani
        last edited by

        They are connected. I can't misure now the V in output, there is a way to be able to turn led completely off?

        Martin KudláčekM 1 Reply Last reply
        Reply Quote 0
        • Martin KudláčekM
          Martin Kudláček @Mohamed Dounnani
          last edited by

          @mohamed-dounnani
          Basically there can be two things wrong in your setup and in order to help you I need you to test them separately.

          1. Verify the output voltage
          • Disconnect everything from the AO and AGND
          • connect a voltmeter (or multimeter set to DC voltage measurement) between AO and AGND (positive / red test lead to AO, negative / black test lead to AGND)
          • set the desired voltage via Modbus registers and verify the actual output voltage
          • set the voltage to 0V via Modbus registers and verify that the output voltage is 0V
          1. Verify the functionality of the LED dimmer
          • connect the LED to the dimmer
          • connect the power supply to the dimmer
          • leave the 0-10V input unconnected
          • the LED should be off.

          Please proceed with both suggestions and get back to me with the result. Otherwise it is almost impossible to help you.

          Thank you for understanding,
          Martin

          1 Reply Last reply
          Reply Quote 0
          • M
            Mohamed Dounnani
            last edited by

            "Verify the functionality of the LED dimmer
            connect the LED to the dimmer
            connect the power supply to the dimmer
            leave the 0-10V input unconnected
            the LED should be off."

            I leave the 0-10V input unconnected from unipi and led are On like 100% Luminosity.

            "Verify the output voltage
            Disconnect everything from the AO and AGND
            connect a voltmeter (or multimeter set to DC voltage measurement) between AO and AGND (positive / red test lead to AO, negative / black test lead to AGND)
            set the desired voltage via Modbus registers and verify the actual output voltage
            set the voltage to 0V via Modbus registers and verify that the output voltage is 0V"

            When I set 0V via Modbus multimeter reveals like 1.066 Volt and not 0 volt.

            Martin KudláčekM 1 Reply Last reply
            Reply Quote 0
            • Martin KudláčekM
              Martin Kudláček @Mohamed Dounnani
              last edited by

              Ok @mohamed-dounnani, now we are getting somewhere!:)

              For the first part (verifying the output voltage), did you try to set the voltage to e.g. 5 volts and measured the actual output as well? What was the result? I need to be extra sure, that your way of saving data into the Modbus registers really works. It's not that I don't trust you, but it isn't really straightforward:)

              Thanks!
              Martin

              1 Reply Last reply
              Reply Quote 0
              • M
                Mohamed Dounnani
                last edited by

                If i set 6 Volt the result is 2294.784382284382

                Martin KudláčekM 1 Reply Last reply
                Reply Quote 0
                • Martin KudláčekM
                  Martin Kudláček @Mohamed Dounnani
                  last edited by

                  @mohamed-dounnani I am sorry, but I don't understand. You should calculate a value using the formula and the result should be between 0 - 65535. Then you should write the value into the Analog Output 1 Modbus register. By doing this, the internal circuit in the UniPi controller will set the desired output voltage between the screw connectors AO and AGND. Then you should measure this value with multimeter to verify if the actual output is equal to the desired voltage you wanted to set. Have you done so please?

                  Martin

                  1 Reply Last reply
                  Reply Quote 0
                  • M
                    Mohamed Dounnani
                    last edited by

                    I calculate value using formula and when i select 6V that is my desired volt, that formula produce 2294. I take the result and I write it to Analog Output 1 Modbus register

                    When I select 0V, the formula produce 0, but when i measure the output with multimeter i measure 1.066 V

                    Martin KudláčekM 1 Reply Last reply
                    Reply Quote 0
                    • Martin KudláčekM
                      Martin Kudláček @Mohamed Dounnani
                      last edited by Martin Kudláček

                      Ok @mohamed-dounnani, and what happens, when you write the value 2294 into the Analog Output 1 Modbus Register? What is the actual ouput voltage on the connector?

                      1 Reply Last reply
                      Reply Quote 0
                      • M
                        Mohamed Dounnani
                        last edited by

                        7 approximately

                        Martin KudláčekM 1 Reply Last reply
                        Reply Quote 0
                        • Martin KudláčekM
                          Martin Kudláček @Mohamed Dounnani
                          last edited by

                          Ok @mohamed-dounnani, I tested it on my S103, which is basically the same as yours. Mine works with the same procedure I told you. I wrote value 2178 and got 5.678V as expected. When I write 0, the output is 0V.

                          To investigate further, I need several informations from you:

                          • What SD card image do you use?
                          • How do you communicate with the ModbusTCP server?
                          • If you write 0 to the register 2, what value from the register you read back?

                          Thanks in advance,
                          Martin

                          1 Reply Last reply
                          Reply Quote 0
                          • M
                            Mohamed Dounnani
                            last edited by

                            I use Raspbian Stretch
                            I communicate with node.js using a npm library.
                            If i wrote 0 i receive 0 as value

                            Martin KudláčekM 1 Reply Last reply
                            Reply Quote 0
                            • Martin KudláčekM
                              Martin Kudláček @Mohamed Dounnani
                              last edited by

                              Ok @mohamed-dounnani, let's try one last thing. Can you read the value of register 1019? That's the settings of the Analog Output. It should be 0, which stands for Voltage output. 1 means Current output and 3 means Resistance measurement.

                              Thank you,
                              Martin

                              1 Reply Last reply
                              Reply Quote 0
                              • M
                                Mohamed Dounnani
                                last edited by

                                I receive 0, so is for Voltage Output

                                1 Reply Last reply
                                Reply Quote 0
                                • M
                                  Mohamed Dounnani
                                  last edited by

                                  To be specific I'll explain how to calculate the value to write in the analog output register.
                                  For determinator i use: (((3.3 * deltaRef) / 4095) * (1 + (VDev / 10000)) * 3);
                                  DeltaRef is (vref / vrefInt), if denominator is 0 i change it in 4095.

                                  For nominator i use: ((Vdesired - (VOffset / 10000)) < 0) ? 0 : (Vdesired - (VOffset / 10000));

                                  Then i calculate nominator / denominator.

                                  Martin KudláčekM 1 Reply Last reply
                                  Reply Quote 0
                                  • Martin KudláčekM
                                    Martin Kudláček @Mohamed Dounnani
                                    last edited by

                                    @mohamed-dounnani,
                                    your calculations are in order. With the tests we did above, I am afraid you received a PLC with wrong calibration data. The calibration is a way how to ensure that when you set a desired voltage through Modbus registers, it will in fact set the correct voltage on the terminal connectors. The calibration process is one of many throughout the assembly of the unit. The calibration is done on our testbenches and it means you have to send the unit back to us. We sincerely do apologize for this.

                                    Please send me ([email protected]) your number of order for this PLC and I will get back to you with further information.

                                    Thank you very much,
                                    Martin

                                    1 Reply Last reply
                                    Reply Quote 0
                                    • K knebb referenced this topic on

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better 💗

                                    Register Login
                                    • First post
                                      Last post