Author Topic: APPEND  (Read 12345 times)

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
APPEND
« 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?
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: APPEND
« Reply #1 on: January 27, 2003, 01:50:27 PM »
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.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Re: APPEND
« Reply #2 on: January 28, 2003, 01:59:41 AM »
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
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

philipjoseph

  • Jr. Member
  • Posts: 57
    • View Profile
Re: APPEND
« Reply #3 on: January 28, 2003, 02:47:10 AM »
iI also checked the hard disk if the file was created in a different folder, but it is no created at all.
Philip
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Philip.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: APPEND
« Reply #4 on: January 28, 2003, 06:25:39 AM »
Remove the "/" from the file name and try again. "/" cannot be part of a file name.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS