RS500 Elements Vs Words

theColonel26

Lifetime Supporting Member
Join Date
Feb 2014
Location
West Michigan
Posts
785
OK so in RS500 it Goes


<FilePrefix><FileNumber>:<Element>.<Word>/<Bit> Right?

C50:10.PRE
C50:10/DN

But you would you ever have a a reference that had a Word and a Bit?


I am asking because I am writing a .SLC file parser in C#.


Also

N23:10 is a Word
and
C50:10 is an Element
Correct?

Which is really annoying because my parser will have to know That C has elements and N as Words. I can do it it just adds another layer of complexity through.
 
Yes. In your example you could address bit 3 of N23:10 as N23:10/3
C50:10 is a structure. It is made up of a .PRE preset, .ACC accumulator, .DN or /DN done bit, .CU or /CU counting up bit and .EN or /EN Enable bit. You can only use that address to reference a CTU or CTD counter up or down or RES reset instruction.


Also B files can be addressed as B3:0 an entire 16 bit word.
Or as B3:0/0 bit 0 of the word B3:0.
Or as B3/16 bit 0 of word B3:1. So B3:1/0 is the same as B3/16.
Some of the IO can be addresses the same way as B files.
 
I am asking because I am writing a .SLC file parser in C#

you might find it helpful to use RSLogix 500 to do a "Fle Save As" operation and save the project file as an SLC Library type file ... then open that file with Notebook and take a look at how the data is parsed and stored there ... it might give you some ideas on how to proceed with your project ...

good luck with it ...
.

slc_data.PNG
 
So B3:1/0 is the same as B3/16.
Some of the IO can be addresses the same way as B files.


Oh dear, duh on me, you drop the bloody colon!


I had read this somewhere and yesterday spent to much time trying to find where and fiddling around to get the syntax, and just could not get N99:/[N199:0] or whatever to work.



So B3/N is the same as B3:0/N for all N?


Sweet.




OP: it's C#; do it with class(es).
 
So B3/N is the same as B3:0/N for all N?

not quite ...

suppose you take bit B3:0/15 (the sixteenth bit/box within the WORD B3:0) as an example ...

the next bit/box in line would be B3:1/0 ... specifically, the first bit/box within the WORD B3:1 ...

or ...

you could reference that same bit/box as B3/16 ...

note that the B-style format allow you to "bridge" sequentially from one 16-WORD to the next ... the N-style format won't do that ...

EDIT:

here are some older posts which might be useful ...

http://www.plctalk.net/qanda/showthread.php?p=81320&postcount=8
http://www.plctalk.net/qanda/showthread.php?p=55611&postcount=10
 
Last edited:
No I think it is; see the image below.


And when I enter

Code:
B3/[N7:1]
My freebie [RSLogix Micro Starter Lite] changes it to
Code:
B3:0/[N7:1]
and it works as expected i.e.
Code:
B3:<(N7:1)//16>/<(N7:1)%16>
where // is integer division (truncation, fix, whatever your background), and % is modulo.


a similar thing happens if I enter



Code:
B3:0/17
i.e. it becomes
Code:
B3:1/1
So in general, and ignoring any typos,



Code:
B3/N => B3:<N//16>/<N%16>
and



Code:
B3:M/N => B3:<((M*16)+N))//16>/<N%16>

xxx.png
 
not sure whether the "freebie" RSLogix 500 has this feature or not - but if you can get to the Address Display tab shown below, try experimenting with the settings that I've indicated ...
.

address_display.PNG
 
you might find it helpful to use RSLogix 500 to do a "File Save As" operation and save the project file as an SLC Library type file ... then open that file with Notebook and take a look at how the data is parsed and stored there ... it might give you some ideas on how to proceed with your project ...

good luck with it ...
.
yes that is where i am getting the files to parse.





OP: it's C#; do it with class(es).


.... yup, you must not be familiar with my rants......
 
Last edited:
You might want to familiarize yourself with the old handheld programmer codes needed for timers and counters

They couldn't do /DN, /EN ?acc etc so they used T4:7.11 to 7.15 [memory here so might be off and I don't remember which is exactly DN, EN, TT, PRE or ACC]
 
not sure whether the "freebie" RSLogix 500 has this feature or not - but if you can get to the Address Display tab shown below, try experimenting with the settings that I've indicated ...
.



It's got it, and I've experimented with it before. Then I did it again at your suggestion, and then I couldn't get the bloody dialog back!


"Hey, what kind of mind game is this Ron fellow trying to play?"


"Oh, the LAD window needs to have focus, then the [View]=>[Properties...] button shows up."


Man, the things you have to know to get by ... ;)
 
Man, the things you have to know to get by ...

then consider what you have to know in order to TEACH it ... especially in 12-hour-a-day classes - five days in a row - with six students who are all highly motivated and desperate to learn ... and give a money-back satisfaction guarantee - and don't collect payment "up front" ...

retirement has its advantages - but to tell the truth, I do sort of miss the challenge of working without a safety net ...

oh, well ... I guess it's time for a nap now ...
 
Last edited:
As for the library I am creating. I plan on publishing it on github, the only reason I haven't is that I am using real world PLC code in my unit tests right now and I need to create some generic code to use that isn't proprietary.



It is actually on GitHub right now I just have the repo as private for now. Note: I don't plan to spend a lot of time on it. I'm just going to add things that I need to do my job.
 

Similar Topics

Hello I am trying to make a program work with a sqo instruction .The process has 5 steps ,and a starting step of zero.There should be 8 sec...
Replies
17
Views
1,090
I have upgraded an old RS500 project to Studio 5000, it has thrown multiple errors which I am currently working through. I have looked through...
Replies
8
Views
1,734
I am working on upgrading a system with a ML1500 that uses a 1769-SDN DeviceNet Scanner to a CompactLocix L24ER-QB1B. Due to cost, I need to...
Replies
2
Views
1,412
I have been ask to check if we can have both English and Chinese in the same I/O description text window and rung comments. I could not Chinese to...
Replies
2
Views
1,219
Hi all, Here's an easy one. I've been asked to change a mitsubishi FX plc to a AB1400 using the same program. My customer has emailed me the...
Replies
5
Views
1,636
Back
Top Bottom