I've run into some difficulty attempting to change values in the EEPROM string data area. The target PLCs are the Nano-10 and FMD series.
The goal was to write a null string, "", into the EEPROM string data area without having to write, download and execute a .PC6 program.
The first failed attempt was to use Host-link commands in the form of "@01W$000200*<cr>" This failed with the error message, "@01ER56*<cr>" being returned from the PLC. It seems that this host-link command is not capable of dealing with a "" message.
I tried all sorts of games to send a send a single character string where the value of the this character was a &H00. Host-link commands are not happy with unprintable ASCII.
The second attempt was to use the "PLC Data EEPROM Manager" that was part of i-TRiLOGI V6.45. This program can correctly recognize a null string stored in the EEPROM string data area but is not capable of writing a null string.
As an example if the EEPROM string memory contains a null string for $2, the EEP Buffer window will show the following:
$1,FMD r79A
$2,
$3,hello
[/color]
If the "Save Buffer to File" button is pressed the .csv file that is created looks like this:
$1,FMD r79A<LF>
$2,<LF>
$3,hello<LF>
<CR><LF>
[/color]
Now I will change the value of the EEPROM $2 is via a PLC program with the following code:
save_EEP$ "Test String", 2
[/color]
The EEP Buffer window will show:
$1,FMD r79A
$2,Test String
$3,hello
[/color]
If the .csv file that was created when $2 was a null string, "", is loaded back into the String Buffer Window and then the YELLOW button labeled, "Write EEP Buffers to PLC", then $2 is not changed to a null sting, "". OOPS!
OK now the condensed version of my complaint:
1. The PLC Data EEPROM Manager is capable of reading a null string, "", from EEPROM but is not capable of writing a null string back into EEPROM. This is very non-symmetrical behavior and is surely a programming error that could be fixed.
2. The Host-link command to write strings to EEPROM is incapable of dealing with a null string. This command has problems with many strings that are legal in TBASIC. This command can only write strings that are one or more characters in length and do not contain any unprintable ASCII characters. I don't think that you can fix this as this would require firmware changes.
3. I suspect that problem #2 is the root cause of why the EEPROM Manager can't write a null string. I believe that the EEPROM Manager can be fixed by having it use the "Write EEPROM Integer Data" host link command to force a value of &H00 at the starting location in EEPROM for the specified string.
4. I have a minor gripe with the the .csv format written by the EEPROM Manager. Microsoft EXCEL will read this file successfully, so my soap box is pretty small. The gripe, is that the file is created with inconsistent end of line characters. Most of the lines are terminated with a line-feed character (UNIX format) but at least two of the lines in the file use the 2 character sequence of carriage return then line-feed (DOS format). I sure that this is just messy Java programming.
Best Regards,
Gary D.