sirnoname wrote:Spider plugin means you set your code in a net of axis.
You insert 6 axis in the math section like the provided profile, you add the spider plugin to each axis once and choose out of the boxes which input value should be chosen, each axis one input for a big array in the background. This values are stored in a array for your code. Each axis will be called but only if 6 axis have a input value you get to your code and set a array of outputs. After the calculation the value go to the output of each axis in the next math round.
But the question is: do you use SCN5 or hardware that is in the interface setup or USO? If not, you control your own hardware out of your plugin code.
If you like more inputs or outputs you must expand your the dialog.
I am struggling with it. Thank you for taking the time to help.
I am using USO. I have Arduino which I am using to control the valves of the 6 hydraulic actuators. This is how the system works or should work:
Hydraulic Actuators connected to the valves which open fully when they receive 10Volts, and close when the voltage is 0. So, when arduino sends signal for 10volts, the actuator extends fully. In my case, the Arduino sends 6 separate signals to the 6 actuators (valve gets the signal). Depending on the signal, the hydraulics extend or retract which moves the platform. The arduino waits for X-Sim to send data to it by the following format:
BIN output format is - “AB” byte1 byte2 byte3 byte4 byte5 byte6 byte7 0x0D (CR)
"AB" - start of data identifier for the receiving micro controller
byte1 - reserved
byte2 - 8 bit binary number giving act1 demand in 0-255 scale
byte3 - 8 bit binary number giving act2 demand in 0-255 scale
byte4 - 8 bit binary number giving act3 demand in 0-255 scale
byte5 - 8 bit binary number giving act4 demand in 0-255 scale
byte6 - 8 bit binary number giving act5 demand in 0-255 scale
byte7 - 8 bit binary number giving act6 demand in 0-255 scale
0x0D - single byte Carriage Return data terminator
So, I chose the USO option and transfering data from X-sim to Arduino for individual axis. What I am typing in "data packet axis information" is : AB~0~a01~a02~a03~a04~a05~a06~0x0D
(is it correct ? I am a bit skeptical about the reserved byte 1 where I put 0 )
My interface is not recognized by X-sim as a known one. But, X-sim does send the data bytes to my Arduino. The only problem is that for my platform to work, I need X-Sim to send 8-bit binary values (0-255) to my arduino in the format I stated above. The challenge here is to make the SPIDER Plugin output values for each axis which will correspond to actuator movement. And that value will be be converted to appropriate voltage by my Arduino, which will make the platform a stewart platform hopefully.
Is it possible ?