View Full Version : Bad Characters


gplush
02-04-2008, 08:33 PM
Has anyone ever saw this pop into their code "]=" when the code says "]". Even when I change it at the control and output it to the USB (then reload it), it still insists on converting the normal bracket to the bracket with an = sign. It won't search & replace the "]=" either. It is driving me nuts....Maybe, I'm finally losing my mind!!! It won't run with the = sign in there, and when I change it at the control, it is fine, but, when I pull the program back the USB and make an edit, then reload, it comes right back...

GP

HuFlungDung
02-04-2008, 09:15 PM
Maybe give us a hint by showing us the full line of code, as intended and as displayed before editing.

I would examine the file as it is on the USB drive, using a hex editor program on my PC. Search for that bad string to see if it actually exists on the USB.

If it is okay before transfer, then perhaps you've got a bad bit of memory on the Haas. As a test, leave the faulty file in place on the Haas, and reload the program under a different name, which should force it into a different section of memory, hopefully an area with no faults.

gplush
02-04-2008, 09:38 PM
I tried renaming it..I didn't look at it with a hex editor. I can do that tomorrow. The code looks like this on the USB:

#100 = [1 + #5700]

on the control, it looks like this:

#100 = [1 + #5700]=

I have never seen anything like it. I bet there is something there, that I'm not seeing...I like the hex idea..

tks,

gp

gplush
02-08-2008, 07:45 PM
I figured this out as well. I could see the charactar export in LookRS as ]=. I could find and replace, and also see it in hex. When I put it back in the machine via USB, it came right back. I started using 232 and all is well. There had to be something in that line it was reading. Not sure why the there was a difference between USB & 232. Now that the file has been loaded into the machine & exported out. I can load it without the bad character??? Scratchin my head with that???

gar
02-08-2008, 09:01 PM
080208-2130 EST USA

gplush:

I have no idea what you just said.

Your reference to USB apparently is to the USB port on HAAS.

I will try to start from the beginning.

1. At a computer you created a program and in this program there was at least one "]", maybe more that is not clear. You know that this original program on the computer does not contain "]=" for this expected single "]".

2. Somehow you use the USB port on HAAS to load this program into HAAS memory. When you view the program on HAAS you see "]=" where there was just "]" in the file at the computer.

Does "]" occur more than once in the program on the computer? If in more than one place, then are all occurrences of "]" in the source program at the computer converted to "]=" when viewed in HAAS memory?

Do you load a memory stick at the computer and then read that stick at HAAS into HAAS memory? or do you use a USB cable to connect the computer to HAAS?

If you use a memory stick, then have you loaded the program to the memory stick, removed the stick from the computer, plugged the stick back into the computer in a different USB port on the computer, viewed the program on the stick with something like WordPad, and observed the error or no error?

If the program is good as viewed in this manner, then when you load from this stick to HAAS does the "]" change to "]=" in all occurrences of "]" from the original source file.

If so, then HAAS has a USB bug.

If it is a cable connection, then try the memory stick test.

.

gplush
02-08-2008, 11:00 PM
I have no idea what you just said.

Your reference to USB apparently is to the USB port on HAAS.

I will try to start from the beginning.

1. At a computer you created a program and in this program there was at least one "]", maybe more that is not clear There were 64 of them. You know that this original program on the computer does not contain "]=" for this expected single "]".That is true..the original program didn't have them, and when I output to USB & use notepad or Cimco, they are there.

2. Somehow you use the USB port on HAAS to load this program into HAAS memory. Somehow - I/O, receive disk, type number When you view the program on HAAS you see "]=" where there was just "]" in the file at the computer. This is exactly correct, and the Haas errors out at the "]=", if I fix it at the control it will run. The minute I send it to the USB, it is back.

Does "]" occur more than once in the program on the computer?264 occurances If in more than one place, then are all occurrences of "]" in the source program at the computer converted to "]=" when viewed in HAAS memory?No, but it is "essentially" the same line of code. Always DPRT with a variable value

Do you load a memory stick at the computer and then read that stick at HAAS into HAAS memory? or do you use a USB cable to connect the computer to HAAS? Stick at the machine

If you use a memory stick, then have you loaded the program to the memory stick, removed the stick from the computer, plugged the stick back into the computer in a different USB port on the computer, viewed the program on the stick with something like WordPad, and observed the error or no error? NO error on three diffferent PC's

If the program is good as viewed in this manner, then when you load from this stick to HAAS does the "]" change to "]=" in all occurrences of "]" from the original source file.See above..Only a certain type of code, never in a variable calculation, only where I shoot out a DPRT[variable value]

If so, then HAAS has a USB bug. That is my conclusion, and I can duplicate it on four machines, with ages varying from 3 years to 2 weeks.

If it is a cable connection, then try the memory stick test.


Here is a sample....I wonder what would happen if you loaded it...If I delete the "=", and reload the program, it comes back, everytime. Now, I am using 232, and life is good.


(ASSIGN SYSTEM VARIABLE VALUE VAR100)
#100= #[ 5701 ]=
(ASSIGN INITIAL START VALUE FOR INCREMENT)
#101= 5701



DPRNT[**TOOL*LIFE*VARIABLE*]
DPRNT[#101[44]]