CCW output word

geniusintraining

Lifetime Supporting Member + Moderator
Join Date
Jun 2005
Location
SC
Posts
8,242
Hello,

Does anyone know how to address a output word in CCW? I have done this with just about every other PLC made but no luck in CCW, I also tried making a RSLogix move from a timer ACC to a output word O:0.0 then used the conversion tool in CCW but it was the only part of my program that it could not convert, I asked the same question a few years back and did not get a answer but was thinking someone else may have needed it and found a work around?? ST maybe?

Thank you
Mark
 
Its a simple flasher program, by looking at a 'word' and moving it to a output you can control the output, below is how I do it in RSlogix

Moving the accumulative value of the counter C4 to the output word O:0.0 this will sequence the output lights as the counter counts up

So when I try and do the same thing in CCW my output word _IO_EM_DO_?? is not a valid address/tag

flash.png
 
Ab changed their methodology of programming years ago. you can no longer (as far as I know) do what you are requesting. we have to copy I/o to a bit file and then use the bits in those words n the program. I suggest that you try to move the counter value to an integer bit file and then write those bits to the output word.
james
 
I suggest that you try to move the counter value to an integer bit file and then write those bits to the output word.

Hi James,

Thats the issue... I cant figure out how to write a bit file to a output word (also note this is CCW) its easy in RSlogix
 
[Caveat: pure speculation, this is, but it fits the data]


I think the problem is that the way it can be done in RSLogix is wrong, so you and I have taught ourselves, and become accustomed to, wrong.


O:0.0 is a word address* in RSL, and it also acts like a word**. So a MOV is a COP is a CPW (most of the time) and [MOV C5:0.ACC O:0.0] is accepted and works fine.


But now we are working in CCW, where code is going to be working with different sizes of integer. And A-B coders, rather than porting all the old convenient tricks that just worked because the cases where they did not work did not exist, instead wrote CCW to color within the lines and not do the funny stuff.



Anyway, what you probably want to port from RSL to CCW is summat like this:


xxx.png


Caveat: the two branches in Rung 0002 *would* be one, if C5:0.ACC could have a file address (#C5:0.2, I had hoped? Nope).




Also, and not that it matters, but I assume you realize that rung 0003, from your code, equivalent to the simpler, and more or less standard, rung 0004, or even rung 0005, for resetting the counter, right? You just ended up where you did because you were trying to fix summat else.



* it took me until today to realize that it was not a bit address, but that is another story, involving coming close but not really understanding the difference between .0 and /0. Duh on me, like it isn't explicit in the help menus.


** probably because of its roots in PLC/5 and/or SLC, where I am guessing non-16-bit quantities were more or less the full menu. Pure speculation, of course.
 
This may help, I also think you may not have the needed function block to make your project.

Go to the sample code section in the help section of CCW, go to their website and look for RA-Expand Work and RA-Merge Word function blocks.

And also if you're just trying to "Blink" a light at a certain rate, then also download their "Blink function" block as none of these come with CCW.

Bit Addressing.jpg
 
Here is CCW structured text statement that will move the whole seconds in a timer's elapsed time to an analog output word.

_IO_EM_AO_00 := ANY_TO_WORD(ANY_TO_UINT(MY_TON.ET)/1000);

Is this what you mean? You have to make sure that MY_TON.ET/1000 will not overflow a 16 bit word.
 
Thanks Guy's

Here is CCW structured text statement that will move the whole seconds in a timer's elapsed time to an analog output word.

_IO_EM_AO_00 := ANY_TO_WORD(ANY_TO_UINT(MY_TON.ET)/1000);

Is this what you mean? You have to make sure that MY_TON.ET/1000 will not overflow a 16 bit word.

Yes Kirk, this is what I was thinking but I am limited on ST skills... I tried your statement but it would not compile, the timer I had in local so I move it to global and that resolved one error, the next error you were using AO and I need DO, as I am looking for a digital (bool) word and moving, so I may need more instructions

Also is this the correct direction? should it be any word to my DO?

I will start reading the sample codes that damica1 pointed to maybe something in there will help

This is what the program is doing in the 1100, but this one also has the analog, the logic I posted above is only digital, so I am controlling the speed of the timer/lights with the potentiometer https://www.youtube.com/watch?v=nUedtQLRc0M
 
Thank you...

I have been reading and I think.... I will try this and get back later but I think I can use a ANY_TO_BOOL and ANY_TO_INT (or maybe REAL) I had to do this a lot in DirectSoft back in the day... everything was HEX and need to be converted then converted back so maybe this is the long way around.

I will play with it tonight and try LAD and ST

Thanks again to all!
 

Similar Topics

Hey everyone. I am trying to create some logic that will turn on an output only during production times. M-F 5am to 3:30pm. The output is for...
Replies
3
Views
1,349
I am new In a CCW and as a beginner I am trying to learn programming but i am noticing that my CCW software is taking around 1 minute to download...
Replies
2
Views
70
Hi guys, I have had some issues with uploading a program from a Micro 850 PLC. This is the first time connecting so I don’t have a file on my...
Replies
8
Views
197
Software Ver. 22.00.00, After the 1st time of being true the EQL. instruction is still allowing the rung to be true even though the inputs are...
Replies
7
Views
186
Back
Top Bottom