Ziwi Posted January 21, 2011 Report Share Posted January 21, 2011 Hi All So I'm doing a new project involving a V560 (looks good!) and 3 x SEW motor drives. The drives can be controlled by either Modbus RTU or analog control signals. In previous projects I have used the analog route for simplicity/robustness. Modbus offers some improved functionality. Having spent a large amount of time looking at Modbus in the Visilogic help files, help from other forum members and the drive documentation, I am still leaning towards analog. A basic Modbus implementation would involve 4 read/write parameters (registers 1-4) and 7 status reads (registers 5-11) (For each drive) Example: Request: [01] Drive address[03] Command [00][05] Register start address [00][01] No. of registers [94][0B] Checksum Reply: [01] Drive address[03] Command [02]No. of data bytes[00][00] Data[b8][44] Checksum. Is there a checksum function or must each string be pre conceived? Looking at the examples I see plenty of unitronics - unitronics master/slave applications. How different is Unitronics - (Other Vendor)? Examples would be good. Is it practical to suggest a standard format datatable and ladder structure so users can share datatables of various devices? This is sort of bordering on UDFB, but I didn't want to say that out loud! Sorry- as you might tell I'm a bit of Newbie in this dept. Thanks. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted January 21, 2011 MVP 2023 Report Share Posted January 21, 2011 If you use the Modbus function blocks you won't have to worry about formatting the data packets or checksum as you describe. The block does that for you. There are Modbus examples that are a good starting point. You will have to do your own handling of the commands to each drive, writing a program that will trigger read and write blocks individually and not crashing into other blocks while they're busy. Start by connecting one drive and getting a feel for how the Read and Write blocks work, and then adding the other drives and sequencing between blocks for those. Don't forget that Unitronics is 0 based and Modbus is 1 based. If you're not getting the right data, try subtracting 1 from your start address. Post your code as you go along if you run into problems. Joe T. Link to comment Share on other sites More sharing options...
Ziwi Posted January 23, 2011 Author Report Share Posted January 23, 2011 If you use the Modbus function blocks you won't have to worry about formatting the data packets or checksum as you describe. The block does that for you. There are Modbus examples that are a good starting point. You will have to do your own handling of the commands to each drive, writing a program that will trigger read and write blocks individually and not crashing into other blocks while they're busy. Start by connecting one drive and getting a feel for how the Read and Write blocks work, and then adding the other drives and sequencing between blocks for those. Don't forget that Unitronics is 0 based and Modbus is 1 based. If you're not getting the right data, try subtracting 1 from your start address. Post your code as you go along if you run into problems. Joe T. Thanks Joe That clears up a few things, will give it a go! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now