Your company's Logo

    Home Contact us Download Site map About us

i-Logic Products
Utilities
DNC Interface

DNC Server OLE Interface

With a little programming it's possible to write your own programs that will command and control DNC Server.


Example program made in Visual Basic 6.0 dnctest.exe


Dim DNCServer As DNCServerx

Private Sub Command1_Click()
 'Load File button
 CommonDialog1.ShowOpen
 DNCServer.LoadFile   (CommonDialog1.FileName)
End Sub

Private Sub Command2_Click()
 'clear button
 DNCServer.Clear
End Sub

Private Sub Command3_Click()
 'send button
 DNCServer.Send
End Sub

Private Sub Command4_Click()
 'receive button
 DNCServer.Receive
End Sub

Private Sub Command5_Click()
 'renumber button
 DNCServer.Renumber
End Sub

Private Sub Form_Load()
 'connect to DNC Server
 Set DNCServer = CreateObject("dncserver.dncserverx")
End Sub


Download this Visual Basic example.

Need to have DNC Server properly installed on your computer for this to work.

Run the dnctest.exe example. DNC Server will startup if it's not already running.

Press the 'Load File' button and the select a text file from the dialog box. Then you will see that file loaded into DNC Server.

In the same way, the other buttons are connected to other functions in DNC Server.

When loading the example source code Into Visual Basic 6.0 you need to go to the main menu 'Project' - "References". In the dialog box find and check "DNCServer Library"


dnctest.zip

Same thing for Delphi: delphiDNCtest.zip


Properties:

  • Filename: Name of file in the edit window.
  • Status: not implemented
  • Line(index) array of strings in the edit window
  • BlockIncrement; for renumber
  • StartBlock; for renumber

These properties are like in the configuration windows:

  • CharDelay
  • DefaultFileExt
  • SendCharAfter
  • SendCharBefore
  • BaudRate: integer 300; 600; 1200; 2400; 4800; 9600; 19200;
  • EndOfLine: integer 0=CRLF; 1=LFCRCR; 2=LF; 3=CR
  • Format: integer ASCII=1; EIA=2; ISO=3;
  • Handshake: integer 0=XON/XOFF; 1=NONE; 3=DTR; 4=CTS;
  • Parity: string 'O'; 'E'; 'N'
  • DataBits: integer 7; 8;
  • CommPort: integer 1-255
  • StopBits: integer 1;2
  • SkipComments: Boolean
  • DefaultReadDirectory
  • DefaultSaveDirectory
  • GetFileString      
  • SaveFileString   
  • ResetString
  • AutoSaveString

Methods:

  • LoadFile(FileName)
  • SaveFile(Filename); saves edit window to filename
  • Abort: Like pressing the Stop button
  • Clear: Like pressing the Clear button
  • Close: Like pressing the Close button
  • Receive: Like pressing the Receive button
  • Renumber
  • Save: Like pressing the Save button
  • Send: Like pressing the Send button
  • GetNumberofLines: Returns number of lines in the editor
  • SendLine(String): Outputs a line of text to the serial port
  • Note(string); writes in the main status line


Back
 

 

Inplot Tips

You can set the size of the edit window when Inplot starts in Configuration-Editor-Start Edit Window Size.

If the Rotary table moves around the wrong way, you show the opposite with Configuration- Axis- Reverse Rotation settings.

If you have trouble with Inplot finding some Syntax errors during plotting because of a non-standard format, it will help to turn off Configuration- Plotting- Check Syntax.

You can have Inplot ignore any line that starts with a certain character. This can help ignore things like filenames at the beginning of the program.

With Syntax Checking on, Inplot will report an error on lines that have multiple same addresses. Use Configuration- Syntax- Allow these to tell Inplot that these certain multiple addresses are OK.

Inplot can show you when you forgot to turn the spindle or coolant on by plotting in a different color. Turn this on in Configuration-Syntax-Warn.

Inplot can show you accidentally got a feedrate too fast by plotting in a different color when the feedrate is over a certain amount. Set in Configuration- Feedrates.

Inplot can calculate the running time of a program and display it in the program. And you can add more time for manual activities with a Comment Code.

You can make a new configuration file by just copying the machine INI file to a new name and loading it with the Formats dialog box.

 

 

      
      
 

Copyright ©2008 i-Logic Software. email: support@i-logic.com