+ Reply to Thread
Results 1 to 10 of 10

Thread: SSWeb and MGE UPS

  1. #1
    Join Date
    Jun 2009
    Posts
    54
    Post Likes

    SSWeb and MGE UPS

    So, after many months have past and I was never able to get SSWeb to communicate with a MGE UPS using a Sitelink-E and Modbus. I've been kicking myself for not discovering the receive LED was on solid on the Sitelink-E indicating a wiring or polarity problem. It was a polarity problem. Now I'm able to read all of the analog points but I can't read the binary points. I get and Invalid Data Address error in SSWeb. I'm assuming this is the correct modbus address to use - modbus://bitn/4xxxx/xx If so, I don't know what the n should be in bitn. Does anyone here have any idea?

    Stan

  2. #2
    Join Date
    May 2009
    Location
    SC
    Posts
    4,049
    Post Likes
    MGE likes to document in hexidecimal and call it jbus, but you can read it with standard modbus driver as you have discovered. Alternately ALC has a jbus driver you could use as well.

    Modbus register addressing
    Pay close attention to the following terms in vendors Modbus documentation
    • Coil Status, or Modbus function code 1**
    o ALC register address range: Leading 0 (zero) = 1-65535*
    o Read / Write
    • Input Status, or Modbus function code 2**
    o ALC register address range: Leading 1 (one) = 100001-165535*
    o Read only
    • Holding Register, or Modbus function code 3**
    o ALC register address range: Leading 4 (four) = 400001-465535*
    o Read / Write
    • Input Register, or Modbus function code 4**
    o ALC register address range: Leading 3 (three) = 300001-365535*
    o Read only
    *Some vendors document their registers starting with zero in the least significant bit and some start with one like ALC does. If you find a vendor using 0 for their first register you must add one to all of their documented registers to arrive at the number ALC needs to read that point.
    **There are many more function codes in the Modbus protocol that define things like read multiple registers, write a register or a reply from a device. They are outside the scope of this document because the ALC driver handles these function codes in the background.
    The Modbus register address (sometimes called register, address, code, or parameter) must be a decimal value. If the register addresses in the points list include the letters A-F, use a scientific calculator to convert these hexadecimal values to decimal values. For example, J-Bus can be read with a Modbus driver.
    If the register addresses in the points list are 5-digit numbers in the range #0001-#9999 (where # = the prefix 1, 3, or 4), you may use the addresses as they are, or change them to fit the formats in the table above by shifting the prefix one digit to the left. For example, if you see the address 38129, you can also use 308129.


    Modbus register types
    Register types define how the information received or transmitted is interpreted.
    Input Or Holding Registers
    UINT = Unsigned Integer = 16bit register resulting in a decimal number of 0-65,535 or 0xFFFF.
    UINT32 = Unsigned Integer = 32bit register resulting in a decimal number of 0 to 4,294,967,295 or 0xFFFF,FFFF. In terms of ModBus registers this type occupies two registers, the number addressed and the next highest register which will go unmentioned.
    SINT = Signed Integer = 16bit register resulting in a decimal number of -32,768 to 32768 (in binary the first bit is the sign).
    SINT32 = Signed Integer = 32bit register resulting in a decimal number of -2,147,483,647 to 2,147,483,648 (in binary the first bit is the sign). In terms of ModBus registers this type occupies two registers, the number addressed and the next highest register which will go unmentioned.
    FLOAT = Value with a decimal point. In terms of ModBus registers this type occupies two registers, the number addressed and the next highest register which will go unmentioned. The two registers used are not a set standard and you may have to make use of the “Reverse FLOAT/32 Bit Integer” feature in the LGR driver if you find you are getting bad FLOAT data from a vendor.
    BIT# = One binary bit contained in a register where the bit # is specified by 0-15.
    Coil registers
    DO = Coil / Discrete (binary) output
    Input Registers
    DI = Discrete (binary) input


    Note: Offsets, dividers or scaling:
    Rather than dealing with FLOAT registers many vendors will define a certain offset or scaling necessary to read their information.
    Example: vendor transmits a temperature of 7653 and documents a scaling of 100 so this must be divided by 100 to arrive at 76.53°F.


    Formatting the ALC ModBus URL

    Name:  modURL.png
Views: 114
Size:  15.9 KB

    • Protocol:
    o modbus:// This might be port S1 or S2 on an LGR, see the driver protocols, ModBus page
    o modbus1:// Specifically port S1, if enabled, see the driver protocols, ModBus page
    o modbus2:// Specifically port S2, if enabled, see the driver protocols, ModBus page
    o mtcpip:// Modbus over IP
    • Register Type, see register types page:
    o UINT
    o SINT
    o UINT32
    o SINT32
    o FLOAT
    o BIT#
    o DO
    o DI
    • ModBus Register address, see Register address page:
    o 1-65535
    o 100001-165535
    o 400001-465535
    o 300001-365535
    • Device Address
    o Slave or server device address 1-247

  3. #3
    Join Date
    Jun 2009
    Posts
    54
    Post Likes
    Thread Starter
    Hi MaxBurn,

    Long time no type.

    Yes, the MGE doc is Jbus Hexadecimal. To convert to Modbus, you convert Hexadecimal to Decimal and add 1 to the number. i.e the Jbus register for Bypass Volts AB is 140 hex, Converted to Modbus that is 321. So this modbus address works to read that point modbus://uint/40321/64 I don't no why the device id is 64 since the tech that helped me before told me a different device id, but 64 works. Perhaps I wrongly assumed the binary points are bitn register types? For example, the jbus register for Battery Charging Error is 417. Converted to Modbus that's 1048 but this modbus address doesn't work - modbus://bit0/41048/64 or does any combination of bit n that I've tried from 0 - 8. So, should I assume the binary registers are uint rather than bitn?

    Stan

  4. #4
    Join Date
    May 2009
    Location
    SC
    Posts
    4,049
    Post Likes
    Binary works in a couple different ways in modbus, you have coils and inputs function codes 1 and 2 which are raw binary points. Then you have function code 3 and 4 holding and input registers. Those have 16 bits to play with, which is where bit# comes in, you have to tell it which bit to pay attention to.

    I believe you are dealing with a whole different function code for your alarm points. Key question, does the documentation tell you what bit to pay attention to? Similar, are there multiple alarms using the same register? I think your answer is no and you need to look into the input 10k registers I'd guess.

    This is an example of what I am talking about, this device uses different function codes depending on the data types.

    Name:  jbusURL.png
Views: 113
Size:  115.4 KB

  5. #5
    Join Date
    Jun 2009
    Posts
    54
    Post Likes
    Thread Starter
    Hi again Max,

    The documentation doesn't say anything about what bit nor does multiple alarms use the same register. I suspect the DI register is likely the correct one to use based on your screenshot using the jbus protocol. I'll give that a try tomorrow.

    Thanks for your help.


    Stan

  6. #6
    Join Date
    Jun 2009
    Posts
    54
    Post Likes
    Thread Starter
    I changed the modbus register type to DI and SSWeb seems to be happy now. Indicates no errors. This modbus address works for the battery discharging error - modbus://DI/11048/64 but this address also reports no error - modbus://DI/41048/64



    Stan

  7. #7
    Join Date
    May 2009
    Location
    SC
    Posts
    4,049
    Post Likes
    You mean you put the UPS on battery and got that alarm? If yes then that’s probably where all your alarms are. You probably have an on bypass or a normal state that you could look at too. I doubt you have a DI on a 40k register, probably 10k is the right one.

    Just because the modbus slave answers means no error. But that doesn’t mean there’s any data there.

  8. #8
    Join Date
    Jun 2009
    Posts
    54
    Post Likes
    Thread Starter
    I didn't put the UPS on battery. None of the points show they are in alarm. I changed them to 10k. Will see how/if this works when the techs come out to do PM in a couple of weeks.

    Thanks again for your help.

    Stan

  9. #9
    Join Date
    May 2009
    Location
    SC
    Posts
    4,049
    Post Likes
    Need to do that. Also look for something that should be true like on utility power or normal.

  10. #10
    Join Date
    Jun 2009
    Posts
    54
    Post Likes
    Thread Starter
    The system normal binary point is 1, so I think the Modbus side is correct. But, it looks like I goofed on the control program since all of the Bacnet objects show 0 for the present value


    Stan

+ Reply to Thread

Quick Reply Quick Reply

Register Now

Please enter the name by which you would like to log-in and be known on this site.

Please enter a password for your user account. Note that passwords are case-sensitive.

Please enter a valid email address for yourself.

Log-in

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •