Posted 8 Apr 2020 Hi Can anyone please help with the following issue. Equipment PLC - CJ2M-CPU33 Setup is being used to log distance measurements from a conveyor belt to a compact flash card in the PLC I have successfully set this up and it is working by writing values to a stack then when this is full, changes stack and writes the data in the previous stack to the card. The FWRIT command has the control word #3D00 (Comma-Delimited, Return every 16 fields, Append, Memory Card) The problem I am having is with the data in the CSV file, I am logging typically 300K lines with 16 values. Towards the end of logging the data in the CSV file will start to return every 5 values instead of 16 which is just painful to re-format. I have attached an image of the Excel data to explain better. My Two stacks are Stack 1 - E0_0 - E0_16003 Stack 2 - E0_16010 - E0_32013 Thanks for any help. Share this post Link to post Share on other sites
Posted 20 Apr 2020 (edited) Hi guys anyone any ideas for me? Thanks Edited 20 Apr 2020 by NootNoot Share this post Link to post Share on other sites
Posted 20 Apr 2020 It's difficult for any of us to determine what is wrong. Can you post the program? Is your Control WORD a hard value of #3D00? Or is it variable? (Dxxxx) Is the data available? Or are they really 0's? Is the FWRIT preceded by NOT A343.13? For troubleshooting, try monitoring the Auxiliary Area Flags from the Instruction Help section. Try inputting static data in the Source so you'll know what to expect. (1, 2, 3, etc...) Share this post Link to post Share on other sites
Posted 29 Apr 2020 Hi mate, Yes the control word is a fixed value. The data is available in the CSV file it just changes the data layout from a return every 16 words to every 5 words, but only on the last stack that is written. Yes the FWRIT is preceded by NOT A343.13 I have attached a copy of the program if you have a chance to have a look, hopefully its something obvious which I am not seeing. Thanks for your help 2020-04-26 - Deflection Rig Mobile.cxp 2020-04-26 - Deflection Rig Mobile.opt Share this post Link to post Share on other sites
Posted 29 Apr 2020 I am guessing that it has something to do with the logic in Rungs 0 and 1 of the Stop section (I am only showing rung 0 below). You have this code there: The 3C makes it write 5 records (as I am sure that you know). You are using the same address for the file name. Are you inadvertently using this FWRIT at the point when it switches to a return every 5 fields. Share this post Link to post Share on other sites