I’m having an issue with a project that I’m working on and hoping that someone on this forum can help me.
I’m using the Jrk 21v3 with feedback to control a Concentric LACT10P-12V-20 Linear Actuator with Feedback. This is for an industrial application where the actuators will move rails to adjust for varying size product on a conveyor system. Everything works fine when I communicate to it through the USB port on the Jrk. I am using the configuration utility as well as sample programs in .NET cross platform and they all work well.
For my application USB distance is not long enough nor can I communicate with the number of units required so I need use serial communication. The Pololu website recommended using the 23201a serial device to connect to the Jrk 21v3 using the TTL lines. I have tested this setup with the example programs but am having a consistency problem with connecting to the device. My newer laptop does not have a COM port so I am using a USB to serial converter to make the connection to the 23201a.
I can get this setup to work but the problem seems to be at startup. If the system is turned off or the laptop shut down none of software examples that I have tried will connect to the 23201a. I have found however that if I use the Pololu Serial Transmitter v1.3 program found on the website and send it the detect baud rate command 0xAA it will usually then work with the other programs. If I send the 0xAA using the programs before other commands are sent it does not work. So one question is: what is different in the Pololu Serial Transmitter program that causes it to work. I’m guessing it has something to do with the Baud Rate but that’s only a guess. Is the source code available for the Pololu Serial Transmitter program so I can compare the code?
Another question is that the documentation says that the Jrk needs to be configured in the USB Dual Port or USB chained for this to work. However it does not work at all unless it is in one of the UART modes, either fixed or detect. Any thoughts about that?
So far I am only testing with one unit but I plan to use the daisy chaining configuration to connect several of these together. This is why I need the chained mode to work.
Attached is a crude hand drawing of my connections and the configuration file with settings that I am using.
jrk21v3_linear_actuator_settings.txt (1.4 KB)
What sample programs are you using? Can you be more specific about the problem you are having (e.g. are you receiving errors and if so can you provide the error messages)? When the system is not working, is the red LED on the jrk on? If it is, could you try temporarily connecting the jrk via USB and checking the “Errors” tab of the Jrk Configuration Utility to see which one is triggered?
To answer a few of your questions, when the jrk’s serial interface mode is set to UART, detect baud rate, the jrk looks for the 0xAA byte and uses it to determine the baud rate. However, for your case, I would not recommend using the jrk’s auto baud rate detection feature since it could cause an additional mode of failure. As for the serial interface mode, if you are sending serial commands via USB to the jrk, then you will need to use USB Dual Port or USB chained. If the jrk is receiving TTL Serial commands through the RX and TX pins, it should be configured as UART, fixed baud rate or UART, detect baud rate. In general, any program that connects to the serial port should set the baud rate to the correct value when it is connecting so it can ensure that the baud rate is correct. The Pololu Serial Transmitter source code is not made available, but it is just a simple program that uses the .NET SerialPort class to read and write bytes from the COM port.
Thanks for replying.
The main code that I would like to get to work is this one, it is the cross platform C version
I have also tried the Windows C version but it works much better
When I run the cross platform C version I do not get any errors, the red light is off. The symptoms are that when the get feedback and the get target commands are issued results returned are invalid, values are returned but they are not good values in the proper range. Sometimes the set target command will work and the motor will move but not always.
I’m wondering if it might have something to do with setting the baud rate, this version does not have a command to specifically set it. Do you know if there is a way? I searched the internet and have not come up with anything so far.
Thanks for your help
Electrical Software Engineer
Arrowhead Conveyor Corporation
I do not know of any way to set the baud rate in the jrk’s cross-platform C serial example which would work when run in Windows. If you are using Windows, I recommend using the jrk’s Windows C serial example, which has code for setting the baud rate. What happens when you run that example? If you continue to have problems with it, can you tell me what operating system you are using and describe the problem in detail?