Hello Guest it is March 28, 2024, 03:38:08 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - RegeG

Pages: 1
1
This is an ongoing development.......

I've been working on an Arduino-based Torch Height Controller for a while.  I currently have the hardware design stable and functional and mostly complete THC code.  While there is a Windows-based app to control the THC - I've recently been working on a Mach Plugin.

This is my first Mach Plugin.  I have initial functionality working.  The plug-in communicates with the THC over a user configurable COM port.  It allows setting the THC operating mode, setting the target cutting voltage and monitoring the operation.

The plugin spawns a new thread for handling the serial port communications.  It also gives the ability to set Mach's "THC Mode" to ON when starting.  (There is a configuration option to stop and restart the serial thread - that doesn't work yet.  If you change the serial port you have to stop and restart Mach.)

Software source code, hardware design information and a user guide is available on github under the "regeg/ArduinoTHC" project.
   https://github.com/regeg/ArdunioTHC

Video of the test cuts with steel on a steep incline can be seen at:
  http://www.youtube.com/watch?v=H2GjW5V7YFs

All of the history of the development and lots of voltage captures of cutting are on the Plasma forum at the Everlast Generators site.
  http://www.everlastgenerators.com/forums/forumdisplay.php/13-Everlast-Plasma-Cutters-(PAC)

I'd really like to get people building the THC and contributing to the project.

2
I can start a thread and output serial data constantly without problems.

As soon as I do a serialPort->ReadByte() or serialPort->Read(buf, 0, 1) - I get an error on start up of Mach.  It's "Art Code: 8877".

I've tried it both with blocking reads and with a timeout.

Anybody have any insights on "Art Code 8877"?

Thanks

3
I'm just starting my first plugin for Mach3.

I'm using the Plugin Wizard with Studio 2008.  I'm able to build and run a plugin, but when trying to start a thread - it doesn't seem to start.  (Currently the thread just tries to open a serial port and dump data.)

I have an object that contains the serial port access code and another that starts a new thread and calls the serial port access code.  I can create the object and call the method to just open the port and spew data and that works.  If I try to create a thread with that then calls the serial port access code nothing happens.

The worker method is:

   public ref class ThcInterface
   {
   public:
      static void DoWork() { SpewData() };
                static void SpewData() { <code> };

        };

I start it with:
       Thread^ comThread = gcnew Thread( gcnew ThreadStart(&ThcInterface::DoWork) );
and I don't get any data.

Calling "SpewData" directly will give serial data.

Is it possible to use .NET threading with the Plugin wizard?  I'm wondering if this is a mixed mode issue.  Any guidance threading with Mach3?


Thanks.


Pages: 1