indirtect address invalid subscript

From what I can tell, Screenshot 2 and Screenshot 4 are intended to be equivalent. In Screenshot 4 you don't need to use the MOV at the top. VARIETY[CurrentState].0 is a perfectly valid address definition assuming that VARIETY is an array of SINTs, INTs or DINTs and CurrentState is a single instance (NOT an array) of SINT, INT or DINT. The period in the CLX platform is an element delimiter. It selects a single element in a structure. However, it also is used as a delimiter of a single bit in a SINT, INT or DINT. In that context, basically think of a DINT as a structure of 32 bits. The bit dereference can itself be indexed so:

VARIETY[CurrentState].[DesiredBit]
would also be valid, assuming all the tags are DINT, INT or SINT.

I'm not the one with a plant manager breathing down my neck to get a project complete so I can talk pretty loose. But I would personally steer clear of automatic program conversions and would instead translate the program myself. Yes it takes more time and yes, in most cases, the conversion will work without a hitch. But keep in mind that the CLX family contains structure and tools that weren't available in the older generation processors. The conversion utility will just give you a current instruction set and syntax copy of the old program to the best of its ability. It can't make value judgements. The conversion program won't substitute a 3-dimensional array where it would make sense or convert a multi-file recipe structure into an array of UDTs. It can't make that choice but YOU can. I would always take the opportunity to at least look the original program over carefully and approach it with fresh tools where it makes sense.

Keith
 

Similar Topics

Hello everyone, I've had this issue for the last 2 days where I try to assign the profisafe address to an IO block (6ES7 146-6FF00-0AB0) but when...
Replies
4
Views
62
i have two plc 1. s7-1212dc/dc/dc ip; 192.168.0.1 2. s7-1500 1513-1pn ip; 192.168.3.2 i need to get data from plc1 to plc2. any idea how to do...
Replies
5
Views
138
Hi, I wanted to ask is there a way to have a visibility expression use the IP address of the HMI (Dynics, not PV) to show certain elements? The...
Replies
3
Views
212
Hello. I have a few machines that use Kinetix 300 (each machine has two drives). Both drives on one of the machine keep losing IP address. They...
Replies
2
Views
105
Hi Guys, Is it okay to have Redundancy ControlLogix Processor IP address set to DHCP? I had Static IP address on it but removed it via RSLinx...
Replies
3
Views
246
Back
Top Bottom