Looking for an elegant solution.

tbode

Member
Join Date
May 2006
Location
Ohio
Posts
23
Hi all,
I need to communicate to ten weigh controllers via Modbus, one address per scan. I have the logic working by using an ADD block for the increment to determine which station address to talk to next. When the address increment exceeds 10, it is set back to 1.
What I want/need to do is add logic to allow addresses to be skipped if the tank(s) is out of service. So, if my current scan was to tank 3 and tank 4 was out of service, which I will know via a boolean, the my new address for the next scan will be 5. I know how to brute force the solution but I feel that there is a more elegant method which has eluded me so far.
My system is a GE PAC RX3i and I am using Proficy Machine edition 5.6 with the lastest SIM installed.
Is there an elegant solution?
 
If you can write functions for this plc, write a function for selecting the next tank address. This function will increment the address and check if the addressed tank is in service. If it is, then it returns, otherwise it will repeat incrementing until a tank in service is found.
You will also need to cover the case when all tanks are not in service, if that is possible for your plant.
 
tbode said:
Hi all,
I need to communicate to ten weigh controllers via Modbus, one address per scan.
What makes you think the slave devices will respond in one scan? Are you sure the PLC can process the last request and start a new request in one scan? I think there are going to be times where it will take multiple scans between messages.

I know nothing about the PLC you are using. Can you change the slave address of the MSG block or what ever it is called? Are you going to need 10 MSG blocks? Do you have encode and decode instructions?

I would have a register that is the set of all active slave devices and another register that is the set of all active slave devices to be scanned this round. If the set of to be scanned devices is 0 then a new round starts and the set of all active slave devices is copied in to the set of slave devices to be scan.
This requires 1 rung.

I would then find the least significant bit set and use that bit to activate a request to the slave. When complete I would clear that bit and find the next least significant bit until they are all cleared then start again with a new round.

Finding and clearing the least significant bit is easy. I don't see how the PLC will be able to start AND complete one message per scan.
 
GE makes a 2-port and 4-port Modbus master that seats in the local backplane of an RX3i system. I can't remember the part number, but your GE supplier can get it for you.

The problem is that with an average scan rate of 6 ms for the RX3i 300MHz processor, I don't think that Modbus will be able to meet your requirements. Good luck with your project.
 

Similar Topics

Hi , Where i can find Mitsubishi PLC Card end of line & replacement model details. i am looking for Q02CPU replacement model. Please advice. thanks
Replies
2
Views
119
I have Allen Bradley plcs, I have had Circuit breakers and other automation equipment in the past. There's no solid buyers local. How much do you...
Replies
2
Views
190
can anyone has a good program to learn plc programming online. i have the basic looking into improve my skills thanks
Replies
1
Views
136
I want to monitor a couple signals in a place where there is no PLC but there is ethernet. I know I can use an AENTR or Flex I/O and a module but...
Replies
21
Views
738
I downloaded v24 for studio 5000 but can’t find where the download manager put it! Any help? I’ve done it before but can’t remember. Thanks
Replies
9
Views
371
Back
Top Bottom