Hello Guest it is May 16, 2021, 02:31:28 AM

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.

Messages - sams_n

Pages: 1 2 »
Mach SDK plugin questions and answers. / Plugin for 5ax kinematics
« on: April 17, 2012, 09:13:20 AM »

I 'm trying to make a 5ax kinematic plugin for mach3.
The machine modell is a swing-rotary table.
So i have to correct the X,Y and Z axis even the table (A and C axis) moves.
The math functions are not my problem , but how can I put the calculated offsets to the
actual axis values.
I tested the MainPlanner->Corrections , MainPlanner->Diffx and many other Parameters but have not really success.
Can anyone help me ,or tell me,  what parameters i should use?

Regards Gerhard

Mach SDK plugin questions and answers. / Re: Communicate RS232 port
« on: December 13, 2010, 10:52:16 AM »

i found the bug.
Now it's all o.k.
I had turned on the serial modbus in mach3 ,
so the serialport was opened when starting up mach3
and blocked for further use by my plugin.
A really silly mistake from me.

Best regards , Gerhard

Mach SDK plugin questions and answers. / Communicate RS232 port
« on: November 24, 2010, 03:14:48 AM »
Hi guys!

At first , sorry for my bad english , but i give my best ;)
I am a absolute beginner in C++, I saw the video tuturials and want to try it.
Simple things as SetDRO(Y_DRO,input_wert);  or DoButton(FEEDRATE_RESET);
are running without problems.

Now I am trying to write a plugin to use the serialport. for I/O's.
In the MachIncludes Folder I found the Headerfile serialport.h.
It comes from PJ Naugther. On the web I found the freeware MFC class for Win32 serial ports from him.
I added the serialport.cpp and the serialport.h to my projekt and tryed the following small
code for opening and close the port.

CSerialPort port;
port.Open(3, 19200, CSerialPort::NoParity, 8,

Port3 is o.k. , I tested it with an other programm before, the compiler runs without errors.
But when i run it in mach3 the computer hangs.
My questions:
Is it a good way to use the serialport.cpp and serialport.h ?
What can I do to get it to run ?
Are there other (better) methodes to communicate with the RS232 port ?

Best regards, Gerhard

Modbus / Re: mach3V3.00 modbus Problems
« on: March 17, 2008, 03:54:52 AM »

I installed the old version V2.1
There all the things o.k.
I will not install a newer version in next time .


Brains Development / Re: SetDro(0 ,GetDro(0)/2) in BrainControl
« on: January 30, 2008, 11:22:46 AM »
Hi scott,

thanks for your answer.
But I cant use a scale funktion, that is not that what I need.

What I need is : 

If A=1 then
end if

I am missing many functions in braincontrol and I hope that there comes more functions in the next time with the next versions of mach3.
An other missing function ist the output of DRO values with modbus.
Presently we need many Brains to do that.
There is the sendstring command to send text but not to send DRO values , its a pity.

Best regards , Gerhard



Brains Development / Re: SetDro(0 ,GetDro(0)/2) in BrainControl
« on: January 28, 2008, 01:12:38 AM »
Hi Scott,

thank you for the quick answer.
But I think , what you wrote is not that what i want to do.
What i need is: to change a DRO value when I press a button, but i cant find a function in BrainControl

Best regards Gerhard

Brains Development / SetDro(0 ,GetDro(0)/2) in BrainControl
« on: January 27, 2008, 12:28:54 PM »

I want to run this simpe Code in BrainControl.

Dim taste as Integer
Taste = GetInput (70)
 Select Case Taste
Case = 1    
 SetDro(0 ,GetDro(0)/2)   
Case = 2    
 SetDro(1 ,GetDro(1)/2)   
Case = 3    
 SetDro(2 ,GetDro(2)/2)   
End Select

Have anybody an idea how I can do this in a BrainControl.
I only want to divide a Dro Value when some Input Signal comes in.

Best regards ,

Brains Development / Re: Howto send DRO Axis information?
« on: January 09, 2008, 10:42:29 AM »
Hi Scott,

in your BrainControl example , mach3 sends 2 Bytes over the modbus using the modbus function 06.
This is very good to see in the examples of abacus.
In older mach3 versions , when we havn't BrainControl , I made the output with a macro in my macropump.

 '*******X-Dro Value to modbus
 Display = ""
SVal = Right(" " & Format(GetDro(0), strFmt),9)
Display = "X" & SVal
SetModIOString (1,0,0, Display)

That sends many Bytes (1Byte for 1character) to the modbus , using the modbus function 16.
When I use in BrainControl the sendstring terminator also can send text to the modbus , but I can't
find a way to send a value of a dro using the sendstring terminator.

Thanks, Gerhard

Brains Development / Re: Howto send DRO Axis information?
« on: January 08, 2008, 05:31:52 PM »
Hi Scot ,

i just made a test
in a 16 bit value i can send 2 caracters (ascii) but not , such as  "+123,456".
I alsofound the sendstring terminator , but there I only can send text but not a value of a dro.

Best regards
from Austria

Modbus / mach3V3.00 modbus Problems
« on: January 07, 2008, 03:55:38 AM »
Hi everybody,

I have some questions to you about modbus in mach3.
In the last weeks I built my own modbus pendant.


It works very well at mach3 V2.01.
In mach3 V3.00 I have many problems.
In the Yahoo board I found out that the timer of
Tickctr was changed to a 200┬Ás 16bit wrap-around timer.
That all I programmed also on my pendant.
But now to the Problems:
When I uncheck the "modbus plugin supported" I get a big step
at the velocity by a rollover.
Here is a short video , there you can see the big step.

In a email , Art wrote to me that i should enable the
"modbus plugin supported" checkbox.
When I do this , the rollover step is ok but then my
macropump is not working.

2 examples:

Dim fro as Integer
    fro = GetInput (64)        'Analog_1 read
   fro = fro /4.13 -3
   SetOEMDRO 821, fro

Of course this I can do with Brain contol
but for the next example I can't find a solution in BrainControl .

'X-Dro Value to modbus
Display = ""
   SVal = Right("       " & Format(GetDro(0), strFmt),9)
   Display = "X" & SVal
SetModIOString (1,0,0, Display)   

I found the "sendstring" Commando in BrainControl . Using this Commando I can send a
text but not a value of a DRO to modbus.

Have somebody a answer to my questions ?
Sorry for my english , it's very bad

Best regards from austria

Pages: 1 2 »