user32767 Posted March 13 Report Share Posted March 13 Hello! As the name suggests, I have a problem with understanding of UMD-0010C-B3 Modbus functionality. According to page 129 of UMD-Series-AC-Servo-Users-Manual I need to modify Pn700. But how? I can't modify it using buttons on the device itself, it's stuck on factory setting H0151. Could you please give me a hint about how to change it? And also, just to check that I got it right, do I need to set Pn700 to 172 to get Modbus RTU (8,E,1) communication with baud rate 19200? Link to comment Share on other sites More sharing options...
user32767 Posted March 13 Author Report Share Posted March 13 It seems i've found it out. Used the default communication parameters (Modbus ASCII, 8 O 1, 9600) to connect and change the Pn700 parameter. If you write address in hex, it will be 2BC, but if you write address in decimal, then for some unknown reason you need to use 701 instead of 700 (at least I had this issue on my Weintek HMI). So, it's solved, but I should probably leave this thread open for next two days, just in case any more modbus-related questions occur. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 13 MVP 2023 Report Share Posted March 13 1 hour ago, user32767 said: for some unknown reason you need to use 701 instead of 700 Likely because Unitronics starts their addressing at zero and the other device begins at one. This is a common issue. 1 Link to comment Share on other sites More sharing options...
user32767 Posted March 14 Author Report Share Posted March 14 (edited) So I checked page 56 of the manual about Control Mode (I need position control) and could not find option "control by Modbus". The closest thing that I found was "position control(pulse train reference)", which seems to work from pulse input. But is it somehow possible to just set some number of pulses in some modbus register (let's say 1000), then send some kind of "Go!" command via modbus and servo drive will rotate by this 1000 pulses and stop? Trying various registers. Unexpectedly, switching register 1023 (JOG servo enabled) gives error A66 "CAN communicate faulty occured". It makes absolutely no sense - I use Modbus, not CAN. Same error occurs if I try to enable JOG from buttons, using Fn002. So I thought probably changing Pn006 from CAN to "No bus" will solve the problem, but I'm afraid that it will cut off Modbus communication as well, and I could not find any way to reset UMD-0010C-B3 to factory settings, using just buttons. Edited March 14 by user32767 additional information Link to comment Share on other sites More sharing options...
user32767 Posted March 15 Author Report Share Posted March 15 Well, time for an update. I took a chance today and set Pn006 to "No bus" instead of "CANopen", and that did the trick - now A66 is gone, and I still can communicate by Modbus (despite the "No bus" setting), I can successfully rotate the motor using registers 1023 (JOG servo enabled), 1024 (JOG forward) and 1025 (JOG reverse), but I still can't understand how to rotate servo by exact number of steps. It should be the registers 1026 (JOG forward at node position), 1027 (JOG reverse at node position) and 1028 (Pause at node position), but they have no effect at all. Besides, I really have no idea where to set this "node position": I have "JPos0 position", "JPos15 position", "Current position setting" and none of that helps. Haven't found any good description of this parameters in the manual. So, if someone knows how to rotate a motor by exact number of steps using Modbus, I'd be grateful for advice. Link to comment Share on other sites More sharing options...
user32767 Posted March 19 Author Report Share Posted March 19 Another update: Got an answer from Uitronics support: "...The UMD doesn't support positioning via Modbus, the positioning can be done via CANopen or a high-speed output. Via Modbus you can do speed control as JOG operation, but not positioning. There's no reference or spec that says that positioning can be done via Modbus..." So, that's it. No positioning via Modbus. Looks like artificial restriction to me, somehow frustrating. Anyway, today I'm going to try setting target position using high-speed output, and do all the rest via Modbus. Still not sure what registers I should use for that, anyway. Probably register "JOG forward at node position" will finally start working if I set target position via high-speed output? As always, I'd be glad to see your ideas and suggestions, especially if you have some experience with positioning Unitronics servo. Link to comment Share on other sites More sharing options...
user32767 Posted March 22 Author Report Share Posted March 22 I'm currently trying to set position with pulse input, but I fail. Other parameters are monitored/set via Modbus. I connect source of pulses and try different frequencies, from 6 Hz to 31 kHz, but parameters 0818 "Setting pulse" (which seems to be read only) and 080E "Pulse setting" (also seems to be read only) both remain 0. Or probably I need to use another parameters? Or set position using "JPos0" and "JPos15" (what are these anyway?), but both of them don't give any effect. "JOG FWD at node position" and "JOG REV at node position" does not work either, changing "Program mode", "Program start step" or "Program stop step" also does not help. Ladies and Gentlemen, if anyone can give me a simple example how to command this "awesome" servo to turn N steps without using Unilogic, I'd be quite grateful, because at this point I'm already so frustrated that started to look for better documented servos. Haven't given up completely yet, so if I somehow make this thing work, I'll be sure to post here. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted March 22 MVP 2023 Report Share Posted March 22 10 hours ago, user32767 said: how to command this "awesome" servo to turn N steps without using Unilogic In this servo present point to point positioning mode controlled via termail inputs. Try to program this mode and maybe you can do your task without modbus. P.S. Please use updated manual from main unitronics page. 1 Link to comment Share on other sites More sharing options...
user32767 Posted March 26 Author Report Share Posted March 26 On 3/23/2024 at 2:45 AM, kratmel said: In this servo present point to point positioning mode controlled via termail inputs. Try to program this mode and maybe you can do your task without modbus. P.S. Please use updated manual from main unitronics page. Thank you for reply, but it seems impossible. I'm trying to perform position control of the servo via terminal inputs for days without absolutely any sign of progress. Everything in this servo is so unnecessarily overcomplicated. I have connected pulse frequency output of controller to PULS+ and PULS- inputs of the servo, trying different frequencies - no success, motor is not rotating and registers 0817-081A ("Setting Pulse Counter") are all 0, and 080B ("Input state") is 0, and 080E ("Pulse setting") is 0. The Pn004 is H0000, Pn005 is H1111. Have anybody ever succeeded in rotating servo by N steps using terminal input control? If yes, could you please fill in this simple form: "First, I've connected _________ to terminal __________, ........ (minimum of necessary connections) _________ to terminal __________, Then I've set following parameters this way: _________ is set to value __________, ....... (minimum of necessary parameters) _________ is set to value __________. After that, when I applied signal with frequency ___________ Hz and pulse width __________ ms, and ______________________________________________________________ (whatever else actions necessary), Servo motor rotated by __________ number_of_steps/degrees/any_other_units." Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted March 29 MVP 2023 Report Share Posted March 29 On 3/26/2024 at 1:14 AM, user32767 said: Everything in this servo is so unnecessarily overcomplicated I hear you. It seems like this applies to every brand of servo I've ever worked with 😒 I don't have a UMD in front of me so I can't fill out your form. Sorry. On 3/26/2024 at 1:14 AM, user32767 said: I have connected pulse frequency output of controller to PULS+ and PULS- inputs of the servo, This may be the problem. You didn't included a diagram of how you actually wired it. I posted an explanation about connecting servo and stepper pulse inputs in the Visilogic forum. It applies here, too. Let us know if this helps. Joe T. Link to comment Share on other sites More sharing options...
user32767 Posted March 29 Author Report Share Posted March 29 Thank you very much for your reply! But I did it a bit other way. So, VICTORY! I finally did it, though Unitronics Support wrote to me that it's not possible to position UMD0010C-B3 via Modbus. In fact, it's possible - I'm successfully positioning the servo via Modbus RTU. I really have to go now, but I'll edit this post later to explain it better. Link to comment Share on other sites More sharing options...
user32767 Posted April 2 Author Report Share Posted April 2 Now, just as I promised, writing how to perform positioning via Modbus RTU, so that next person who needs this won't spend weeks figuring it out like I did. So, the servo motor is UMM-0010CN-B4, servo drive is UMD-0010C-B3. 1) First, I've connected these: 1.1) "U,V,W" wires from servo motor to terminals "U,V,W" of the servo drive, 1.2) Another cable from servo motor (not "U,V,W") to terminal "CN2" of the servo drive, 1.3) "L" and "N" wires from 220 V AC electrical socket to terminals "L1C" and "L2C" respectively, also to terminals "L1" and "L2" respectively, 1.4) Two RS485 wires to pins 6 and 3 of terminal "CN3", and if you have problems with following next steps, just try to swith places of this two wires, or interchange them or how do you call connecting A instead of B and B instead of A. 2) Then I've set following parameters this way: 2.1) Entered Fn007 and pressed in fast sequence "up", "down", "down", "up", "enter" to enable "Pn" in menu. 2.2) Pn701 set to value "4" - set Modbus address to 4 (you can use other value convenient for you), this parameter can be set from front panel buttons. You have to restart the servo drive after changing this parameter, it won't apply until restart. 2.3) Pn700 set to value "0171" in hex, which means "[Reserved](0), [Modbus control enabled](1), [Modbus RTU, 8 data bits, Even parity, 1 stop bit](7), [9600 bps](1)". Oh, this is a tricky one - the whole this thread started from it. You see, you can't change Pn700 from front panel (at least I couldn't), so after you've set Modbus address in Pn701 you have to to connect to servo drive via Modbus, using it's default communication parameters in Pn700: "0151" in hex, which means "[Reserved](0), [Modbus control enabled](1), [Modbus ASCII, 8 data bits, Odd parity, 1 stop bit](5), [9600 bps](1)". So I connected to servo drive via Modbus ASCII and I had to change register 701 to change Pn700, though normally number of parameter is the same as number of register, so be careful with numbers. The best way to see if you have shift of address numeration or not is to check the value of Pn701 via Modbus: if you see the value you've set there ("4" in our example) in register 701 - there is no shift, but if you see that value ("4") in register 702 instead - you have address numeration shift. Restart the servo now to apply new value. 2.4) Pn000 set to value "0111" in binary, which means "[No alarm for power loss](0), [External N-OT disabled](1), [External P-OT disabled](1), [External S-ON disabled](1)". We need to change this parameter for two reasons: first, to disable P-OT and N-OT (these are some kind of ultimate "stop now!!!" signals for either direction of movement), so that servo does not expect signal on corresponding inputs and we don't get error "pot/not" because we haven't connected "CN1" terminal, and second reason is to remove the necessity for additional start signal ("S-ON"), so that servo is always ready to run, staying in "run" state instead of "bb" (by the way, if it is somehow bad for the servo - please let me know, I'm new to all this servo stuff). Yes, I know that disabling P-OT and N-OT can be not very safe, but we are talking here about the easiest way of making things work, and from that you can later adjust safety to the level you want. This parameter also won't apply until restart, but we'll restart later to change a lot of parameters at once with a single restart. 2.5) Pn006 set to "0000" in hex, which means... OK, I won't explain every digit here, just because I'm not sure that I completely understand it myself, but what's really important is that last digit needs to be "0" (which means "No bus") instead of the default "3" to disable CANopen, otherwise we'll get constant "A66" error. Needs restart, but we'll restart later. 2.6) Pn005 set to "00C0" in hex, which means "[Reserved](0), [Out of tolerance alarm disabled](0), [Position control: contact reference](C), [Use general torque feedforward](0)". The most important here is the "C" part, for "Position control contact reference", it is mandatory for being able to perform position control via Modbus. Needs restart, but we'll restart later. 2.7) Pn681 set to "0031" in hex, which means "[Reserved](0), [Change step input signal electrical level mode](0), [PCON change step, need start signal](3), [Single operation, PCL start signal, NCL search reference point in forward direction](1)". This parameter is applied immediately, without restart. 2.8) Pn512 set to "F" in hex, which means "terminals CN1_14, CN1_15, CN1_16, CN1_17 are controlled by Modbus". I mean, no wires connected to them, Modbus tells, which one is OFF and which one is ON. This parameter is applied immediately, without restart. 2.9) Pn513 set to "F" in hex, which means "terminals CN1_39, CN1_40, CN1_41, CN1_42 are controlled by Modbus". This parameter is applied immediately, without restart. 2.10) Pn509 set to "3716" in hex. Remember terminals from step 2.8? Now we are assigning individual purpose for each of them: "3" stands for "N-OT", "7" means "N-CL", "1" is "P-CON", "6" is "P-CL". Needs restart, but we'll restart later. 2.11) Pn510 set to "4444". Well, here is all the same as in previous step, but now I set every terminal from step 2.9 to perform "Alarm Reset" just because I don't need any other functions yet. You can set it to your preference. Also needs restart to apply. 2.12) Restart! 3) After that, we can finally try to perform positioning of the servo. 3.1) First, some basics, learned by "trial and error" method: After restarting the servo, some random point becomes kind of "home", so how do we find it: set Modbus register "0900" ("Modbus IO" - it controls signals mentioned in steps 2.8 and 2.9, 2.10 and 2.11, I will later refer to it as "Command") to value "4", which is "0100" in binary - servo starts rotating. Then set Command to "8", which is "1000" in binary - after some time servo will stop at some point - that is "home" position, it remains there until restart. We can tell servo to consider it Zero position by doing the "position Zero sequence" (that's how I call it, you won't find it in manual, it's experimentally found): set Command to "0" --> set "Position teaching pulse" to "0" using Pn687 and Pn688 (Position=Pn687*10000 + Pn688, so set both of them to 0) --> set register "1023" ("Jog servo enabled") to "1" --> set register "1070" ("Position teaching function") to "1" --> set register "1023" ("Jog servo enabled") to "0" --> set register "1070" ("Position teaching function") to "0" --> set register "1023" ("Jog servo enabled") to "1" --> set register "1070" ("Position teaching function") to "1" --> set register "1023" ("Jog servo enabled") to "0" --> set register "1070" ("Position teaching function") to "0". That's it, now this position is considered to be 0. Next thing to tell you about is preparing the "program" for positioning. So there are 16 user-defined "steps" (JPos0...JPos15), each of them has individual position and speed values (don't worry - that does not mean that you have only 16 fixed points to choose from, no, in fact, even one such "step" would be enough to perform positioning to whatever positions you need). Speed of positioning for each step is defined by corresponding parameter, for example, Pn632 for JPos0 or Pn647 for JPos15, range is 0...6000 rpm, default is 500 rpm. Position of each step can be defined by two corresponding parameters, for example, Pn600 and Pn601 for JPos0 or Pn630 and Pn631 for JPos15. But why two parameters for each step? Well, you see, we are going to deal with some big numbers here, so for JPos0 target position is be calculated like this: Pn600*10000+Pn601. But how to choose what step or steps will be executed? For that purpose we have Pn683 ("Program start step") and Pn684 ("Program stop step"). If only JPos3 needs to be performed, then both Pn683 and Pn684 need to be set to "3". If we need to perform JPos2, JPos3, JPos4, JPos5 consequently, then we need to set Pn683 to "2" and Pn684 to "5". Also, pay attention to Pn682 ("Program mode")! It's very important parameter, it decides, what kind of positioning you choose, "1" for absolute or "0" for incremental. Let me explain the difference on example: imagine we have JPos0 position set to "1050120" (by setting Pn600 to "105" and Pn601 to "120") and JPos1 position set to "0" (by setting Pn602 to "0" and Pn603 to "0"), we chose program steps JPos0 and JPos1 (by setting Pn683 to "0" and Pn684 to "1") and current position of the servo is somewhere else. Let's assume we are commanding servo to execute the program (I will explain later how to do that). Now, behavior of the servo would depend on how Pn682 ("Program mode") was set: if it was set to "0" ("incremental"), then servo would first move to position located 1050120 points away FROM CURRENT POSITION, and after that stay there, because "0" in JPos1 would mean 0 points away from where it is; but if Pn682 was set to "1" ("absolute"), then servo would first move to position located 1050120 points away FROM ZERO, and after that it would move all the way back to position 0, because "0" is what JPos1 was set to. 3.2) Now, time for some practice: let's command servo to go to position 1050120 with speed 10 rpm and stop there, after that command it to go to position 0 with double speed. And for all that we will use only JPos0, just to show that we are not limited by 16 fixed steps. Set program mode to absolute (by setting Pn682 to "1"). Set start step to JPos0 (by setting Pn683 to "0"). Set stop step to JPos0 (by setting Pn684 to "0"). Set JPos0 position to "1050120" (by setting Pn600 to "105" and Pn601 to "120"). Set JPos0 speed set to "10 rpm" (by setting Pn632 to "10"). Perform sequence that I call "next step preparation", which should be done between steps to make sure nothing is stuck: set Command to "0" --> set register "1023" ("Jog servo enabled") to "1" --> set register "1023" ("Jog servo enabled") to "0". Set Command to "3", which is the same as "11" in binary - servo will move to position 1050120 (approximately 360 degrees from zero position) with speed 10 rpm. When it reaches target position it will stop there. Perform sequence that I call "next step preparation", which should be done between steps to make sure nothing is stuck: set Command to "0" --> set register "1023" ("Jog servo enabled") to "1" --> set register "1023" ("Jog servo enabled") to "0". Set JPos0 position to "0" (by setting Pn600 to "0" and Pn601 to "0"). Set JPos0 speed set to "20 rpm" (by setting Pn632 to "20"). Set Command to "3", which is the same as "11" in binary - servo will move to position 0 with speed 20 rpm. When it reaches target position it will stop there. Perform sequence that I call "next step preparation", which should be done between steps to make sure nothing is stuck: set Command to "0" --> set register "1023" ("Jog servo enabled") to "1" --> set register "1023" ("Jog servo enabled") to "0". 4) That's it. Thanks for reading, I hope it helps someone sometime. Thread can be marked as "Solved". And one more thing: that is how I expect Modbus section of user manual for the servo to look like, because nobody should spend weeks figuring it all out. 1 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