Jump to content

Search the Community

Showing results for tags 'modbus'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Our Community
    • Come on in!
  • News and Announcements
    • New! UniLogic V1.24 introduces VFDS from Unitronics!!
    • VisiLogic:9.8.64 - Link to mobile app, Ladder: 2x the Space!
    • New!!! ***** U90 Ladder*****
  • UniStream HMI + PLC Programmable Controllers & UniLogic Software
    • UniStream: Hardware
    • UniLogic Software
    • UniLogic UDFBs
    • Industry 4.0, IioT, MQTT--Looking forward
  • Vision, Samba, Jazz and M90 PLC + HMIs & Software
    • Vision & Samba PLC + HMI Controllers & VisiLogic Software
    • Jazz, M91 PLCs and U90Ladder
  • Software Utilities
    • SD Card Suite
    • Remote Operator
    • Remote Access
    • DataXport and DataXls
    • UniDownloader
    • UniOPC
    • UniDDE
  • Utilities for .net and Visual Studio
    • Unitronics PCOM Protocol
    • COM Object ActiveX .dll
    • .NET driver
  • Project Design
    • ...I have a project...what hardware do I need?
  • User Application Stories
    • Just finished a great project?
  • Tips and Tricks
    • Best Programming Practices
    • Tips and Tricks
  • Job Board
    • Projects seeking Programmers
    • Programmers seeking Projects
  • General Discussion
    • We're Listening...
    • The Lounge
  • News and Announcements Copy

Blogs

  • Unitronics' Blog: PLCs, HMIs and more
  • Saragani's Blog
  • Simon's Blog
  • Ash Neilson's Blog
  • Joe Tauser's Blog
  • Unitronics en Español
  • Powered by AMPS
  • Alldrives UK's Blog
  • Unitronics, Howman Style
  • PLCNewbie's Blog
  • Telestar Automation Blog
  • Webinars Collection
  • Tim's Corner
  • Blog
  • TELESTAR (Italian)
  • i4 Automation
  • i4 Automation (UK)
  • Unistream UDFB's

Categories

  • From Headquarters: Sample Applications
    • From Headquarters: VisiLogic
    • From Unitronics: U90 Ladder applications
  • User-submitted Applications
    • From Users: VisiLogic applications
    • From Users: U90 Applications

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Interests

Found 96 results

  1. Hi! So, I am writing ASP Core 2 project and one of the components is communicating with Unitronics V130 unit (as a Modbus Slave). Since provided .NET Driver library is not portable to ASP Core I need to implement this communication with Modbus. I have limited experience with Modbus protocols but I have used some basic functions in the past – mostly reading Registers and Coils. Just to sample some data. I used python library modbus_tk for this purpose. Using Modbus gives me options for adding more optional hardware down the line. After reviewing some libraries supporting Core I selected library Modbus https://github.com/AndreasAmMueller/Modbus made by AndreasAmMueller, written in C# as Net Standard 2.0 library. I started testing this library by communicating over Modbus TCP/IP with V130 PLC. I got mixed results. - namely "Write Multiple Coils " or "Force Coils " (Function code 15) does not work correctly. So. Modbus read functions all work great, these are: Read Coils (Function code 01) Read Holding Registers (Function code 03) Out of write functions these work great too: Write Multiple Registers (Function code 16) – named “#16 Preset Holding Registers” in VisiLogic help files Write Single Coil (Function code 05) – not referenced in Unitronics (VisiLogic) help files under “Slave Addressing” Write Single Register (Function code 06) - not referenced in Unitronics (VisiLogic) help files under “Slave Addressing” These functions are documented in help files of VisiLogic at “Slave Addressing” topic (where address offsets are defined). Now, function that does not work (at least with V130) is: Write Multiple Coils (Function code 15) – named “#15 Force Coils” in VisiLogic help files This function takes in “n” sequential bit values (“coils”) and a “starting address”. Then it writes these values in slave (in my case V130 device), starting at “start address” and for “n” values. It never sets coils to provided values. But it does set provided coils (addresses) just not to provided values. Meaning, if I want to set 16 coils (lets say some Memory Bits – MB) to 1, only some 8 coils would be set to 1, other 8 coils would be set to 0. It appears that only some byte is set to provided values (but that varies with number of provided addresses/values). Let me repeat again – all provided addresses are written to, just not the values that are provided. Interesting thing is that even if I provide only “true” (1) values, somehow “false” (0) is written to address. AFAIK if I provide only “false” values, no “true” value is written to address. Let’s see what is sent to PLC in next section Modbus implementation on PLC? I suppose Unitronics PLC Modbus implementation is compliant to Modbus specifications and implementation guides, defined by http://www.modbus.org/specs.php (I don’t know, but I would hope). As such Modbus TCP/IP ADU (Application Data Unit) should be implemented as defined in http://www.modbus.org/docs/Modbus_Messaging_Implementation_Guide_V1_0a.pdf and Modbus PDU (Protocol Data Unit) as defined in http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b3.pdf. This is nicely presented in image bellow – Modbus ADU (MBAP Header + MODBUS request). Here request is made for reading register #5 in remote server (page 22/46 from Application Protocol document): There are 6 bytes of MBAP Header, followed by “length – 1” bytes of MODBUS request (we must subtract 1 byte for Unit identifier, which is included in “length”). In example above there are 5 bytes of Modbus request that makes “length” equal 6. Function “Write Multiple Coils (code 15)” Modbus request is defined in Messaging Implementation Guide at page 29/50: This block is inserted at MOBUS request field in Modbus ADU, presented above. It takes 1 byte to describe the function code, 2 bytes for starting address, 2 bytes for quantities of values (number of “coils” we want to write), 1 byte for number of bytes and finally N Bytes for associated values. Simple test For simple test I am going to use function “Write Multiple Coils (code 15)”, writing 16 (2 bytes in length) “true” (1) values, starting at address 1200, which means Memory Bit (MB) #1200. Device ID is 1. This is Modbus request ADU, which is sent to PLC: It appears that the implementation of Modbus in NET Standard 2.0 library is compliant to Modbus specifications and implementation guides, defined by modbus.org. There is correct MBAP Header and MODBUS request. It provides correct address (1200), number of coils (16) and correct values of coils, which is “true” 1 for all, thus 2 bytes with value of 255. But the result of this operation yields, starting at correct address of 1200: 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0. We were hoping for all 1. I doubt its wrong implementation in the library, I have checked many requests against specifications from modbus.org and all seem to comply. Ofc the working functions (Read Coils) etc. all comply to modbus.org specifications and yield correct results. Only “Write Multiple Coils (code 15)” function yields wrong results and is there any chance that its not implemented according to modbus.org? Solution/hack that seems to work I found one hack that seems to work (at least with V130 PLC). But I wouldn’t recommend to use it until there is conformation that this hack does not cause some unwanted consequences. Here goes, it appears that appending one (dummy) byte (of arbitrary value) before bytes that represents values (in the above case [12] and [13] bytes) somehow causes the function to work and we can update Length byte [5]. But it seems that updating Length does not have any effect, it works regardless (need to test that more rigorously). New (working) request would look like this, with added dummy byte: As you can see there is added dummy byte at [12] and length updated to 9. Result of this operation yields correct state - all 16 coils MBs are set correctly. This seems to works with any combination of values and number of coils. But this hack is untested, I don’t know if this command is really contained to just defined addresses or does it write all over the memory. I tested this only for some addresses beyond defined range by manually setting values via VisiLogic “online mode". More importantly, why does this hack work? Or even more, why “normal” Write Multiple Coils (code 15) does not work? Is this V130 specific? Any help appreciated! Best Regards! PS: To add, I did change "MODBUS: SCAN_EX" block to SCAN and SCAN_32 - nothing worked. Now I left it with "MODBUS: SCAN" block to support "older working applications" as stated in help files of VisiLogic.
  2. Hi All, I'm using the UniStream as a slave connected by Modbus TCP. Is there a way to know/check the forwarded data, by the Master, byte to byte? thanks
  3. Good morning everyone! We are about to begin work on a Modbus deployment that will need far more than just the 255 addresses available on the built in CPU master. I know we can add up to three of the UAC-02RSC UniComm modules for three more masters. Unfortunately, the masters on the 02RSC have a limit of 512 operations each, so we’re going to need all three modules and then some. I’m interested in using the serial port on the top of those modules as well. Unilogic and the built-in help file shows that we can turn them into Modbus masters, but we’re not having any success getting it to communicate with our sensors and devices. We’re using a small header-to-terminal block plug to give us access to pins two and three (TX and RX) but I’m not sure that’s correct for what we’re doing here. Thank you in advance for any help you can give us on the serial connection!
  4. kolya_asu

    UNIOPC + Modbus RTU (COM port)

    Hello. I am forced to ask you for help, as I spent a lot of time trying to solve this problem on my own. I just can’t connect PLC V350 Vision with OPS server UNIOPS + SCADA. By TSP IP I managed with great difficulty to establish a connection with this controller (nowhere did I find an intelligible, complete description of the connection), but now this is not about it. I tried various options, but nothing works. I enclose screenshots for clarity, can someone tell me what else I need to do in order for the VISION PLC 350 to see the OPS server. I would be grateful for any help. Thanks. . The original RS232 cable, 100% working!
  5. I want to buy and use an Unistream PLC. I am trying to read the specs for an {Unistream 7" HMI PANEL (USP-070-B10) + Unistream CPU FOR PANEL (USC-P-B10)}, but I can not find that this this system supports Modbus TCP/IP and Modbus RTU.? Can anyone answer this question and tell me which datasheet shows this information. Thanks!
  6. Good day All Im wondering if someone will be able to assist me with the following. we have a few in house built machinery that runs off Arduino Controllers. We needing to link it up to a Unistream HMI to Display the Data. I know it can be done via Modbus. Im just needing some help with the initial Modbus from Arduino to Unistream setup Please Assist where you can
  7. I have a problem, when a slave is disconnected (without opening the trunk network) all other slaves lose the communication of the master. Does anyone have the method or solution of how to do it?
  8. Hi everyone I'm fairly new at unitronics and I'm doing a project that calls for the use of two EX-RC1 connected by modbus. I've been going through the webinars ( and ) and I'm still in the dark as to how I set upthe EX-RC's for my I/O expansions. In my first RC I have the following I/O's : #0: D16A3-RO16 #1:AO6X 2#: AO6X #3: AO6X #4:AI8 #5AI8 In the second RC I have four IO-PT400 modules I've tried following the second youtube clip, using the EX-RC1 example file where I've added my I/O's, but I get an error when I try to export the Hardware config: 'Export failed (555) You must define a minimum of one I/O, including its operand link, per module before you can export the configuration' Can somebody point me in the right direction here? Thanks
  9. HI, I'm trying to communicate with another device via my V350. I'm using Modbus IP and I can successfully connect and read the 16-bit registers. However when I try to read the 32-bit registers I get either some very small numbers, below was my best guess, but as you can see I get a very small number. (should be 32856.876) I would also like to be able to read the 64-bit registers if possible Thanks All the best, Palsson
  10. Hello, I am developping an application that uses Bronkhorst mass flow controllers with modbus communication. Some years later, I used a vision V570 with success. This time, I am using an Unistream and reading floats with modbus doesn't work properly : the 2 registers are inverted so the value is wrong. I tried to revert the register by using buffers and it works perfectly for read values but values to be written are rounded so I can't send setpoint to my controllers. Does anyone have an explanation ? Below is a snapshot of the conversion code :
  11. Hello, I'm currently trying to read an encoder value from a drive via ModBus. The encoder value is split into higher 16 bit and lower 16 bit, hence I have to read two registers. Is there an easy way to combine the two values to get the single 32 bit value I'm after? TIA Jamie
  12. Hello, I have almost successfully established Modbus communication with a servo drive. I say almost, I cant read the register but I cant write to them. I want to change the speed via a button on the HMI. I get a -11 on the stats tag which is timed out. Could someone please have a look at the ladder for sending the modus write. Have I missed something?
  13. Hi, today in our company we received an ultra filtration system that comes with a V1040 on it. We've never had worked with an unitronics system before and we are trying to communicate the plc via modbus rtu over rs485 to work with our network. We configured the com port of the plc to work with rs485 as it was factory configured to work with rs232 but we can't reach it on our system, it's just showing of offline status. In the ladders we had a special subroutine for modbus, including all the registers and status of the system, we are reaching these points but it doesn't work. I'll attach some screenshots of the COM and modbus configuration and the modbus registers that i'm trying to read and i'll appreciate any help if i'm doing something wrong. Also, if i modify the program i need to upload it all or there is an option to upload only the com configuration without stop the plc? Due to the critic status of the process i only have a few minutes to stop the plc so i'll appreciate any shortcut to work faster on the system. As i said we've never worked with this plc before so we don't know the kind of responses of the system.
  14. Hello, Does anyone know of any problems with including both a Modbus Config and a Protocol config for the same COM port in the same program? I'm talking to a peripheral device which under certain circumstances may need to be sent an ASCII Protocol command to switch it to Modbus mode, so I will need to be able to do both types of communication in the same program on the same port. Can the two coexist, or will I need to re-execute the appropriate Config block when switching from one communications mode to the other?
  15. Dear Alls, I have to set up my Unistream to works at same time as Slave by Modbus RTU TCP and Masert by Modbus RTU RS485. I already wrote the program part about slave (Modbus TCP) than I set PLC communications->Protocols->MODBUS->Slave->Panel Ethernet...I have set the registers and "wrote" the code...now I am approcing the Slave side...my question is: I must use/set the same PLC communications->Protocols->MODBUS->Master->RS485 or I can mix/use the first with the PLC communications->Physical->Serial COM ? I hope that my qestion is clear enough. thanks
  16. mwis750

    Modbus error code "-11"

    Hi, I'm using USP-070 with UAC-02RSC. I setup two MODBUS masters - one on COM1 (9600 8N2) and one on the additional port (9600 8E1). For each master I've defined 30 slaves with two periodic operations (period 1 min). The first modbus line works without any issues however on the second one I'm getting weird results - around half of reads are successful the rest returns status 3. Status of operation is set to -11. I can't find any documentation what it means. There are no dropped packages, and each slave was double checked to make sure it uses correct transfer params (9600 8E1). Any ideas what can be wrong, or what -11 means ? thank you, Michal
  17. I'm working on a project in which I have to provide a huge number of data to a upper level SCADA system with Modbus TCP. Is there a possibility to import Slaves Addressing Lists from Excel? (like the export option?) Is it possible to use the Advanced Modbus Functions to provide data addressing as Modbus Slave? Are there any other options to provide the data? Thank's for your help!
  18. Dear all, I'm programming an application on a SM43-J-R20 PLC+HMI. I've added a V100-17-RS4X card, in order to use RS485. I've succesfully implemented Modbus RTU communication with a Frequency Drive. The thing is, I need to communicate with 11 of them. The ladder logic so far uses the Modbus function blocks, as can be seen on the Modbus webinars on Unitronics page. That is, I SET a variable (ex:MB0) , which is used for enabling the "function 06 Modbus" block (preset holding register). At the output of the block, I RESET that same variable, ensuring the block gets executed. At the same time I reset MB0, I SET a new variable (MB1), which in turn is used for enabling the second Modbus block. This creates a sort of "continuous broadcast" to the drivers (which, If they don't receive a command in a certain time, trigger a failure). When the last block gets executed, the sequence restarts, The question is, when I try to send a Stop command to one driver (for example), it takes an awful amount of time to execute the order (30 seconds or so). I believe I may have a conflict between some of this blocks being executed at the same time. Is there a tutorial or an example where I can see how to succesfully implement Modbus communication with several slaves at the same time? Thanks for the support. Kind regards, Martin
  19. dafontem

    Real number byte order

    I am reading values via rs-485, and am correctly reading and displaying these values on the unistream. However, I need to pass these values on to a building management system via Modbus tcp over ethernet. I have no issue communicating with the system, and I believe the system is correctly reading integer values from the unistream. The issue I run into is with real numbers. For one thing I can't seem to find anywhere that says what the default byte order is for real numbers (big endian, little endian) or how to change that, which I believe is at least a large part of the problem. I have been stuck on this problem for over a week so any feedback would be great.
  20. 1) When editing IO Inputs or Outputs Alias Names directly (from the table view, without going into window for editing single tag) - cold not put a space symbol between words while writing (later when the whole "Input5AbracadabraOpenSesame" is written, you can, of course go back and put spaces in between words finally getting to the "Input 5 Abracadabra Open Sesame"). Problem is not observed while editing in single tag editor window. This is new mis-behavior, which was not observed some versions earlier. 2) In Data Table view - String literals are center-aligned without any obvious reason, which detracts from readability of large tables. For Number literals it makes sense to have them centered within cells, which more likely adds readability rather than destroys it, but it's a different story for the Strings. 2.1) In the same Data Table view - it is unable to directly edit anything without explicitly going into editor window for each cell with double click... That's so tiresome and time consuming for large tables. Exception is direct Paste, which however helps little, if each cell is slightly different. 3) Alarms - ID's could not be freely changed... I see no obvious reason for not allowing to do that because there are gaps still allowed (by deleting some alarms in the middle) and no automatic reordering of ID's is then happening. Of course it does not change much, but adds to the overall order and clarity of the project. Thus why not allow to change them freely, of course, with checking for duplicates. 3.1) Alarms could not be moved around (between groups for example). Took me few weeks to reorder entire system of 100+ Alarms... 4) Ladder function could not be duplicated, like almost anything other could. 5) The XY Plot is wrong type of thing, or at least I need a different flavor (see attached pictures): a) XY_Beijer is the reference - a single clearly visible point of arbitrary size is drawn for each feed in data sampler; the lines referencing these point(s) to the X and Y axes are drawn (switchable on/off); the background where any arbitrary function could be drawn or at least a clear background where any arbitrary picture could be put into (switched during runtime, not statically linked); b) there is always a cause - see the Weather_compensation; c) and a workaround - see the Comfo_Uni which is far from ideal, but at least works, somehow... Why all of this - I was asked to implement Comfomatic (Weather compensation for central heating) functionality as addition to primary functionality. Typically it is done in special hardware like Danfoss ECL series controllers, however the underlying mathematics is rather simple, so why not.... It worked out - making a usable user interface is a major pain on the Unistream platform.... d) of course in ideal world, I'd be asking the Unitronics team to implement the entire functionality in specialized function block, both for GUI as well as for Ladder, however I understand there are so many uses for these PLCs that implementing separate function block for each of them would lead to the same clutter which was seen in VisiLogic series software and which the Unitronics guys were presumably trying to avoid in Unistream. e) and there is always a workaround of the workaround - or better, I call it suggestion 2: The the simple Canvas control could be added to the GUI section - thus allowing users to draw whatever they need to solve such challenging tasks... (or if the screen is already a canvas itself, then at least allow to draw some primitives - dots, lines & rectangles from the Ladder (yes I know there is a Line element in GUI, but it is static, you can not even put a variable as its X1,Y1 and X2, Y2 points... thus it's unusable). 6) Each MODBUS target has the Modbus Remote Slave structure attached. This structure has very useful variable 'Fail' within it. It could be ideally suitable for checking for communication problems, and throwing Alarm to the user if any. But what's next - user cannot clear the alarm, because there is now way to drop it to the zero (I mean, there is no way to write 0 to this structure). Yes, of course there is again a workaround - copy the contents to another variable and then compare to it, not the 0, But why always a workaround? Why not do the things right the firsthand. 7) I'm still begging for ability to reorder members of the struct, like it's done in SMS Message composition with the List Of Text Variable - simple control to move members up and down. It has no meaning while the project is little and simple, but when it becomes large enough, when various functionality is added to different parts all the time, when structs determine what is written to different tables back and forth, then keeping various recent additions together with their primary counterparts rather than at the end of the struct, could be soooo meaningful. At present its a tremendous and very time consuming job to reorder the structs, by renaming and replacing every single appearance everywhere, when it could so easy be made to happen automatically. Not to mention, that is so easy in plain C, just cut one and paste above each other... Many thanks for the product already that great (light years away from said Vision or Samba), but of course, any improvement would be warmly welcome. P.S. Please double-check the communication with Cinterion BGS2T modem - it tends to drop from time to time (worse with USB-COM, better with UAC-01RS2, but still not ideal) and then it's unrepairable till the next complete reboot of the PLC... (re-initialisation has no effect).
  21. Hello I am using modbus RTU Reading two sensors. Modbus ID = 1 & 2 respectively. From each sensor i read two values, one 16bit and one 32bit float. Baudrate = 9600. When I activate communication using "Active periodic" bit any one of the sensors (only) I can set my update interval at 100ms without having failures. The "funny" things occur when when i activate both: If I set my update interval at 400ms: It updates values from both sensor for a few Seconds (at 400ms rate), then it stops completely updating the reading/values from ID2. But the "success" Counter continues to count. And the values from ID1 continues to at 400ms rate. If I set my update interval at 500ms: It updates values from both sensor for a few Seconds (at 500ms rate), After a few second the ID2 values are updated at 50% rate (1s). ID1 continues to update 500ms. If I set my update interval at 1000ms: It updates values from both sensor at 1000ms without any problem. Any tips on why this happens and how to solve it? In my Application I need as fast update rates and would have thougt that beeing able to read one sensor at 100ms, I should be able to read 2 sensors at 200-250ms. Thanks for a super Product! Meeg
  22. I have multiple devices such as printers(2) and scanners(2) that I want to communicate to using only 1 COM port in V1040 PLC. Printers and scanners support RS232/RS485 protocols. Can someone suggest on how can I achieve this? I looked at options with Modbus protocols, but I didn't understand how can I assign network id's to my printers and scanners. If I am required to have any additional hardware, please suggest.
  23. Hi! My name is Arnor and I am from Iceland I am trying to establish connection between two Vision PLC's. I have the master: V700 and V350 as slave. I can use SCADA pc software to connect to the slave and read the data. But I am not able to read data from slave to V700. I added both programs to google drive folder (sorry, the programs was to large, and its a bit mesh): https://drive.google.com/open?id=1yL1h1ZvJomBeoY7v22UvHVeY09T4ooAC I am using also Serial modbus on both sides that works well. The PLC are set up like this: V700: 192.168.1.20 V350: 192.168.1.30 Any idea what I am doing wrong? cheers!
  24. smartdesignmike

    UniStream advanced Modbus commands

    Where can I find out what the advanced Modbus commands do? Help does not have anything as well as the online help.
  25. Hello, I'm trying to figure out how to make a watchdog function in a Samba SM35-TA22- The customer will use TCP/IP to mostly read values from the PLC. If the communication goes down, the unit should stop. But I have no idea how to make this. I was looking at SB147 which is Socket 0 connected but it is constantly changing when I disrupt the connection, I guess it is due to auto connect. Is it the best option to use SB147 with perhaps a timer so if it is on for 10 seconds, that means the communication is up and the unit can run, but if sb147 change, the timer reset and the unit is stopped. I just want some feedback if I'm all wrong here. Thanks! //Peter
×