08-09-2022 09:56 PM
08-10-2022 06:47 AM
That is very nice! i will try in controller a h bridge here and post my feedback
08-11-2022 03:05 AM - edited 08-11-2022 03:06 AM
I haven't looked at your implementation yet but the software PWM is normally part of the Linux kernel GPIO driver. As such it is pretty fast since it can directly operate on the hardware without a lot of intermediate layers in between. It won't be able to reach extreme high PWM frequencies but to control a motor or similar through PWM it is usually more than enough.
The difficulty with the Linux GPIO driver is that it was changed several times in how it can be controlled from the user space. The previous version tried to allow controlling everything through read and write operations which makes it easy to control it from any process that has file access but it is kind of slow and clutters the device name space with many extra subfilenames for each device to control the specific different features. The newer version now requires use of IOCtrl calls to control those aspects and that limits the usability for environments that can issue IOCtrl calls. (no shell scripts for instance)
The old control through individual filenames allowed to actually control it directly through LabVIEW file IO nodes. The newer interface requires explicit calls to ioctl() through a Call Library Node to be able to control any attributes of the channel (IO pin). The Linx layer of course hides a lot of that but doesn't implement the necessary interface on other hardware than the Wiring based (Arduino) devices for anything but simple digital IO.