Page 2 of 2

Re: the microseconds

Posted: Wed Sep 16, 2020 10:45 pm
by mwieder
Ah. Did you not expect a fractional part? That's the whole point of the "long" variation.

Re: the microseconds

Posted: Thu Sep 17, 2020 8:19 am
by mrcoollion
mwieder wrote: Wed Sep 16, 2020 10:45 pm Ah. Did you not expect a fractional part? That's the whole point of the "long" variation.
Wel AxWald mentioned
9.6/ 64bit: They show no fractional part at all
in Windows 10. That why I wanted to test it myself.

Re: the microseconds

Posted: Thu Sep 17, 2020 4:08 pm
by mwieder
Ha! :idea: I get it now. So there is indeed cross-platform parity for "the long milliseconds". Thanks.

Re: the microseconds

Posted: Mon Oct 19, 2020 12:05 am
by Bernard
I'm not sure that "the long milliseconds" returns anything of any value. For example, whenever it shows a fractional part to me, the fraction always has this value: ".000244" .

Re: the microseconds

Posted: Mon Oct 19, 2020 12:14 am
by mwieder
What OS? I'm guessing Windows, where I would pretty much guarantee it not to work, given the system calls that are being made.

Re: the microseconds

Posted: Thu Oct 22, 2020 12:46 am
by Bernard
Yep. Windows 10.

Re: the microseconds

Posted: Mon Jan 04, 2021 12:26 am
by Monox18
dunbarx wrote: Tue Sep 15, 2020 10:26 pm I have a friend who would love to use LC to control a homeMade CNC milling machine. He uses assembly language now, because he cannot get LC accurately to know what time it is. The milliseconds don't cut it.
Craig
You can use LC to control a CNC for sure, but LC wouldn't be doing the dirty low level stuff.

I once made a mobile app with LC to control 2 robotic arms from different brands. Like a remote controller, I could move them in XYZ or Joint coordenates. Both arms had different ways of being controlled. To one of them I had to send Ethernet commands, while to the other I had to send COM commands. LC isn't directly controlling the servos, doing PWM, managing voltages and so on. Both robotic arms have a dedicated hardware. That hardware takes care of servo manipulation and PID control. From LC I can even change PID values, modify speeds and basicallly modify any setting I want. But in the end, the dedicated hardware is the one who is going to controls the motors, not LC.

LCMark explained some of the reasons of why a "multi-user, pre-emptive multi-thread/process systems" is not suitable for the job, in this case very time-precise motor controlling, and instead you need a single thread system such as a microcontroller, (or FPGA for more complex projects).

In the case of your friend's home made CNC, since it is homemade I guess he is using some sort of microcontroller, like an Arduino. Micros are very cheap and suited for the task. He could write the low level stuff, burn it to the microcontroller. Then from LC build the GUI and call some scripts/commands via communications protocols. One example: he could save the G-Code commands for mechanizing the piece in the CNC into the hardware, and then from LC calling/stopping scheduling them, measuring progress, etc.