Help with Siemens Macro no data when reading in file.

Oct 14, 2016 0 Replies

I have a macro that has me stumped. On a Siemens 810D, I can write to a fi le but I cannot read the data back in. I don't get an error from the read c ommand. Error Boolean = 0 , I just get no data. VALSTR[1] = VALSTR[2] = blank (no data).



Here is a program snippet:


N7 DEF INT FILE_ERROR ; READ WRITE ERROR RETURN



N8 DEF STRING[255] VALSTR[2] ;NUMBER AS A STRING N10 DEF REAL SLNUM ; NUMBER



N12 DEF BOOL VALIS ;TEST RETURN OF ISNUMBER N14



N20 READ(FILE_ERROR, "/_N_SPF_DIR/_N_TESTFILE_SPF", 0, 1, VALSTR) N22 IF FILE_ERROR 0 N24 MSG(


Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required