Very good.
You have done a lot of work on the way to the desired result.
I hope that you will be satisfied with the possibilities that you have laid in the system.
I am interested in hearing from you impressions about the reproduction of the gear ratio.
Yes, in fact I am just trying to connect TUYA products with Unistream PLC ... somehow. As far as I know there are two possibilites
1) MQTT - when I was reading the tuya dev. manual it was very complicated
2) REST API seemed to be much easier, but I have discovered the issues about tokens etc. So I think I have to make 3rd party cloud where to get and put data and regularly take the tokens. Then, because in fact we are doing industrial water treatment plants and waste water treatment plants, the communication between our cloud is much easier using MODBUS (usually there are some values like levels, flowrates, pressures, which may be easily represented by either int16 or int32, or there are some bits like levelswitch), thus MODBUS TCP/IP is sufficient enough.
Time to time some Tuya products will be useable like room thermostat or remote plug 230 V and it would be great to control it both from their app and the PLC as well. Typical example is something like weather station (temperature, humidity, rainfall) which is relatively cheap from tuya and I can use the information for technology control (typically long - term rain affects the quality of well water, so I can adjust the dosage of chemicals)...
Because to access our PLCs remotely I am using a server with wireguard and teltonica RUT241 router, it will not be a problem to add some scripts to the server.
But you look experienced if you have a more clever solution, I would owe you a beer.
thx
jan
Well, as I said, I have most of the control written in Vision, the E-Gearing (ratio division/scaling) is done using the ever powerful (as Aus pointed out in another post) Linearsation function, which drives a PWM output, and the servo I selected has pulse/velocity mode, with programmable steps-per-revolution.
The question about a 16bit encoder was more curiosity, I don't need the encoder for control, just maybe speed display.
And as it turns out, said 16bit encoder is only motor/drive loop feedback, I don't see any option of an encoder output from the drive.
But I already have a separate encoder that I can attach to the leadscrew if I wish.
Currently, I have replaced the original BLDC spindle drive, it was erratic with no acc/dec control, and the set speed drifted wildly.
In its place I have put a 1/2hp 3-ph motor, driven by an AB powerflex drive, with an encoder on the spindle. And the speed of this VFD is controlled in my Vision program.
The leadscrew has a 2mm pitch, and I am mounting the servo with a mechanical 2:1 gear reduction (derived from the existing change gears). This accomplishes three things;
1) A 1:1 speed ratio between spindle and leadscrew gives me a 1mm pitch as my baseline, and I scale other pitch or TPI off this.
2) It doubles the torque applied to the leadscrew, allowing me to use a smaller servo motor.
3) it allows me to mount the servo unobtrusively behind a cover.
The servo has been ordered, and I'm patiently awaiting its arrival, the mechanics are all built and the bulk of the Vision programming has been completed..
All it lacks, is finishing up..
Hello,
I would like to download the program remotely to the Unistream U10-B10-TR22 PLC using the UniLogic software.
The remote PLC is behind a router that has a static public IP address.
I have configured port forwarding in the router for the ports offered by the UniLogic program: 22 and 3335.
I disabled the Discovery option in the menu, but it didn’t help, regardless of whether it is enabled or not.
Project -> Options -> Uncheck the "Use Ping on Discovery"
I am unable to connect, so my question is whether I am using the correct ports and what additional settings might be required?
Thanks in advance,
Levente