I feel like a lab rat in the CCW maze

drbitboy

Lifetime Supporting Member
Join Date
Dec 2019
Location
Rochester, NY
Posts
8,097
FYI, I have a BSL that may need to shift its Source's bits on contiguous scan cycles; a single BSL will not do that because it only executes a shift on the rising edge (FALSE-to-TRUE transitions) of its input rung.

The way to get around this is to call the BSL/BSL object a second time, during the same scan cycle, with a FALSE input rung; this effects the equivalent of OTU R6:0/EN or OTU control.EN in RSLogix-land, because CCW will not let me reset the .Done bit of the BSL object.

Here's the FYI: I tried several approaches, some of which should be functionally equivalent, but only a few successfully compiled.


This does an unconditional reset of the BSL object, but fails to compile ...


Untitled1.png
... but moving the AFI/BSL pair on that second rung to a branch of the first rung does compile ...
Untitled2.png
... while putting them on the same rung fails compilation ...
Untitled3.png
... then, removing the AFI, which is logically incorrect, allows it to compile ...
Untitled4.png
... while, finally, replacing the AFI with its logical equivalent to make it correct, does compile:
Untitled5.png
 
What is the number of bits in BSL_BITS? Can it be multiplied by 2? If not, can it be transferred to/from an integer that can?


2000, but it could as easily be 2048. Why?

Anyway, I don't have a question, this was just an interesting FYI of the comedy of errors, clown fiesta that is CCW, and what workarounds are available.

After a while I stopped being annoyed and just started enjoying the stochastic ride "Oh dear, AFI does not work there, hmm, but [XIC a_bit XIO a_bit], which is equivalent to AFI, does work there."
 
Last edited:
So far I've resisted all attempts to use CCW for anything other than drives (and even then, not for several years - I just use Logix now), but the way I'd approach this in Logix would be to unlatch the bit that stores the previous rung-in state.

E.g. the CTU instruction is likewise an instruction that counts once every false-to-true transition, but you can make it increment every scan by placing the counter on a rung immediately followed by an OTU addressed to Counter_Tag.CU.

No idea if you can do the same thing with CCW but that'd be my first approach.
 
So far I've resisted all attempts to use CCW for anything other than drives (and even then, not for several years - I just use Logix now), but the way I'd approach this in Logix would be to unlatch the bit that stores the previous rung-in state.

E.g. the CTU instruction is likewise an instruction that counts once every false-to-true transition, but you can make it increment every scan by placing the counter on a rung immediately followed by an OTU addressed to Counter_Tag.CU.

No idea if you can do the same thing with CCW but that'd be my first approach.

Yeah, as I wrote in the OP, that was my first attempt, but CCW will not let me clear the value of the .Done bit of the BSL object, apparently it cannot wrote to at least some object-internal members.

So like I also said, the purpose of this thread is to document functionality not readily available in CCW, and to show some possible workarounds.
 

Similar Topics

Hey all, I've recently been asked to help spec some SCADAPack controllers for a project. I'm specifically being asked if the E series...
Replies
12
Views
8,032
Well I've been programming different things for the past few years but today I remoted into a client's site to adjust some logic I put in for them...
Replies
3
Views
2,222
So, I was reworking a machine that was inherited. Very little documentation and absolutely no comments in the program (just uploaded, without a...
Replies
3
Views
1,746
I made an application in flex Runtime for entering batches. Can be stored in csv and transfered to the machine. But, when entering data in an...
Replies
2
Views
1,726
in my experience, they dont work well in my field, which is oil and gas production. ive worked with rosemount apex, rosemount 3300, k-tec...
Replies
5
Views
3,924
Back
Top Bottom