Jump to content

Rog

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by Rog

  1. On 8/12/2023 at 1:21 AM, Joe Tauser said:

    Thanks for uploading your program.

    The difference between Input Registers (function 4) and Holding Registers (function 3) can be very confusing indeed.  It goes back to the days of Modicon PLCs where Input Registers were assigned to I/O modules in the rack and were type 3xxxx.  Almost all device manufacturers use Holding Registers these days (type 4xxxx).  When specifying the address, you don't include the leading "4".  Unitronics specifies the address in decimal - if you want to go above 9 you'll need to convert the hex addresses in your document to decimal.

    If you want to really understand the Modbus protocol get yourself a large cup of coffee and look at the original protocol - https://www.modbus.org/docs/PI_MBUS_300.pdf

    Anyway, in addition to changing your operation to Read Holding Registers I noticed you are trying to read a float value into an integer tag, which won't work.  If you go back and look at the document in your first post you'll see that the "Hosting Number" or Modbus address increments by 2.  This is because floating point numbers are 32 bit values, and Modbus addresses are 16 bit words.  When this protocol was defined there were no floating point numbers in PLCs so it wasn't addressed.

    I re-defined your "ph reading 1" array to type REAL, which is what Unitronics calls a floating point number.  I also modified your slave table.

    Load this into your PLC and let us know what happens.

    Joe T.

    test1 JT.ulpr 2.18 MB · 0 downloads

    This working, it connecting to sensor. Also the sensor wire A and B hook up to probe was backwards. But the unistream manual says D+ = B and D- = A. Switched this and it connected. 

     

  2. 6 hours ago, Gabriel Franco said:

    Try 4 instead of 40004 (and so on) in address.

    Tried that as well.

    4 hours ago, sgull said:

    Hi Rog

    Status 3 indicates that communication has been made but there is a problem with the modbus command.

    On the PC communication you are using read holding registers

    On the PLC communication you are looking for "read input registers (4)"

    change this to "read holding registers (3)"

    The addressing should be ok as it worked on the PC program.

    Tried this as well. Do I need to create some ladder logic to make connect and read?

  3. 12 hours ago, Ausman said:

    Any time you are working with a new device, always do an initial trial of comms using your PC as the basis, with one of the freely available modbus comms programs.  It is far easier to find what works correctly doing it this way, and then you can transfer the known results into your plc work.

    Thanks. For the advice. 

  4. 3 hours ago, pascal said:

    image.thumb.png.1b66442dc3ba23b733280a99d5c522a5.png

     

    about the type of operation -> just read holding register (type 3 of modbus)

    I read my weather station every 10 seconds

    my float type is here NONE, but this is made with a previous version of unilogic, where I had to make my own swap "thing"

    So no program is needed, only configuration...

    that's all you need to do....

    If you have a incorrect status of your modbus slave,  try to change the address you want to read....

    sometimes the manual say's it starts at adres 1, but in modbus language it could be address 0 (or 2 ?)

     

    Yeah still not having any luck with this. I am thinking I am trouble understanding the address location of my device. 

  5. 55 minutes ago, ORSO2001 said:

    hi Rog,

    post what you did (may will be enough some picture about how you set the modbus)...and in my opinion the "problem" is understand how the floats variables works...you need  to transfer the two INT16 registers (2*2 = 4 bytes) in a BUFFER of 4 bytes then transfer this BUFFER in a REAL variable; let me say that in my test the 4 bytes 41-DB-72-37 give a temperature of 27.430770.

    I haven't really done anything really. This is about as far as I got.

    RS485.png

  6. New to using RS485 modbus. I am wanting to set up a new pH sensor using modbus. Not sure where to begin with this. I know i set-up unistream hmi as master.  I want to read pH and then calibrate the sensor. I have attached the paper work from sensor. Can't make heads or tails out of it. A simple program would make difference to understand what going on with the addresses and such. Thanks for the help!

    IMG_3232.jpg

    IMG_3231.jpg

    IMG_3230.jpg

  7. I recently got a new laptop with Windows 11. So I installed Unistream 1.28.26 worked fine. Did installed every version up to latest. All opening fine on install. Keeping the older version as well. Before anything said. I have applications out there that are built on older version. Due to how long it takes to do downloads and updates on slow 4g internet can be. I have to keep using older version. Older version don't open. The splash screen starts then says loading components, Then just disappears. Running old version on old laptop worked fine. 

  8. So we have several of the unistream units out there. But recently the last 2 we built with the exact program on them. Are having issues with analog inputs. They started to jump all over the place. Tried different signal wires same reading. Multi meter run series and analog signal not jumping all over the place, just smooth reading. I don't know if it the modules or the last firmware update.  Was wondering if you guys had any thoughts.

    Thanks

    Rog

  9. We been having issues this modules. Work for sometime. Then all sudden the module fails. Reading from the input starts to jump all over the place. It turns out one the inputs causes it. Removed the input. We have this set up to read from the source. Is there something causing this fail. We have replaced bunch of the AI8. Never have issues with AI4 modules.

    Thanks

  10. Been having issues with this past couple days. Wondering if anyone else had it or found a fix for it. This 2 displays either appear behind the main application, and i can't get to them. Then I am locked out from getting to them. Then I have to control-alt-delete and then task manager and close it. Then reopen and the move application around to right spot to get to them. If not then I have to do it over till I can.

     

    Thanks

    Rog

    backgroundlock.PNG

  11. Trying to connect to a Azure sql server running the latest version of SQL server. I can connect using telnet and SSMS no problems. The unistream can connect to a local host using sql express. However when i connect using the same info. I get error which is the pic attached. I am kinda at a impasse. So what server on the unistream line compatible with?    

    unisql1.PNG

    • Like 1
  12. I am trying to make a running totalizer in unistream. Trying to figure what best way to that. I am kinda new at the unistream line, but it has been pleasant experience.  I  attached what I had. Any advice on how should go about this. Trying to calculate GPS on flow. 

     

    Thanks

    Total.PNG

  13. Hello Gents and Ladies,

     

    I am new to the unistream line. Haven't had chance to take the seminar for it. It definitely little bit different then Visilogic line as for programming. Just trying to figure the math out. Some of it turning out to be zero. Just can't figure  out what I am doing wrong. If you care for some points. Would like to see math examples. 

    Thanks

    math.PNG

    PICC1.ulpr

  14. Hi all,

    I have V350-35-R6. Trying to set-up high speed counter on using seamtrics s-series jet flow meter. https://www.seametrics.com/wp-content/uploads/LT-65200067r1.4-20180202-S-Series-Instr_0.pdf. I have tried pnp and npn neither work. I can get it to run on the DI8 modules(using PnP and resistor) and the snap-in modules using NpN on it using the same logic. I just curious if there anything wrong with what i doing wrong. 

    v350hardware.PNG

    Logichighspeed.PNG

    v350linear.PNG

×
×
  • Create New...