Internet PLC Forum
General => Technical support => Topic started by: philipjoseph on January 27, 2003, 12:19:34 PM
-
Hi,
I have these funtions:
CusFn#1
IF DATE[2]>9 AND DATE[3]>9
H$= STR$(DATE[2])+"/"+STR$(DATE[3])
ENDIF
IF DATE[2]<10 AND DATE[3]>9
H$= "0"+STR$(DATE[2])+"/"+STR$(DATE[3])
ENDIF
IF DATE[2]>9 AND DATE[3]<10
H$= STR$(DATE[2])+"/0"+STR$(DATE[3])
ENDIF
dCusFn #2
PRINT #1 "<APPEND M3"+H$+".txt>"
PRINT #1 "RUNNING ";B$;" ";G$;" ";F$;" ";STR$(A,4)
PRINT #1 "</>"
But it doesn't open a new file with M3+date.txt
Where is the problem?
-
I ran a simulation of your functions and obtain the followin output from COMM1:
<APPEND M301/27.txt>
RUNNING 0000
</>
I doubt the Windows O/S can recognize the forward slash sign. You could change your program and simulate it using the simulator to see what is the output and find out why it may not work.
-
I simulate the program and also obtain the output at the COMM1
<APPEND M301/28.txt>
RUNNING W/CLASP NO PAPER 07:51 07:50 0000 000 00000 000
</>
However, when the program is not openning the file M301/28.
Also, I ran the on-line monitoring and check the value of h$ and is correct (01/28).
Philip
-
iI also checked the hard disk if the file was created in a different folder, but it is no created at all.
Philip
-
Remove the "/" from the file name and try again. "/" cannot be part of a file name.