MOSCAD 400 as MODBUS Master

H

Thread Starter

hishamahmed

Dears,

I am very happy to join your great forum. i am PLC programmer. i have connected S7-200 to Motorola MOSCAD 400, but i couldn't poll Inputs, Outputs & Registers from Siemens S7-200 PLC.

after successfully connecting them (Time out) status showing in PLCstt of MOSCAD. so i need a sample code, help me to know how to read ("SCAN" in Moscad Programming Code) from S7-200.

thank you for all in advance and i hope to here from you near.

Hisham Ahmed
PLC Progammer
 
M

mariobergeron

If I understand correctly, you want the Moscad to be the Master polling the Siemens as a Slave. You should use simulators to check which PLC gives you troubles.

For the Moscad, follow the Third Party Protocols Support manual in details for the configuration (Local RTU as PLC Master). Make sure you set the I/O link correctly for the table column to scan correctly. If you SCAN while PLCStt = PLCBsy than the scan will be ignored.

For the Siemens, you have to correctly install the Modbus library, configure the address properly and initialized it in Ladder. The RS-232/PPI cable has dip switchs, pin 5 need to be set differently for programming or for Modbus communication. Pins for Baud rate need to be set correctly.

Good luck.
 
H
Thank you mariobergeron for your reply,

yes i am trying to use MOSCAD as Master MODBUS & Siemens as Slave MODBUS.

dear i have not problem from Siemens side. i have already successfully tested to poll inputs, outputs, & registers from Siemens PlC by using modbus polling software and everything is ok. But because i haven't good experience in using MOSCAD as Master MODBUS, i cannot poll the data from Slave MODBUS.

I have read the manual of MOSCAD, but there is no good sample how to build your I/O link and the related tables.

if you have read the manual and try to make sample, you will see it is not explained very well and not enough to make connection.

have you sample code or photos for samples?

thank you very much
 
M

mariobergeron

I have set this up many times:

Configuration:

Port Rs-232, Third party protocols
Connected to: PLC
Port name: PLC1
Set baud rate and format

Downloader:
Check PLC Port 1: mb2plc1.fls (You need to install the Third party protocols drivers provided separately first)

Application:

database:
Column as PLCdi or PLCvi
PLC Table:
PLC Address: Modbus ID
Connected to RTU: Local
Via Port: PLC1

I/O link:
PLC address: Modbus ID
PLC data type: as Modbus side
Coord 1: Modbus register number (Start at 0 not 1)
Coord 1 length: 2
The rest blank

Ladder:
SCAN column (with timer) takling account of PLCBsy

This is it!
 
H
Thank you very much my friend.
believe me, that what i have made.

but in Database i have made table named as "PLCin" and the column name is: 10001

in the Ladder the SCAN read the Column 10001

is it correct?

note: when i make test the PLCStt give me 1 (busy) for long time then 6 (timeout) one time

please, can you send to me printscreen for your "Database", "I/O link", "Ladder"

my email is [email protected]

thank you for your great help.
 
H
Dear Mr. Mario,

Thank you very much for your email, it was very clear and useful. I am so sorry still it's not polling. The TX flashing from time to time, but RX only one to times flashing. There is no error in the log.

I need to ask you my Siemens PLC port is RS-485, and I have configured the MOSCAD RTU hardware configuration to make Port 1 as RS-485, and I have connected rj-11 cable to Port 1a.

Is the problem maybe in the RS-485 cable. What is the correct pin-out of the MOSCAD port?
 
M

mariobergeron

You should have mentioned RS-485 right away. This is certainly the source of your problem. It is not well documented in the Moscad product.

To start, I would switch the port to RS-232 and check the Modbus communication with a simulator. This port use the same cable as the programming cable.

After this is working. Switch back to RS-485. Moscad work only with the 2-wires RS-485. If you need 4-wires, you will need to get a converter.

The port 1A (4-pin 4P4C connector, handset style connector) for RS-485:

Pin 1: +12V (leave alone)
Pin 2-3: RX/TX +/- communication (try one polarity, if not switch them)
Pin 4: Ground (should probably leave alone)

I have use this port too and it is working fine.

Good luck.
 
E
Mario,

What MODBUS sim are you using? I am using MODSIM_RS for an ACE3600 and I keep getting a reply error from PLC slave. If I do a Scan function without checking for PLCBsy, I can get a return on the DIs but not the AIs. I'm sure it has something to do with the simulator I'm using but I can't figure it out.

Eric
 
M

mariobergeron

Eric,

> What MODBUS sim are you using? I am using MODSIM_RS for an
> ACE3600 and I keep getting a reply error from PLC slave.

I do use the Mod-RSsim simulator. It is working without many issues. There is a Comms button (lower-right) where you see the RX/TX data. See if the incoming massages are correct. (baud rate/parity/stop bit)

> If I do a Scan function without checking for PLCBsy, I can get
> a return on the DIs but not the AIs. I'm sure it has
> something to do with the simulator I'm using but I can't figure it out.

If you don't check the PLCStt, then a message will come out once in a while, and usually synchronized with the scan so you always get the same one out.

Be careful, PLCStt might be in many states, not only PLCbsy or PLCrdy.

As a test, use a bit for each type of message (scan) and manually trigger them with the simulator connected.
 
C
Hi,

I am trying to use a MOSCAD 400 as MODBUS Master rs485.

My IO Link doesn't show PLC data type: as Modbus side. I have 3 options: PLCVal, Holding Register and Input Register.

I am trying read a holding register, but shows this message:
" 04/05/17 16:34 ERROR #: 834
Userrom plc module, function prv_userrom_plc_scan
Iolink definition problem of plc column ! "

My device is a flow totalizer Presys dmy-2030-tot
 
C
I already identified the problem, it was a small mistake in IO link. Another question, MOSCAD only releases the Holding and Input Register options, how do I write Coils?
 
M

mariobergeron

>I already identified the problem, it was a small mistake in
>IO link. Another question, MOSCAD only releases the Holding
>and Input Register options, how do I write Coils?

If you create a new column in a Table, then you have the choice of:
PLC Discrete Input
PLC Discrete Output
PLC Value Input
PLC Value Output
PLC Real Input
PLC Real Output

Then in IO Link you select the correct Modbus Function and parameters.

As of your question, you would create a "PLC Discrete Output" column.
 
Top