ABlearner

RSLINX in excel

7 posts in this topic

Hi Guys!

A have a problem with Excel and RS linx. I belive the communication is good. I just need a few tips, especially with excel.

I have about 3000 dint value, and aI dont know how to put them in excel at once. Not one by one. THis is my first question.

You can see the link: =RSLINX|MC!'Database_fifo[0].Motor_rpm, L1,C1' the next one is =RSLINX|MC!'Database_fifo[1].Motor_rpm, L1,C1' and =RSLINX|MC!'Database_fifo[2].Motor_rpm, L1,C1' and so on. I dont want to write the numbers like 3, 4 ,5 ...2560... So I hope you guys get it, sorry for the bad explanation.

For this problem maybe exsiting some macro or something like that, I dont know.

The second: there is some dint what is in decimal style, but acutall they are ascii, I know how solve that, with the char function, but I dont know how to collect it. Like on the picture, there is the numbers what I read from the plc, like 82 equal to R. But I want to see them in one cell. Like RKBF-355, I want them in a same cell. Unfortunaltely I cant solve it. At least until now, and I hope somebody know it by memory. 

 

Thank you in advance!

 

rslinxvsexcel.jpg

Share this post


Link to post
Share on other sites

Posted (edited)

I'm not sure what's going on with the first one. For the second one, to get the string RKBF-355 into a single cell, you can do what you did with the Char() command, then concatenate the cell contents into a single cell with a series of "&" commands:
CellConcatenate.PNG.ef1173c3c4a157e3cc10

A single-step formula would look like this:

= Char(C8) & Char(C9) & Char(C10)...

 

ETA:

Note: my cell references aren't the same as yours since I didn't type the numbers into the same fields as they are in your screenshot.

Edited by Joe E.

Share this post


Link to post
Share on other sites

Posted (edited)

Turn this - =RSLINX|MC!'Database_fifo[0].Motor_rpm, L1,C1'

into a formula

Deleted the formula because it was a crappy example

You know... I think this will work better if I give you a working example See the attached spreadsheet

Click on the Motor Definition Tab, then go look at the way that I assembled that data into a string of data in the Motors with Start Stop IO tab. You copy the results of the formula using paste as value.

IOM Builder Rev 2.xls

Edited by Michael Lloyd

Share this post


Link to post
Share on other sites

BTW- the IOM Builder spreadsheet came about because I needed a way to map IO to tags that was quicker than typing 400-500 or more text strings. Mapping tags lets me build a program before I even know where the wiring lands in the PLC. Everything is addressed to a tag and the IO is mapped to it. The spreadsheet turned a day or more of work, that had errors, into a few minutes. I have another one for mapping analog data. And another one for documenting analog data. Also, if you map the IO they (the customer) can change their mind all they want. If they move wiring around, I just change a value in the map tag. 

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

See the attached file that is more specific to your question.

I built what I outlined above. Part of the tag in cell A, number in cell B, rest of the tag in cell C. Formula (A1&B1&C1) in cell E

Copy and paste the contents of cells A, C, and E down as far as you need it, put a 1 in B2, then select B1 and B2, now drag that down and it'll increment the numbers in the column (0, 1, 2, etc). Cell E will have your tag but it's a formula. Copy / paste that but do right click, paste special, as value in cell G, there's your tag...

Tag Builder Test.xlsx

Edited by Michael Lloyd
Duplicate sheets and I can't delete

Share this post


Link to post
Share on other sites
22 hours ago, Michael Lloyd said:

BTW- the IOM Builder spreadsheet came about because I needed a way to map IO to tags that was quicker than typing 400-500 or more text strings. Mapping tags lets me build a program before I even know where the wiring lands in the PLC. Everything is addressed to a tag and the IO is mapped to it. The spreadsheet turned a day or more of work, that had errors, into a few minutes. I have another one for mapping analog data. And another one for documenting analog data. Also, if you map the IO they (the customer) can change their mind all they want. If they move wiring around, I just change a value in the map tag. 

That is super interesting! How do you import that into studio 5000?

Share this post


Link to post
Share on other sites
Quote
22 hours ago, Michael Lloyd said:

 

That is super interesting! How do you import that into studio 5000?

 

I don't :o) I copy and paste the result of the formula into a structured text file (called IOM for IO mapping) and it shows up as structured text. It's about as easy as it gets. I've attached my "base program". Everything for me starts with that (lots of UDT's and some AOI's in the base program. You'll see  that everything has documentation that looks somewhat useless but it has a purpose. If you export a CLX tag database the doc's section is empty AND the tag doesn't show up in the export. So I documented it (Spare Shutdown, Spare Alarm, etc). It took a looooong time but I only had to do it once. I also included the IO sheet. Once it's filled out, almost all of the PLC documentation is done with Export / Copy Paste / Import. 

Time is money... so time saved building a project is valuable. I always charged by IO count and never did change orders UNLESS they increased the IO count. So when they swapped IO around or added something to a card, I didn't care since (in the business I work in, oil and gas) any change or add was simple. Even adding a pump and all of it's logic was a simple matter of cut / paste / find and replace (the tagname to the left of the dot field. Like copy P6000 logic to P7000, then search P6000 in the logic and replace with P7000 after your create the P7000 tag)). It's hard to explain this way but it's very simple.

I made the same thing for a Compact Logix and SLC (SLC is not as useful)

 

Blank CLX IO Sheet Rev 0.xls

LogixInitial.ACD

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now