Hello - I am new to this CNC communications, so bear with me if I sound not all that bright lol.
I have an old Billco CNC1000 XY glass cutting table (mfg 1989). It is being driven by an even older peice of software made by PMC software (1987). It was retrofitted a few years back (2002) with Fagor 8025 controller. The original programming was not updated. It is still running on a DOS platform. It communicates via RS-232 serial port to the cutting table. I have newer software that I am attempting to make run with this table as is. The problem is in making a driver to allow our newer software to talk to the cutting table. Have found manuals to help with generation of Gcode, and used a serial port analyzer to detail exactly how the transmission is sent to the controller. Can reproduce everything except one byte per line. I am told this is a CRC byte.
How does one go about creating the CRC byte for the purposes of transmission? My understanding is that if this byte is not ocrrect, than all lines will be rejected. RS-232 parameters are; Baud 4800, 8 bits, No parity, and 1 stop bit. The transmission that I have trapped looks like this:
Request: 1/26/2009 12:48:35 PM.97764 (+1.9728 seconds)
01 53 4E 53 02 25 36 35 33 30 31 17 4F --------------> .SNS.%65301.O
Answer: 1/26/2009 12:48:35 PM.13764 (+0.1402 seconds)
10 31 -----------------------------------------------> .1
Request: 1/26/2009 12:48:35 PM.13764 (+0.0000 seconds)
02 0A 4E 30 28 33 2E 30 30 43 4C 2B 2B 33 2E 30 -----> ..N0(3.00CL++3.0
30 43 4C 29 0A 17 68 --------------------------------> 0CL)..h
Answer: 1/26/2009 12:48:35 PM.23764 (+0.0501 seconds)
10 30 -----------------------------------------------> .0
Request: 1/26/2009 12:48:35 PM.23764 (+0.0000 seconds)
02 4E 31 50 31 3D 4B 30 0A 17 45 --------------------> .N1P1=K0..E
Answer: 1/26/2009 12:48:36 PM.30764 (+0.0501 seconds)
10 31 -----------------------------------------------> .1
Request: 1/26/2009 12:48:36 PM.30764 (+0.0000 seconds)
02 4E 32 47 32 35 4E 39 39 34 39 0A 17 62 -----------> .N2G25N9949..b
Answer: 1/26/2009 12:48:36 PM.38764 (+0.0501 seconds)
10 30 -----------------------------------------------> .0
Request: 1/26/2009 12:48:36 PM.44764 (+0.0601 seconds)
02 4E 31 30 30 28 4C 41 59 20 31 20 43 55 54 20 -----> .N100(LAY 1 CUT
31 20 20 20 31 20 4F 46 20 20 37 32 78 31 32 30 -----> 1 1 OF 72x120
20 33 2E 30 30 43 4C 2B 2B 33 2E 29 0A 17 0C --------> 3.00CL++3.)...
Answer: 1/26/2009 12:48:36 PM.59864 (+0.0501 seconds)
10 31 -----------------------------------------------> .1
The second last character in each request line is the ETB code (x17), and it is followed by this one extra byte of data, which my programmer tells me is a CRC code (I am also a programmer, just not familiar with CNC, PLC, or serial communications). How do I go about determining the correct CRC value to include in our new software's transmission?
I have spent hours looking for on-line documentation that may point me in the right direction to no avail, and cannot get my hands on a DNC 25/30 Protocol Manual, which I think would have the answer for me (discontinued from FAGOR).
In addition, I would like to know about the answer line shown in the above sample, is shows the DLE code (x10) followed by a rotating 1 or 0. I am assuming that this is a simple confirmation of the previously sent request, and the 0 and 1 are just alternated states... indicating transmission OK. Am I correct on this?
Hopefully I can complete this software change over with the answers to these questions.... Any help is greatly appreciated.