Announcement

Collapse
No announcement yet.

Writing to Input Registers

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


  • Writing to Input Registers

    Here's the situation: I'm trying to simulate some field devices using the Productivity 3000. The field devices communicate over MODBUS. One of my device's MODBUS maps uses all input registers (some 1x, some 3x). Most of these values I DO NOT want to have to set through an input module, but would rather determine the appropriate value using logic. I'm able to create a tag and set its type as either a "discrete input" or "analog input" (see attached image); however, I have not figured out a way to set the value in my code (out coils, copy data, etc do not allow the input data type for a result).

    Any ideas on how I can achieve my goal? Thanks!

    Click image for larger version

Name:	InputTags.PNG
Views:	2
Size:	57.1 KB
ID:	110354
    Attached Files


  • #2
    How about going into Tag database and switching your Discrete Inputs (type) to Boolean and do your simulation, After you have tested your system, just switch them back to Discrete Input with the tag database editor tool.
    Not sure if I understood this right.
    After you switch them to Boolean you'll be able to edit them with output coils or copy data.You'll have to remove your Modbus addresses before you can switch them to Boolean and then re assign them again.
    But maybe there is an easier way.
    Last edited by pbw; 01-12-2018, 06:31 PM.

    Comment



    • #3
      pbw,

      Its not a matter of simulating now and then running it in the field later. I'm developing a permanent simulation lab, and need to simulate devices in the field that provide data over MODBUS - the hiccup being that the MODBUS values they provide are sitting in input registers, not holding registers.

      Comment



      • #4
        I wonder if you could get around it with REFWRITE.

        Failing that, if the point count isn't too high, you could get data into the inputs the traditional way - through the terminals! Install corresponding discrete and analog outputs and wire back to inputs.

        Finally, I use DAQ Factory from Azeotech, which can act as a server, and the runtimes are inexpensive, I'll have to check and see if it can write to input registers. That might work for you.

        Update: Just realized you said PxK rather than Do-More, so disregard that bit about REFWRITE unless PxK has an equivalent (write to a register by numerical memory location rather than data type)
        Last edited by ControlsGuy; 01-13-2018, 01:40 PM.

        Comment



        • #5
          You say "solving with logic", so this probably won't work, but if the point count is low enough, and the values static enough, you could run instances of Simulator on PCs, and set them manually. If static, but too numerous for Simulator's UI, you could force them in DMD.

          Comment



          • #6
            I wonder if in the Modbus implementations on Arduino or Pi or similar, all the internal data types are effectively holding registers and can be written and you have to explicitly transfer the data to them if you want to hook them to the physical I/O.

            Comment



            • #7
              UPDATE: After reopening the program a few days later, my trickery was discovered and caused issues. Basically the program generated a bunch of "virtual tags" that had no system ID associated with it. I could not delete them and got errors stating I had duplicate Tag names. Must be something in the opening process that manipulates the data somehow.

              I spoke with AD and they stated that the lack of ability to copy data into an input register is intentional and will not be permitted in future firmware releases.

              We ended up switching to the DoMore H2 line, which does allow me to copy data into the Input registers.

              ----------------------------------------------------------------


              Originally posted by pbw View Post
              How about going into Tag database and switching your Discrete Inputs (type) to Boolean and do your simulation, After you have tested your system, just switch them back to Discrete Input with the tag database editor tool.
              Not sure if I understood this right.
              After you switch them to Boolean you'll be able to edit them with output coils or copy data.You'll have to remove your Modbus addresses before you can switch them to Boolean and then re assign them again.
              But maybe there is an easier way.
              pbw,

              After thinking about this over the weekend, I realized that I misunderstood your suggestion. I gave this a try today, and it works! Thanks a ton. It's a bit cumbersome (unfortunately, I cant export/import the tags and edit them as the software catches the mis-match between data type and system ID) but will get the job done.
              Last edited by cefisher15; 04-13-2018, 10:50 AM. Reason: Updated findings

              Comment



              • #8
                Originally posted by ControlsGuy View Post
                I wonder if in the Modbus implementations on Arduino or Pi or similar, all the internal data types are effectively holding registers and can be written and you have to explicitly transfer the data to them if you want to hook them to the physical I/O.
                We had discussed looking into PI. Will definitely keep this in my possible solution space if my current work-around fails me.

                Comment

                Working...
                X