[grbl Issue#998] GRBL Windows simulation.

未分类 bolang 6个月前 (10-14) 41次浏览

Issue #998 | 状态: 已关闭 | 作者: usbcnc | 创建时间: 2016-05-23


This is my attempt to learn how grbl works and I compiled with Visual Studio 10 (quite a bit of porting since Visual Studio does not like some style in c). The exe file is only 40KB. My goal is to see if I can port to other platform like STM32F103C8T6 board which is sold for about $2 on Aliexpress. That module has USB and running at 72MHz. It also has 64KB flash. If it works it should provide better performance.

The simulation helps me to debug the code.

To execute the exe alone (console mode), type grbl and you issue command commands directly on console. This is warm up exercise and real fun starts with a true serial port parameter.
!grblexejpg

The eeprom.bin is created to simulated the eeprom setting.

If you execute command with com port (limited to 10) you can use Universal-G-Code-Sender-master to send. (eg. grbl COM7, make sure the comport is available or it will go back to console mode.

In the two computer setup, you can use one computer send gcode and another computer to run grbl.exe and use null-modem cable to connect them.
In the single computer setup (my case), I use a USB hub and TWO USB to serial module connected with null modem cable. Ideally this should work exactly like on Arduino target. I have tried the comport simulation free version and it has some issues.

If this is not the proper place to discuss this topic, please delete this issue.

grbl.zip


评论 (3)

#1 – chamnit 于 2016-05-23

@usbcnc : Thanks for sharing. If you didn’t know already, there is a grbl-simulator that will compile grbl’s source code to command line, much as like what you have done. Also, please note that Grbl’s GPL license requires you to share the source code.


#2 – usbcnc 于 2016-05-23

Source code attached. New to github. The STM32 part is not working yet. Use threads for timer0 and timer 1. Also use thread to handle serial port receive and send or console input.

grbl-masterwin.zip


#3 – ashelly 于 2016-05-23

It will be interesting to compare this to the existing sim.


原始Issue: https://github.com/grbl/grbl/issues/998

喜欢 (0)