Hy,
How Can I insert the current date at the end of the file name with expression in autosave tab?
What code?

(I read first comment + current date time)





Thanks

Post has attachment
Help Needed - Serial Communication Setup

I'm trying to set up the serial communication, and have run into a snag. The program seems to transmit fine, it's just not formatted correctly once downloaded (see pic - line numbers are a run-on). I have tried tweaking different settings in the setup page; no luck.

Here are my settings:
9600 Baud, 7 Data Bits, 1 Stop Bit, Even Parity, Hardware Flow Control, XON & XOFF Characters both set to 0, End of Block Characters: CRLF.

Any help would be greatly appreciated. Thanx, Jeff
Photo

I'm having trouble getting file server working with my Fadal. The program number is on the first line like:

N1O5555

However file server doesn't recognize this. Programs it receives are tagged with the date/time stamp. I can force it to save as a filename with a user expression. But the file server won't send a file unless it detects a name on it's own. For instance, if my caller is setup as O5555 and my caller file is:

N1O5555 (CALLER)
N2(MYFILE.NC)

It will save it as MYFILE.NC (with user expression) but doesn't use it as a caller to send MYFILE.NC. Part of the problem may be Fadal insists on starting each line with "N".

I have a new function which may be of interest for people with a turret punch. It generates the code needed to trim an oversize blank to size. It uses station T01 with a 50mm square to trim 3 sides of the blank after it has been loaded with an overhang. The code generated uses block delete so the trim can be turn on or off as needed. I have been testing it on a STRIPPIT 1250 H20 with Fanuc series O-P.
The code should be able to be altered to suit other turrets


//************************************************************************************************
// Trim blank to size ussing / Block Delete & Line At Angle Commands, T01 50mm square
//************************************************************************************************
void MdiChild::trimBlank()
{
bool ok;

// machine variables may change between diferent machines.
double xMax = 1225; // Maximum blank size in X with out doing a progresive move.
double xMin = 340; // Minimum Blank size in X that you can get clamps on using large clamp zone.
double yMax = 1225; // Maximum blank size in Y.
double yMin = 55; // Minimum Blank size in Y that you can get clamps on using large clamp zone.
double trimPunchSize = 50; // Size of square punch used to trim 50mm square
QString lineOfHoles = "G76"; // G code for line of holes at an angle.
QString toolNo = "T01"; // Tool station used to trim blank to size.



double blankX = 0; // The blank size in X direction.
double blankY = 0; // The blank size in Y direction.
double trim1Length = 0;
double trim2Length = 0;
double trim3Length = 0;
double trim1NoHits = 0;
double trim2NoHits = 0;
double trim3NoHits = 0;
double trim1Spacing = 0;
double trim2Spacing = 0;
double trim3Spacing = 0;


QString xText="";
QString yText="";
QString tempX="";
QString tempY="";
QString tempI="";
QString tempK="";
QString returnText="";

xText = QInputDialog::getText(this,
tr("Trim X"),
tr("Blank size in the X direction ?"),
QLineEdit::Normal,
tr("1200"),
&ok);

yText = QInputDialog::getText(this,
tr("Trim Y"),
tr("Blank size in the Y direction ?"),
QLineEdit::Normal,
tr("1200"),
&ok);

blankX = xText.toDouble();
blankY = yText.toDouble();

if ( xMin <= blankX && blankX <= xMax)

{

//returnText = "\n(X = " + xText+")";
//addTextAfter(returnText);
if ( yMin <= blankY && blankY <= yMax )
{
returnText = "\n( Trim " + xText +" X " + yText +" )";
addTextAfter(returnText);

//calulations for trim1
trim1Length = 1 + blankY + trimPunchSize;
trim1NoHits = ceil(trim1Length /trimPunchSize);
trim1Spacing = (trim1Length-trimPunchSize) / (trim1NoHits-1);

returnText = "\n( trim 1 " + QString::number(trim1Length) + "---" + QString::number(trim1NoHits) + "---" + QString::number(trim1Spacing) + ")";
addTextAfter(returnText);

//calulations for trim2
trim2Length = 1 + blankX + trimPunchSize;
trim2NoHits = ceil(trim2Length /trimPunchSize);
trim2Spacing = (trim2Length-trimPunchSize) / (trim2NoHits-1);

returnText = "\n( trim 2 " +QString::number(trim2Length) + "---" + QString::number(trim2NoHits) + "---" + QString::number(trim2Spacing) + ")";
addTextAfter(returnText);

//calulations for trim3
trim3Length = 1 + blankY + 1;
trim3NoHits = ceil(trim3Length /trimPunchSize);
trim3Spacing = (trim3Length-trimPunchSize) / (trim3NoHits-1);

returnText = "\n( trim 3 " +QString::number(trim3Length) + "---" + QString::number(trim3NoHits) + "---" + QString::number(trim3Spacing) + ")";
addTextAfter(returnText);
// start position for Trim
tempX = QString::number( blankX+(trimPunchSize/2) );
tempX = checkForPoint(tempX);
tempY = QString::number( (trimPunchSize/2)-1 );
tempY = checkForPoint(tempY);
returnText = "\n/X" +tempX+ "Y"+ tempY + toolNo;
addTextAfter(returnText);

// line of holes trim1
tempI = QString::number(trim1Spacing);
tempI = checkForPoint(tempI);
tempK = QString::number(trim1NoHits -1);
returnText = "\n/" + lineOfHoles + "I" + tempI + "J90.K" + tempK;
addTextAfter(returnText);

// start trim2
tempX = QString::number( blankX+1-(trimPunchSize/2) );
tempX = checkForPoint(tempX);
tempY = QString::number( blankY +(trimPunchSize/2));
tempY = checkForPoint(tempY);
returnText = "\n/X" +tempX+ "Y"+ tempY;
addTextAfter(returnText);

// line of holes trim2
tempI = QString::number(trim2Spacing);
tempI = checkForPoint(tempI);
tempK = QString::number(trim2NoHits -1);
returnText = "\n/" + lineOfHoles + "I" + tempI + "J180.K"+tempK;
addTextAfter(returnText);

// start trim3
tempX = QString::number( -(trimPunchSize/2) );
tempX = checkForPoint(tempX);
tempY = QString::number( blankY +1 -(trimPunchSize/2));
tempY = checkForPoint(tempY);
returnText = "\n/X" +tempX+ "Y"+ tempY;
addTextAfter(returnText);

// line of holes trim3
tempI = QString::number(trim3Spacing);
tempI = checkForPoint(tempI);
tempK = QString::number(trim3NoHits -1);
returnText = "\n/" + lineOfHoles + "I" + tempI + "J-90.K"+tempK;
addTextAfter(returnText);
}
else
{
returnText = "\n( blank is smaller than "+ QString::number(yMin) + " or bigger than "+ QString::number(yMax) + " in Y)";
addTextAfter(returnText);
}
}
else
{
returnText = "\n( blank is smaller than "+ QString::number(xMin) + " or bigger than "+ QString::number(xMax) + " in X)";
addTextAfter(returnText);
}
}


//************************************************************************************************
// Check Qstring for a decimal point and add one if it is missing
//************************************************************************************************
QString MdiChild::checkForPoint(QString checkString)
{
if (checkString.indexOf(".")< 0)
{
return checkString +".";
}
else return checkString;
}


//************************************************************************************************
// add text after curent line from cursor position
//************************************************************************************************
void MdiChild::addTextAfter(QString textToAdd)
{
QTextCursor cursor = textEdit->textCursor();
cursor.movePosition(QTextCursor::EndOfBlock,QTextCursor::MoveAnchor);
textEdit->setTextCursor(cursor);
textEdit->insertPlainText(textToAdd);
textEdit->setTextCursor(cursor);

}

I have been trying to update my working copy to r159 and have discovered that in the repository there is a file

EdytorNC.desktop

and a file

edytornc.desktop

On a Microsoft/windows system these are seen to be the same file so when I update my working copy they are seen to be the same file and one copies over
the other and I finish up with only one of them in my working copy

Can one of them be renamed?

Are they the same file and there has been a name change and the old name has not been removed from the repository?

Do I need both?

I have found the top two lines of my code are joined when sent to the machine.


O0000
(Part Number)

becomes
O0000(Part Number)

That is the programe number and the comment containing the part number become one line

When I put my comment in code (147-1-16) after the save command program save this as the date (6.11.2016).
Is there a way to turn off this auto correct?

anyone else get a Runtime Error every couple of days or so . Sometimes a couple times a day?

Microsoft Visual C++ Runtime Library
Runtime Error !
Program: "path to" edytornc.exe

This application has requested the runtime to terminate it in an unusual way.
Please contat the application's support team for more information.


seams to happen when the mouse is being moved.

restarting edytornc is then needed.

I have written a function, that insert code before a tool change, to move the clamps back out of the way so they don't get hit by the rotating turret.

It takes the NC code

N014X-25.Y625.
N015G76I46.23J-90.K13
N016X-5.Y604.
N017X1077.6Y604.
N018T23
N019X1066.74Y579.
N020G76I8.28J-45.K1
N021X5.86Y579.
N022G76I8.28J-135.K1

And changes it to

N014X-25.Y625.
N015G76I46.23J-90.K13
N016X-5.Y604.
N017X1077.6Y604.
G91
G70Y180.
T23
G70Y-180.
G90
N018T23
N019X1066.74Y579.
N020G76I8.28J-45.K1
N021X5.86Y579.
N022G76I8.28J-135.K1


Any help in optimising it would be welcomed


Here is the code for the function

//************************************************************************************************
// Insert code to move clamps clear of rotating turret.
//************************************************************************************************

void MdiChild::clearClamps()
{
QRegularExpression redigit("\\d");
QTextCursor cursor = textEdit->textCursor();
QString moveClamps = "";
QString selText = "";
QString index1 = "";
QString index2 = "";
int idx =0;

// Select the whole line from the current cursor position.
cursor.movePosition(QTextCursor::StartOfBlock,QTextCursor::MoveAnchor);
cursor.movePosition(QTextCursor::EndOfBlock,QTextCursor::KeepAnchor);
selText = cursor.selectedText();

// move cursor to start of current line.
cursor.movePosition(QTextCursor::StartOfBlock,QTextCursor::MoveAnchor);
textEdit->setTextCursor(cursor);

// Find a tool change
if (selText.indexOf("T")>= 0)
{
idx=selText.indexOf("T");
moveClamps = "G91\nG70Y180.\n";

// add tool station
moveClamps.append(selText[idx]);
index1 = selText[idx+1];
index2 = selText[idx+2];
if (index1.contains(redigit))
{
moveClamps.append(index1);
if (index2.contains(redigit))
{
moveClamps.append(index2);
}
}


moveClamps.append("\nG70Y-180.\nG90\n");
selText.clear();

// insert code
textEdit->insertPlainText(moveClamps);
textEdit->setTextCursor(cursor);
}

}

Hi.
I am trying out EdytorNC to edit cnc files for STRIPPIT turret preses.
I have so far been able  to compile from source on a windows 10 laptop.
ussing
 Qt Creator 4.1.0
 MinGW 4.9.2 32bit Compiler
 Qt 5.4.2 MinGW 32bit

I had problems getting EdytorNc to run from Qt Creator after I had created an nc file with it. It just keep on crashing on start up.
After tring to rebuild I discoved if I deleted my nc file I got it to run again. I have since found the problem was where I was saving the nc file too. I had tried saving the nc file to the example and also the template folders. By saving nc files out side the source and build folders I have got EdytorNc to run. Hope this helps others to get EdytorNc up and runing.
 
Wait while more posts are being loaded