Adding Integers with CPT

lando

Member
Join Date
Aug 2015
Location
usa
Posts
1
In process of editing a spot weld process using AB Micrologix 1400 controller, Panelview plus 7 HMI, RSlogix 500 and Factory Talk ME 10.

From the panel view the number of total spot welds are entered (1-20) tied to C5:0/preset

The operator can select to weld a part using six combinations of weld quantity tied to a weld schedule. Example: total welds =8, the first weld schedule = 4 (7:69) , second weld schedule =1 (N7:68), third weld schedule = 1 (N7:67), forth weld schedule =1 (N7:66) and fifth weld schedule =1 (N7:56)

The recipe is then downloaded to the controller.

What I am trying to do is monitor the C5 accumulator with a compare statement and when the first four welds are complete, change the weld controller schedule to the next one. Stay in the next weld schedule until N7:69 and N7:68 equal to the C5 accumulator and the move to the third weld sequence and so on.

I tried this using the add function and it will calculate the first two and would not calculate the rest. So I have switched to trying to use a CPT instruction.

Does this have a chance of working?
Any guidance is appreciated.

CPT.jpg
 
Welcome to the PLCTalk forum community !

What you show will work, but so will a set of ADD instructions.

You do not need parentheses to declare an order of operations when all the operations are ADD.

And be sure that you consistently label your registers and their order; in your screenshot it looks like N7:5 and N7:6 have transposed labels, and you jumped from N7:66 to N7:56. Maybe you have specific reasons, but somebody reading that logic might infer that sequential registers are meant to represent sequential items.
 
Why didn't the add function work?
1st rung: [ADD] A: N7:69 B: N7:68 Dest: N7:6
2nd rung: [ADD] A: N7:6 B: N7:67 Dest: N7:5
3rd rung: [ADD] A: N7:5 B: N7:66 Dest: N7:4
4th rung: [ADD] A: N7:4 B: N7:65 Dest: N7:3

The computes u did above should do the same as the add that I did.
(these could also be done in 1 rung with branches or putting them in series)
 

Similar Topics

Is there a way in CX-Programmer to ad UINTs together with an instruction without a compiler warning. Ladder Rung: Warning: Instructions...
Replies
2
Views
1,264
Hi everyone, I'm a Siemens expert but currently need to do a bit of AB PLC5 work. I have a PLC5/40E. I would like to know if I can add my own N...
Replies
11
Views
2,403
Hi, I have an array of 30 integers :- db1.tracking[0] to db1.tracking[29] What's the best / easiest way to add them all together ? They are...
Replies
5
Views
2,982
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
83
Hi Everyone, Currently we have three plants running with Controllogix PLCs (L72, L73, L74). In each of these plants we have 2 FTView SE...
Replies
0
Views
77
Back
Top Bottom