I want to control IONICUBE 1X with Arduino. But I don’t understand what IONICUBE’s inputs and outputs mean. I know how to use Arduino’s digital and PWM outputs. What I want to do is run the motor at full speed when the Arduino is triggered. Is there a link that explains this or who can tell?
Thank you. I am waiting your answers, I am novice in this matter :(.
You can see more on ionicube wiki, but typically the microcontroller/PLC DIR signal can connect to the Ionicube 1x X4 connector HSin1 and PWM to HSin2. Then it is a matter of selecting correct signalling in ionicube setup via Granity configuration and also loading a good supported FW, like what we used in direct drive wheels, on Ioni drive…
One more thing, you will also need 24V supply to Enable and STO2 pins on the X4 connector, either jumpered from 24V logic psu, or switched via enable and e-stop switches. Switches are preferred for safety reasons.
No video, but I can share the wiring schematic I made when I played with the older OSW DD wheels using ionicube 1x and 4x systems…we used STM32 micro then, but same principle applies for any other micro connected to it.
Message me your email and I will dig out old PDF and forward it…but also, Wiki will have good ideas and answers to your questions too. You can go to this URL, there are some links to wiring and pin-outs on that page: https://granitedevices.com/wiki/IONICUBE_1X
Hello again. My IONICube 1x order has arrived. I have a problem before proceeding to the Arduino stage yet. I have a Linmot brand DC motor. I applied the necessary parameters. I tried to run it in torque mode. But I encountered an error like this and the engine did not start. I did not connect STO. I connected 5V on the board to the Enable pin. I am not familiar with Granity software yet, my research continues from Wiki. What are your recommendations regarding this error? (tag: ioni 440205)
I think I’m at the end of my project. I was able to control it with Arduino PWM. It was a little weird but it works. I connected Arduino 5th PWM pin to HSIN2 and entered the following codes:
int HSIN_1 = 5; //Writes HSIN1. It actually depends on HSIN2.
void setup() {
// put your setup code here, to run once:
pinMode(HSIN_1, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
analogWrite(HSIN_1, 139);
delay(40);
analogWrite(HSIN_1, 255);
delay(40);
}
OK, I’m at a good point right now. But there is always a small problem.
This code: “analogWrite (HSIN_1, 139);” precisely sets the setpoint (1000) point. But when I give a 255 signal, the setpoint changes between 2543-2546. How can we set this to the exact setpoint value?
Analog signals always have noise in them, and it’s common that some values are in the middle of two ADC points causing this kind of issues. DAC and ADC non-linearities, noise and errors can also cause these.
If you need exact setpoint values, you need to use SimpleMotion field bus to control the IONI drives. This will be exact without any noise issues.