lostcontrol Posted March 10, 2011 Report Posted March 10, 2011 Hi, Does anyone use the WRITE CF function of the NS? I have been looking at an application that may require it (if the format can be converted... ), but when trying to use the example above from the manual, it does not even compile, says something about the filename not being correct.. :shrug: Secondly, is there anyway of reading the binary data from the card, and making it legible? Or are we better to look at something else?
lostcontrol Posted March 10, 2011 Author Report Posted March 10, 2011 (edited) yep, have tried that as well, the same error is presented. Bit of an odd one huh...? Edited March 10, 2011 by lostcontrol
PdL Posted March 10, 2011 Report Posted March 10, 2011 Yeah, seems pretty straight forward.... looks like waiting for the one that has successfully used this command... if there is such a person
lostcontrol Posted March 10, 2011 Author Report Posted March 10, 2011 Still is a bit of an anomaly that the manual example does not work... I am not sure how new this function is, whether it is a recent addition..?
james_applied Posted March 29, 2011 Report Posted March 29, 2011 Works very well. 'READ DATA FROM FLASH CARD. $W39=READCF($W40,10000,$W0,0); 'WRITE DATA TO CF CARD $W39=WRITECF($W40,10000, $W0,0); W0=Filename, W40 first word write W39 gives status feedback. 0 is good. FFFF is not. Yes thats 10,000 words
lostcontrol Posted March 31, 2011 Author Report Posted March 31, 2011 Hmm, ok that is interesting. I am not sure why it did not compile for me earlier... Either way, it now works, so I can continue testing of this function.
lostcontrol Posted April 1, 2011 Author Report Posted April 1, 2011 Ok, so I tried testing this today, & got a macro error
PdL Posted April 1, 2011 Report Posted April 1, 2011 Could this have to do with the system version or CXD version you are running? Perhaps james_applied can post which versions he is running. Still strange though.
lostcontrol Posted April 1, 2011 Author Report Posted April 1, 2011 Is possible I guess, this application us using System Versoin 8.23, which I assume is the latest...?
PdL Posted April 1, 2011 Report Posted April 1, 2011 Actually 8.41 is the latest.. check out myomron.com downloads section.
lostcontrol Posted April 4, 2011 Author Report Posted April 4, 2011 ok, I installed v8.41 today and tried the CF write, but still get the same error. The command is almost identical to the one in the manual, so not quite the same as JamesApplied. I will use his exact example next time to see if that makes a difference. Perhaps James could post what versions he is using...? On a plus, the ladder monitorn seems to work now, it did not with the earlier system version.
lostcontrol Posted April 5, 2011 Author Report Posted April 5, 2011 Update. The CFWrite now works!! I am thinking it is something to do with the FileName being in the instruction context, as opposed to being in a $W location... This is what worked for me.. Anyway, can continue with further testing....
Ctor Posted June 30, 2019 Report Posted June 30, 2019 (edited) Hi people from 2011, I am a PLC programmer from 2019... Did you find how to read a file using variables $W for the file name instead of constant string? According the manual should be possible, but I am getting -1 as returning value... Thanks a lot! Edited June 30, 2019 by Ctor
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now