Serial control of jrk 21v3 standalone

Is the 0x(ID) value for the Pololu protocol? According to the manual defintion of the Set Target High Resolution command, shouldn’t the command should be 0xC0 instead of 0x40 if you ignore the lowest resolution bits? The 0xYY could vary from 0x00 to 0x7F, though, so that should provide adequate control.

yes that is how I talk with all the controllers. They all come addressed as device 0bH but you can change that to what ever you want. I addressed mine as 1 thru 4 and 11 thru 14 to keep the pairs straight.
When using the 0xAA,… you need to set the high bit off so command C0 becomes 40.

Oh and I think you low resolution command is wrong because you have the aa in there without the id. Also it will only come back to the middle with the e1 command. e1,01 will be real close to the middle. To go to the other end you need e0, magnitude

Thanks very much for your help (and patience). I reprogrammed the interface to issue the Set Target High Resolution commands with my previously established max and min values and it works perfectly :smiley:
I send 0xAA 0xC0 0x58 to set to max and 0xAA 0xC0 0x22 to set to min. It cycles exactly the way I wanted it to.
I think the 0xAA first byte doesn’t hurt, if using the auto-detect baud rate setting. Also, the MSB being cleared following the 0xAA is only true if using the Pololu protocol. I am using the Compact protocol so it doesn’t appear to be a problem.
Thanks again, to everyone, in helping me get this interface working. One thing about solving a problem like this is that it gives you much better insight for the next project… :laughing:

I’m attaching a couple of images of the final setup. I haven’t attached the device the actuator will control yet, though.



Thanks, again, to all that helped in getting this working.

Good for you. I am still having problems today I was trying to speed up the data stream but couldn’t get reliable communications at anything but 9600b. Really strange, I request position at 19200b and get good position data back but current request info is no go. At 9600b all is fine. Head scratcher. I have to use the other protocol because of working 8 motors for my project.

I’m sorry to hear you’re having problems. Since I finally have my platform working, let me know if you want me to try something on my separate hardware platform to try it out…
Do you think the baud rate issue is related to the Pololu protocol?

I am glad you solved your problem. Thanks for letting us know what the issue was.

It sounds like it might be a noise issue. Are you using automatic baud detection? Could you tell me what happens when you try to read the current? Could you post a wiring diagram showing how everything is connected?

- Zeeshan

I don’t think it is noise. I do have auto rate detection on all of the controllers. It could be on the plc end but as I recall the controllers wern’t putting out a pulse at all when requesting current at that higher rate. I’ll take a screen shot of the scope tomorrow if that is still the case. I had updated the firmware of the plc and it causes a bunch of problems until I got the data registers back in sync. Now I got a good responce at 9600 I will make the change and see if it still fails. As I said it is so odd that I do get back position data but not current at the higher rate.

Could you try setting your jrk motor controllers to a fixed baud rate?

- Zeeshan

so I set the first controller of 8 addressed 01 in the chain set to fixed rate 19200 and all the rest follow even though they are set to auto detect? I don’t get it.




here is the schematic (for 2 of 8 controllers)


Hello.

Zeeshan is not available for the rest of the week but I can help you from here.

I recommend setting the serial mode of each jrk to “UART, fixed baud rate” in order to simplify the system. You will need to connect a USB cable to each jrk in turn and use the Jrk Configuration Utility to change that setting for each jrk. Also, don’t forget to hit the “Apply settings to device” button.

Based on the captions in your pictures it sounds like you were able to get one of the jrks to respond at 19200 baud. If you follow the advice above hopefully you can get them all to respond at that baud rate. I am not sure why you are having trouble using the auto baud-rate detect because your serial signals look pretty good to me. I have made a note to check into this issue later. In the meantime, I am hopeful that you can get your system working by using the “UART, fixed baud rate” serial mode.

Thank you for the detailed schematic. I looked at it and did not see any problems.

–David

Well as I said at this point they are all responding at the higher rate. That is what I don’t understand. I only changed the first one to fixed baud rate 19200, the rest are auto detect rate. After the change I have a good pulse train from all 8 controllers send good data back. I guess if it works then why fight it but I just want to know why. The scope signals are directly from the Rx and Tx pins of controller #01. I will switch it over to the main in out lines to the PLC and post that pic as well.

I am not sure why changing the serial mode on one of the jrks would affect the ability of the other ones to send responses to commands. Is it possible that you accidentally changed something else about the system when you were changing the serial mode? I would try changing that one jrk back to auto-baud-detect mode just to see if things can work.

How many jrks are in your system? Your schematic shows two but in an earlier post you said “all the rest”.

–David

The system has 8 motors. I have them addressed 01-04 and 11-14. Each of the carrier boards mounts two controllers and then there is a cable to the next carrier and 2 controllers. Was so busy today I didn’t get to do any more test but hopefully tomorrow.

Finally got a chance to do a little more testing today. I found that at 19200 for some reason the response on a position or current request command is iffy and at 38400 I never get a response unless I have the manual baud rate set in the controllers. Doesn’t really matter all that much because I don’t plan to change baud rate once it is finished. I am pretty happy with the controllers but for the lack of deceleration settings. For a dc motor servo controller that I didn’t have to totally build from scratch they will work great for me.

couple of pictures of the test setup ready to install, note on the attachment I swapped the pins and sockets to make sure they don’t get plugged in backwards !




Thanks for the pictures! Your setup looks very nice. --David

Hi, guys, I’m new here, because I just bought one of these actuators and a jrk12v12 and I’ve got everything hooked up right with feedback and all.

I know this because I can control perfectly, the actuator with the Jrk Configuration Utility. I can Set Target exactly and it goes in and out, great.

Trouble I need your advice with: I can’t get the serial commands to work, from NEITHER the Pololu Serial Transmitter routine, nor my microcontroller.

My Oscilloscope looks exactly like one of the images in one of the above posts, and I know I’m sending the command sequence to the RX pin with my micro.

Is there a trick to getting the Serial Commands to drive the motor? I’ve read everything and can’t understand why the Serial mode is non responsive.

Thanks if you read this.