Same output adderess

Depends on what you are trying to do. When SM0.0 is true the MOV will move a 0 into the VD264 register essentially clearing it. Then the next line will do the subtraction and store it into VD264. So depending on how you need this to work it may be the same as hitting CLEAR on the calculator before doing any math.
 
No the order of operation is left to right and up to down. So the mov happens first then the next line down executes and so on.
 
No conflict, but bad practice.



And as mentioned, the first network will have absolutely no influence.
 
This is Siemens MicroWin by the looks of it. SM0.0 is an 'Always On' bit so the rungs will always run, in MicroWin you always have to have contact between the main rung and functions which is why the SM0.0 is there. As has been said it is always the last write to a variable that will carry over to the next scan. The only way that the SUB_DI would fail to write to the variable is if the INC_DW failed for some reason, though I don't know of any reason that it could. At the moment the routine won't compile because the INC_DW has no references on its In and Out.

Not sure why referencing a variable more than once is thought to be bad practice, though I never claim to be an expert programmer. I often use one temporary variable to store intermediate values, it saves on memory but admittedly makes diagnostics harder. Perhaps now we have a lot of memory to play with it makes more sense to use separate locations.
 
This is Siemens MicroWin by the looks of it. SM0.0 is an 'Always On' bit so the rungs will always run

Yea that could cause you a problem unless you want to do the subtraction every scan. IF that is so then why have SM0.0 in the rung at all?
 
...

Not sure why referencing a variable more than once is thought to be bad practice, though I never claim to be an expert programmer. I often use one temporary variable to store intermediate values, it saves on memory but admittedly makes diagnostics harder. Perhaps now we have a lot of memory to play with it makes more sense to use separate locations.


Not familiar with the software package here, but I assumed from the title that this was an output tag :).
 
IF that is so then why have SM0.0 in the rung at all?
It is a Microwin thing that you can't have some things direct connected to the left hand side common, so if you always want the following code to run you use an SM0.0 contact.

Did check why INC_DW might fail to set ENO and from the manual:

Error conditions that set ENO = 0:
SM1.1 (overflow)
0006 (indirect address)
 

Similar Topics

Hi everyone, I have a AB Powerflex 753 powering a simple 480V permanent magnet motor using flux vector control (I believe it's the only control...
Replies
3
Views
1,311
Hi all! I have one question, it might be simple for one of you but I spent hours searching and reading through different platform until I found...
Replies
11
Views
1,608
Hello everyone, I wanted to know if it was possible to use the same routine with the same outputs, routine that I will duplicate, which has...
Replies
10
Views
3,147
Hi! I have a problem related to using same output on multiple programs. I have for example "Out1" in PLC1 Program and i need to use that same...
Replies
7
Views
2,524
hi all, what is the best way to implement ON OFF when there is only one DO? i'm using rslogix 5000. there is a feedback if the ON is active...
Replies
4
Views
1,610
Back
Top Bottom