Jump to content

Recommended Posts

Hi everyone,
We want to report the data records that we keep daily via e-mail at the end of the day. We have implemented the shipment with the help of examples but we have problems sending the data records in the form of an excel report.
Columns and rows are interfering.

Thanks for yours support ...



Edited by berkaykaya
Added visual.
Link to post
Share on other sites

The program has many things that I would do differently, particularly layout of elements.  In rung 6 you've got 2 resets of MB28. So perhaps there is a similar overlooked hiccouph elsewhere that is upsetting what you want to achieve.

However, to your specific issue (and I can't see that this observation will make a difference but it's worth a try),  in rung 41 SD Utility you are referencing MI62 twice...looking at other parts of the program perhaps one of these should be MI6?  Perhaps the double reference is confusing things?

Regardless, what happens if you change your delimiters to  <<   ,   >> (2C) ?  I think this is partly what Gabriel is getting at. 

cheers, Aus

Link to post
Share on other sites

Thank you very much for your time.

I fixed my mistakes and I'll try again.
I'il write the results.

If you change the delimiter to <<, it continues to write to the same column in excel as it should pass to the column.
Sometimes it should pass to the bottom line, but not going the bottom line.

It is very sad that there is no clear explanation for this.
I can say that I have tried every way in the figures mentioned in the documents.

Sorry for my language.

Respect for you,Berkay

Link to post
Share on other sites

I see no problem with csv files other than spaces added. You are using MI62 twice in fields to add file. Why?.

For debuging purposes,  I suggest manually enable rung 41, instead of SB13. Keep in mind that, SD operations may take a while and trying to add a new record every second may not be possible. You may try also numeric field for all those numeric values, instead of indirect text.


Link to post
Share on other sites

@Gabriel Franco

Thanks for your reply.

I fix MI62 mistake,@Ausman right;

18 hours ago, Ausman said:

MI62 twice...looking at other parts of the program perhaps one of these should be MI6

I attached last test mail,if i use the delimiters "2C"  it continues to write to the same column in excel as it should pass to the column.



Link to post
Share on other sites

OK.  Didn't think it would solve the issue.  

Did you try changing the write to a manual trigger like Gabriel suggested?  Change things so that the write only occurs on some input you do manually.  Then do this a few times with a space of 10 seconds, say.  Then see if the write is ok.

If you can't get to the bottom of this, perhaps consider changing what you are doing.  Store data into a table, then periodically copy the entire table into a udt file on the SD, and then manually retrieve that from the plc on a scheduled basis.

But I'd persevere with this first, it will likely be something simple.  I seem to recall a line count somewhere, is that correctly rolling over?

cheers, Aus

Link to post
Share on other sites

That's great, but I can't help today, too busy.  Others will.  If not....I'll Be Back!!!

Just for your own knowledge, I would play with SD card Explorer and see for yourself how slow the SD card interaction is.  Anything that uses the SD sometimes doesn't work as you would expect.  Same thing with anything that uses buffers.....might always need a few more scans after saying it is ok.

cheers, Aus

Link to post
Share on other sites

I looked at the program you posted on Monday and noticed that your SD Create Line block was stomping on itself - you had the beginning of the vector at MI 15 and the number of bytes register at MI 16.

You have the Max vector length set as 100 bytes, so you have to have a block of 50 sequential MIs that you don't do anything else with.  Pick a block high in the MI memory - it doesn't matter where.  I use the drop-down box in the MI selector to put the same descriptor on several MIs at once-


Post your latest program that was used to create TEST33.csv.

Joe T.  

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...