Page 1 of 1

[?]: conect Data acquisition modules adam-4019+ to plc 300 ?

Posted: Mon Sep 12, 2011 10:54 am
by kambiz
how i can conect Data acquisition modules adam-4019+ to plc 300 ?

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Tue Sep 13, 2011 7:21 am
by bilbo_321
There are few different ways to do it:
1. The easiest way is to use ASCII communication. You need a CP340 (RS 422/485 version) at S7-300 side.
You should configure ADAM module for ASCII communication.
There is #AAN Command to Read Analog Input from Channel N of ADAM Module.
Check the ADAM Manual http://support.advantech.com.tw/support ... e=Download

2. Using Modbus/RTU protocol. It is more complicated and expensive option compared to 1.
This involves using CP-341 at SIEMENS PLC rack (more expensive Communication Processor) and driver for Modbus RTU (paid again = extra money). Keep in mind that there are different SIEMENS order numbers depending on type of Modbus RTU, Master or Slave.
ADAM should be configured for Modbus RTU communication.

3. Using S7-313C-2 PtP or S7-314C-2 PtP with built-in RS-485 Point-to-point interface. Almost the same as 1.

I hope this will give you some ideas.
Cheers.

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Sat Sep 24, 2011 4:58 pm
by kambiz
hi
thanks
how make cable to conect to adam ?
cp341 conector 15 pin

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Mon Sep 26, 2011 7:07 am
by bilbo_321

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Mon Sep 26, 2011 8:53 am
by kambiz
Today I have done the following exercises:
1) Parametrization the CP341 module with ASCII protocol in Hardware Config and downloaded.
2) FB7 and FB8 copy and pasted from "CP341 protocol 3964" example given in Config. Package to my project.
3) FC21 and FC22 copy pasted to my project and also asign the DB NO,DBB NO,LEN,LADDR.
4) DB40,DB41,DB42,DB43 copy and pasted to my project.
5) SFC58 and SFC59 copy and pasted to my project.
6) In OB1 called the FC21 and FC22.
7) Now the problem :CP 341's TXD is blinking but RXD is not blinking......Please suggest for the possible solutions.....No any errors come in diagnostic buffer of CP as well as on CPU. I have setting the parameters as follows:
1) Boudrate: 9600 , Databits: 8 , Stopbit : 1 ,Parity : None.
adam setting : Boudrate: 9600 , Databits: 8 , Stopbit : 1 ,Parity : None

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Tue Sep 27, 2011 3:56 pm
by bilbo_321
Looks like ADAM module doesn't answer or there is a wrong wire connection. I don't know what data you are sending to it. Have you checked the ADAM manual how to construct character frame?

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Tue Sep 27, 2011 4:05 pm
by kambiz
adam conector rs485 DATA+ and DATA- and my wiring cable cp341 15 pin 4 and 11 conect to data DATA+ and DATA-

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Wed Sep 28, 2011 6:37 am
by bilbo_321
it is not very clear. Could you write down exactly pin-to-pin connection or draw a simple schematic?
Keep in mind that ADAM module should be configured with address, using or not check sum, baudrate, etc.. Please read the complete ADAM 4000 manual (especially Chapters 2, 4, 5 and Appendix E).
I can't help you more without connection schematic, list of ADAM settings and S7 project.

Good luck.

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Wed Sep 28, 2011 9:35 am
by kambiz
now comunicate to adam is ok conector 15 pin cp341 pin no 4 and pin no 11 conect to Data A+ and Data A-
cp 341 now RXD belink
adam have 8 analog input , i conect signal AI to adam how i can read data in plc ?

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Wed Sep 28, 2011 3:05 pm
by bilbo_321
That's good progress. :)
Use command #AAN as i wrote in my first post.
I am telling you again: READ THE ADAM MANUAL, chapter 5, page 5-11.
Here is the description of command:

Code: Select all

#AAN
Name: Read Analog Input from Channel N command
Description: The command will return the input value from one of the
  eight channels of a specified (AA) module in the currently
  configured data format.
Syntax: #AAN(cr)
  # is a delimiter character.
  AA (range 00-FF) represents the 2-character hexadecimal
  address of the analog input module.
  N identifies the channel you want to read. The value can
  range from 0 to 7 for 4017, 4018, 4018M, 4019. (The range
  of 4015 is from 0 to 5)
  (cr) is the terminating character, carriage return (0Dh).
Response: >(data)(cr)
  There is no response if the module detects a syntax error or
  communication error or if the specified address does not
  exist.
  > is a delimiter character.
  (data) is the input value of the channel number N. Data
  consists of a + or - sign followed by five decimal digits
  with a fixed decimal point.
  (cr) is the terminating character, carriage return (0Dh).
Example: command: #120(cr)
  response: >+1.4567(cr)
  The command requests the analog input module at address
  12h to return the input value of channel 0.
  The analog input module responds that the input value of
  channel 0 is equal to +1.4567 volts.

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Tue Oct 04, 2011 5:35 pm
by kambiz
after conect cp341 to adam in my cp have this error :
reply message with exception code 02
modbus receive error

Re: [?]: conect Data acquisition modules adam-4019+ to plc 3

Posted: Wed Oct 05, 2011 6:50 am
by bilbo_321
It sounds like CP configuration is not correct. Maybe it is not configured for ASCII protocol???
Could you check STATUS word of FB for send & receive? post here the hex values if possible.