Help - Search - Members - Calendar
Full Version: cp1l serial port setup in logic
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Programmer
j.brophy@corkillsystems
hi there

i have a problem where i cant manage to get the stup function to change my serial port setup.

i have asked this question before but are really not sure how to assemble the correct words to get what i want.

I have written a program that moves the values into data memory associated with the serial port on my cp1l plc and then run the stup function but cant seem to get it to work.

i am really not sure i am putting the correct words into the data memory which i think is the problem.

if i wish to get the serial port setup up as 38400, master, pc link, what do i put into the data memory area as words with the move functions?

if i wish to get the serial port setup up as 38400, slave, pc link, unit 1, what do i put into the data memory area as words with the move functions?
ParaffinPower
Hello
This FB should do what you want. It automatically sets the Port 2 settings as shown in the two Settings dialogs pictures.
Never used PC link, so no idea if this is all the settings or not.



Select master OR (slave AND address) and toggle the change flag on the FB input parameters.

Cheers, Pp
lostcontrol
QUOTE (ParaffinPower @ Aug 28 2009, 10:07 AM) *
Hello
This FB should do what you want. It automatically sets the Port 2 settings as shown in the two Settings dialogs pictures.
Never used PC link, so no idea if this is all the settings or not.



Select master OR (slave AND address) and toggle the change flag on the FB input parameters.

Cheers, Pp



Pp,
In your FB, you are setting the 1st word to #0008. This makes sense, as the 1st word is the baud rate, and 38400 is the 8th selection in the list.

I thought that this may of been the case, but could not find any reference that confirmed it, and did not have any hardware to test. Is the setup parameters
documented somewhere?




ParaffinPower
QUOTE (lostcontrol @ Aug 28 2009, 08:39 PM) *
Pp,
In your FB, you are setting the 1st word to #0008. This makes sense, as the 1st word is the baud rate, and 38400 is the 8th selection in the list.

I thought that this may of been the case, but could not find any reference that confirmed it, and did not have any hardware to test. Is the setup parameters
documented somewhere?

Truth be known, the manual is wrong (or lacking, at the very least) here, as it states either 38k4 or 115k2 whereas I found, as you have, that any baud rate can be selected.
Trial and error - what else? yes.gif
j.brophy@corkillsystems
hi there,

I have set up the program on first scan flag and input combinations to move values to dm0 to dm0+9 depending on the node i wish to select in the pc link chain as it saves me having to have several different programs for automation of a cow shed.

basically upon power up hold inputs to select the the node and the part of the program specific to the node selected.

It will save me sending out an incorectly programed plc as they can switch it on site to suit as we will send these all over the country.

I have noticed that there are errors in the manual in reguards to the connection to the pc link wiring for a 485 com board option between plc's and have figured that out by trial and error.

I think there may be errors in what i have to write in to dm0 to 9 and that may be what my problem is or i have put in something wrong.

I can get it to work by using the above and setting the serial setup in the settings menu but thats not what i am trying to do.

In the manual w462-e1-02+cp1l+oper manual in appendix g pages 614, 615 and 619 it has all the settings i need to setup node transmission rates etc...

so bits 0 to 7 set the serial transmission speed 0 to 0A hex depending on speed
so bits 0 to 3 set the node number 0 to 7 hex depending on node
so bits 4 to 7 set the link words 0 to A hex depending on amont of words
so bits 8 to 11 set the mode of communication 0 to 8 hex depending on the communication mode
so bit 15 sets up the mode 0 or 1 depending on mode

so the above is only one word correct 15 bits? so i only need one move function.

as far as i can see in the table the values over lap and i dont have a clue what is going on.

j.brophy@corkillsystems
hi there

i can not open up the document attached above as it is a cxf and is not a supported file type in my cx programmer 8.01 for got to mention.
lostcontrol
QUOTE (j.brophy@corkillsystems @ Aug 30 2009, 09:54 PM) *
hi there

i can not open up the document attached above as it is a cxf and is not a supported file type in my cx programmer 8.01 for got to mention.


.cxf is for Function Blocks. If you right click on Function Blocks, Select Insert FB from file, and point to where you have saved the extracted .cxf file, that should work.

In relation to your application, so I understand this correctly, you a number of PLC's, and you want to be able to dynamically assign the node address & program that operates, via a selection input on power up?

QUOTE
so the above is only one word correct 15 bits? so i only need one move function.

Nope, 3.

QUOTE
as far as i can see in the table the values over lap and i dont have a clue what is going on.


Is all about interpreting the manuals correctly, takes reading many times to understand how things are structured. cool.gif


From pg's 611/614 of the manual, you need to do the following:
D0 to be #8700 on to enable Custom Settings & PC Link Slave
D1 to be #0000 to set Baud Rate to be 38,400
D8 to be #000x dependant on Node No required

These should do what you require, unfortunately I do not have any hardware to test.



QUOTE
have noticed that there are errors in the manual in reguards to the connection to the pc link wiring for a 485 com board option between plc's and have figured that out by trial and error.


Could you post where these errors are, so that they can be corrected, and that others will become aware.


Based on these settings, if makes what PP posted incorrect for this application. The 2nd shot shows the settings if using Serial Gateway, or any other mode that uses all of the available Baud Rate settings.
Berti Baker
Hi,

CXF extention is for a Function Block. This is supported in V8 but you load into your project using File->Function Block->Load FB from file

Hope that helps,

Bertie
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.