You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 30th, 2020, 11:00 AM   #1
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,934
CCW output word

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
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Old June 30th, 2020, 12:42 PM   #2
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 781
I don't understand what you mean by "Address a output word"??

What are you trying to get done?
__________________
David M. Camp

Unlocking the power of IOT in Oil & Gas!
  Reply With Quote
Old June 30th, 2020, 12:56 PM   #3
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,934
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
Attached Images
File Type: png flash.png (61.5 KB, 61 views)
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Old June 30th, 2020, 01:39 PM   #4
James Mcquade
Member
United States

James Mcquade is offline
 
Join Date: Oct 2007
Location: Tennessee
Posts: 2,792
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
  Reply With Quote
Old June 30th, 2020, 01:53 PM   #5
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,934
Quote:
Originally Posted by James Mcquade View Post
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
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Old June 30th, 2020, 04:52 PM   #6
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 1,088
[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.
  Reply With Quote
Old June 30th, 2020, 04:59 PM   #7
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 781
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.
Attached Images
File Type: jpg Bit Addressing.jpg (170.0 KB, 55 views)
__________________
David M. Camp

Unlocking the power of IOT in Oil & Gas!
  Reply With Quote
Old June 30th, 2020, 05:39 PM   #8
KirkC
Member
United States

KirkC is offline
 
Join Date: Aug 2015
Location: California
Posts: 8
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.
  Reply With Quote
Old July 1st, 2020, 07:44 AM   #9
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,934
Thanks Guy's

Quote:
Originally Posted by KirkC View Post
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
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Old July 1st, 2020, 11:18 AM   #10
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 1,088
https://literature.rockwellautomatio...2%2C215%2C0%5D


Just above this link is a Structured Text example of the COP instruction. It still does not answer the question of how to address discrete output bit in word fashion, as can be done in RSLogix.


Perhaps this: plug-in write?

Last edited by drbitboy; July 1st, 2020 at 11:27 AM.
  Reply With Quote
Old July 1st, 2020, 11:36 AM   #11
geniusintraining
Lifetime Supporting Member + Moderator
United States

geniusintraining is offline
 
geniusintraining's Avatar
 
Join Date: Jun 2005
Location: SC
Posts: 6,934
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!
__________________
www.PLCCable.com PLC Communication Cables, PLC Trainers, MicroLogix, ControlLogix, Siemens, Allen Bradley and more...OEM and aftermarket supplies... Aftermarket 1784-U2DHP Allen Bradley USB to DH+, new USB to 485 modbus
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
RSLogix 500 - I/O mapping question toads LIVE PLC Questions And Answers 8 September 25th, 2019 12:40 PM
1769-OF4 issues Narlin LIVE PLC Questions And Answers 1 July 10th, 2015 01:26 PM
Trying to split Double Word in S7 uptown47 LIVE PLC Questions And Answers 11 May 14th, 2008 04:29 PM
Encoder output types Orn Jonsson LIVE PLC Questions And Answers 10 May 9th, 2007 05:25 PM
Forcing OFF josesaucedo LIVE PLC Questions And Answers 21 March 29th, 2007 04:06 PM


All times are GMT -4. The time now is 01:42 PM.


.