We do not have any plans to support X-simulator, but we welcome any attempts to do so, and we would be happy to assist anyone who is trying to make them work. We provide complete documentation for the virtual COM port interface to our USB products as well as a USB SDK that shows how to do native USB communication with the devices, so it should be straightforward for a programmer to connect any software to the devices.
We still do not know of anyone using the jrk with X-simulator, but if you are trying to make it work, we could try to help you. Are you trying to use the jrk’s serial interface on a virtual COM port?
sorry paul for posting here on peters question just thought to keep the x-sim stuff in one place.
The question is that I’m sending information to the jrk via command port in 8bit ,binary.
at the moment the uso parser is ~22163 in decimal to set my motor to centre,
i beleive that im sending 221 to set target to low resolution and 63 is the position half of 127.
so what i’ve read is that to send set target in high resolution i would have to change to 12bit ,binary
eg ~170~~(value in decimal 0-x)~
x is were i just cant get my head around.Not a programmer, Fabricator/Draftsman
You still have not given me any indication that you have read the command reference in the user’s guide, and you have not asked a question. By the way, I do not know where you got the numbers you are using now, but your “low resolution” command is actually an instance of the high resolution command, and 170 is the baud rate detect byte.
Yes read the bl*&dy manual for the last 12 months, i must be thick.
So to set target to low res - 225,(0-127) - sent as a 8bit command.
to set target to high res - 221,(0-127) - sent as a 12bit command, not sure how this worked for me
as xsim can only send 8bit,16bit,32bit commands.
So again paul have we got the values right now seems to move a lot smoother in low res.
Thanks for ya help mate.
Robbie_73, I thought that you had solved your problem because I did not see any questions, you said it was moving smoother, and you ended by thanking me. But I just realized that “So again paul have we got the values right now seems to move a lot smoother in low res.” was probably intended as a question! Is there some reason that you are not using the question mark in your posts? It would really help me figure out what you are trying to communicate.
Anyway, my impression is that you do not understand the Set Target High Resolution command, so can you read over that section in the User’s Guide and tell me what part of it gets you confused? If you actually understand it, you will be able to tell me, for example, what bytes to send to set the target to 2000.
Hi Paul
The command documentation above actually covers Motor Off, Set Target High Resolution, Set Target Low Resolution Forward, Set Target Low Resolution Reverse, Get Error Flags Halting, Get Error Flags Occurred, Variable Reading Commands. Obviously there must be other commands as well, e.g. Set Feedback Mode, Set Proportional Coefficient, etc.
Is there a full command reference available?
Thank you
Thomas
Is your command related to X-sim? If not, please post it in a new thread.
Anyway, no, there are no such commands on the jrk’s serial interface. If you want to access those commands, you will have to use the native USB interface as shown in our USB SDK. But you should avoid adjusting these settings over and over again in a loop, since that could quickly wear out the jrk’s EEPROM memory.
If it helps, I command the Jrk’s SetTargetHighResolution, -LowResolution and magnitude like this from C++.
Software example is available at https://github.com/poes-weather/Sensor-Benchmark. It is built using Qt and linux.
Hi Paul. My question is x-sim related but if you wish I can happily ask my question again in a new thread.
My question is if the commands listed by me above are all the available commands in serial mode (communication via virtual comport) or if there are others I have missed?
Is there a command reference (“cheatsheet”) available for the native USB interface? I know I can plough through the source code and pick them up individually but there might be a summary table like for other µP.
Thanks ptast for your help. This might be a good snippet of code for me
The command reference should list all of the serial commands. There are no serial commands to change settings, since we expect them to be able to use the Configuration Utility to adjust settings, and we do not want the risk of accidentally changing settings or changing them repeatedly in a loop. There is no better reference for these commands than the source code, but compared to actually implementing USB communication, reading our source code should be pretty easy. I recommend starting out by looking over JrkCmd.cs.
Oh, by the way, if you get the USB SDK and look at Jrk/protocol.h, that is basically a summary table of all the serial commands, USB commands, parameters, and values available used by the jrk. We also have a C# version of the same stuff in Jrk/Jrk/Jrk_protocol.h. So those files might be good places to look if you want to know what is available. I would be happy to help explain anything in there if you have questions!
I would prefer using libusb and not a serial (COM) connection, using libusb gives you much more freedom. Sample code howto control Jrk:s (native C/C++) are also included in the sensor-benchmark package.