[S7-1500] How to create an array with comments per element?

Rogier89

Member
Join Date
Dec 2013
Location
Vianen
Posts
6
Hello!

I want to create an array of booleans (inside a DB), but each element needs it's own description.

Does anyone know a way to either:
- Use an AT view in a global data block?
- Create an array with individual comments for each component?
- Loop through a list of separate booleans with symbolic addressing?

I'm using a S7-1500 PLC.
 
In RSLogix I create a User Defined Data Type that contains anything I want BOOL, STRING, DINT, ect.
Once that data type is created you can make an array of it the same way you can array a DINT or any other standard data type.
 
In RSLogix I create a User Defined Data Type that contains anything I want BOOL, STRING, DINT, ect.
Once that data type is created you can make an array of it the same way you can array a DINT or any other standard data type.

If I'm understanding the OP correctly he wants to have a different comment for each element of the array... It seems that RSLogix always makes the comments the same Boolean[1] will have the same comment as Boolean[2] ... etc
 
I C.

That is true for the default comments that are created.
In RSLogix you can go into the software after you create the array and place unique Description on each element.
I think this will accomplish what you are looking for.
 
Rather than using an array of bool's, use a tag of type Struct. This is sort of the equivalent of a UDT in Allen-Bradley that GTUnit referred to above - once you create the tag, you can add members of any type to it and call them whatever you want. Add in as many Bools as you need!

If you use optimised user blocks, you end up with an address in the format:

[Data Block].[Struct Tag Name].[Member Name]

for example:

SensorInputs.ProximitySwitches.Motor1Indexing

Where your DB is called SensorInputs, it contains a Struct tag called ProximitySwitches, and the Struct Tag contains a bool member called Motor1Indexing
 
Dear ASF,

I believe that Struct is not the equivalent of UDT in AB.
PLC Data type is the equivalent of UDT in AB.
You cannot instantiate a struct like a UDT in AB but you can instantiate a PLC Data type. In fact in Step 7 Classic (5.x) the PLC Data types where called UDTs.
 
Ah yes, I've had a poke around and I see what you mean. Oh well, if the OP only needs one instance of the tag then he can still use a single Struct tag, if not then you're right, a PLC Data Type is probably a better option.
 

Similar Topics

Hello, I need some help, i have SCADA system in PanelView Plus 1500, i want to know how i can download this program and make SCADA system in PC...
Replies
2
Views
2,364
Can we use a Simotion D455 ethernet port x127 as a gate, to access S7-1500 plc Tia Portal program ? In the Simatic manager, we used Netpro to do...
Replies
2
Views
96
I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
119
Hello, I have a 1764 1500 LSP Series A that keeps failing with DTL_E_FAIL I/O error. Searching around it seems there's a weird issue specifically...
Replies
2
Views
121
Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
355
Back
Top Bottom