Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Remote Node TCP Connection MOXA RS485 to TCP GW

Remote Node TCP Connection MOXA RS485 to TCP GW 5 years 10 months ago #9707

Hello!
So I have discovered the RemTrans class, and I'm starting on the programming for it.
I need to use it to move data from the MOXA where:
1. Proview initiates a tcp connection to the MOXA (RemnodeTCP)
2. Proview transmits the request (RemTrans)
3. the MOXA responds
4. Proview reads the response (RemTrans?)
5. Return to number 2 after a timeout until the system is shutdown (cycle time should be about 1.5 seconds or so, Remtrans?)
6. Disconnect the TCP connection (automatically on shutdown or RemoteConfig)

If I understand this correctly the layout for the Node is:
RemoteConfig->RemnodeTCP->RemTrans

It seems that this will require 1 RemTrans object per port.

Can I use the RemTrans to do both 2 and 4, or do I need separate transactions for the receive and transmit sides?

If I can use 1 RemTrans object to handle both the transmission and reciept, is there a special/best way to handle that transaction (timeout handling)?

Thanks,
Matt
Last Edit: 5 years 10 months ago by MattBerglund. Reason: Further Clarification
The administrator has disabled public write access.

Remote Node TCP Connection MOXA RS485 to TCP GW 5 years 10 months ago #9709

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Matt,

The RemNode can be used for both sending to RemoteAddress and RemotePort, and receiving on LocalPort. Below the RemNode you need one RemTrans for sending, and one for receiving. There is no built in request/reply handling with timeout, so if you want a timeout you have to program this in the plc code.

Note that you have to set DisableHeader in the RemNode.

/Claes
The administrator has disabled public write access.

Remote Node TCP Connection MOXA RS485 to TCP GW 5 years 10 months ago #9710

Claes,
Thanks so much for the reply.
I'm currently doing this with python, and I have 3 quick cycles with a long, 1.5s, wait until the next 3 cycles.

From an efficiency perspective, would it be appropriate to move this to a different, much slower (1s, or so) Proview PLC?
I will have a number of systems polled slowly like this, and I guess the broader question is:
When is there a positive trade off between sample frequency/dwell and a different plc thread?
Do you measure this empirically for your work?

Thanks again,
Matt
The administrator has disabled public write access.

Remote Node TCP Connection MOXA RS485 to TCP GW 5 years 10 months ago #9711

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi Matt,

We haven't made any measurements, but the overhead for a plc thread is quite small so we've never hesitated to create new threads.

The sending and receiving of remote transactions are perfomed by rs_remote processes, and the plc is just packing and unpacking the messages, so in this case I don't think is matters if you do this in a separate thread or not.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.396 seconds