Host Engineering Forum
General Category => ECOMs and ECOM100s => Topic started by: sgsims on September 21, 2012, 08:31:01 AM
-
Having trouble getting one of 2 H2Ecom-100 cards working. I've got a DL205 9 Slot base with a DL260 CPU. Ecoms are in slot 5 & slot 6. The two cards are on their own network with nothing else attached to them but a Cognex Dataman camera. (we have two cameras both the same model Camera A attached to Ecom # 1 , Camera B attached to Ecom # 2)
Using Modbus TCP/IP with the camera as a slave.
So, Ecom # 1 & camera A work great. I can communicate via netedit to both ecoms to do the General configuration and Peer table Set-up. Ecom # 2 won't show any activity. Checked all my Ecom Config I-Boxes and ladder program first. Talked to AD support next. They sent out a new ecom card. Same problem. They are sending out another one (third 0ne).
Troubleshooting..I connected camera # 2 to the good ecom # 1 and everything worked great. So not a modbus addressing issue. Although I think I already knew that because I can't get any activity at all on the Ecom # 2. So no error bits going high as I poll the ecom card with a read I-Box.
So was thinking maybe the base has a problem. So I swapped the cards. Put the good ecom in the other slot...it continued to work great. Put the bad ecom card int he other slot..still no coms.
Anyway, going to work with the new card and try a bunch of different combinations to see if I can ever get the card is question to respond.
Any ideas??????????? Yes, DS # 7 is in the ON position. Yes, I updated the firmware.
-
I just finished a job with a 260, 1 ECOM100 and 2 Cognex Cameras on the same network and it's working fine, but it took some trial and error. Can you attach the part of the program that has all of the IBOX's.
-
Yep..here you go.
-
I noticed you have some conditionals on the enable for the ECRX boxes. I had problems with this. The communications would just stop. It has something to do with the way the IBOXs are setup. Maybe Franji can explain it better. So I put them all in a row at the top of the program and had them running all the time. This works, but later I found this to be a problem, because in my application the cameras where taking 8 consecutive images very quickly and buffering them for processing after the last image. I discovered that the Cognex camera's missed triggers if I had continuous communications. So I had to disable communications during the acquire, but if using I-Boxes this has to be in an orderly fashion. You have to make sure you complete the transmission before disabling the IBOX instruction. What I did was place each Ibox in a stage. Then wait for either a success or failure bit to continue on to the next stage for the next read or write. At the top of my loop, I had a check whether I wanted to begin the next pass. This way the tokens don't get screwed up. It picks up where it left off. Also, I recently found out that unfinished Modbus transmissions may cause an accumulative memory leak in the camera. You always want to make sure the write or read is complete before you disable the instruction.
-
great info for when I finally get the cpu to talk to the ecom!
-
Sure you got the slot numbers right? I've gotten that messed up before.
-
yep..checked that several times.
-
Do you have the same IP addresses set in both cameras?
-
nope...different ip addresses for each camera....although I don't think that would matter even if they were the same IP address because the ecom cards are on two completely differet networks.
Anyway..........
-
Right, but when you did the swap, did you change the IP in the PEER To PEER CFG?
-
yes
-
Please post a screen shot of your I/O Config page (PLC->Configure I/O)
-
will do in a couple of hours when I get to the project site. Although we have looked at that page and it is seeing an ecom in both slots if that's waht you are wanting to see.
-
Don't make a special trip - just want to make sure everything is good from a backplane/slot standpoint.
-
going anyway so no worries there...thanks
-
sgsims,
Looking at your program I see a few things wrong. There are no conflicts, which is good, however, things to change:
- Rung 4 has an ECOM100 IBox. That IBox needs to be on the same Rung as the other ECOM100 IBox, i.e. Rung 1. The ECOM100 IBoxes always need to be at the top of your scan.
- Rung 2 needs to have a contact on it, SP1 (always ON), otherwise it is tied to the power flow above it (which in this case is not a bad thing).
- Rung 6 needs to also have a contact on it, SP1 (always ON), otherwise it is tied to the power flow above it (which in this case IS bad, because the power flow is going to go all the way up to C106). Thus if C106 is not ON, then Rung 6 is not executing. I think this is the problem.
Please make the above changes and see if it works.
-
Greg:
You are the man! That worked like a charm. Guess I can send back the two new cards that AD RMAd for me!
A couple of questions though. When I tried to but both configuration I-Boxes on the same rung the accept button would push the second ibox to another rung. So now the two ibox configs are on rungs 1 & 2 respectively.
Not sure I understand the power flow concept with respect to the sp1 contact. I get that sp1 is an always on contact. But I didn't follow the rest of your explanation. Seems like something I should understand moving forward.
Again....you are the MAN!
-
Cool! ;D
You wrote, "When I tried to but both configuration I-Boxes on the same rung the accept button would push the second ibox to another rung. So now the two ibox configs are on rungs 1 & 2 respectively."
That's good. I forgot it would do that. As long as they are at the top. Notice how the title of the IBox is bolded and italicized. Generally speaking this means it needs to go at the top of the ladder. Minimally it means it needs to be executed every scan.
You wrote, "Not sure I understand the power flow concept with respect to the sp1 contact. I get that sp1 is an always on contact. But I didn't follow the rest of your explanation. Seems like something I should understand moving forward."
When you connect any output box directly to the left rail (power rail), DirectSOFT will redraw it. Notice the drawings attached and then refer to the following:
(1) Even though the OUT V3000 (Rung 2) is attached to the power rail, it gets redrawn by DirectSOFT to look like (2). So you can see that the OUT V3000 doesn't get automatically executed all the time just because it is attached to the power rail... it depends on C0.
(2) When DirectSOFT redraws the circuit you can now see that the OUT V3000 is dependent upon the power flow through C0.
(3) If you put an intervening NOP instruction (which is similar to what you did), DirectSOFT will not redraw it to connect it. However, it is still functionally equivalent to (2)! So it is quite deceptive to see the OUT V3000 connected directly to the power rail, but it is actually dependent upon C0!
(4) This is also functionally equivalent to (2). The reason-being, the ECOM100 IBox is just a ladder macro. And the first instructions in that IBox are to store the power flow. The last instruction in that IBox is to restore the original power flow. This effectively passes the power flow right around the IBox. Thus whatever the power flow is before the ECOM100 IBox, gets passed through to the rung below. What is above the ECOM100? C0! So, again, it is quite deceptive to see the OUT V3000 connected directly to the power rail and also having an intervening ECOM100 IBox instruction, and yet it is actually still dependent upon C0!
Hope this helps!
-
Thanks Greg! Very thorough explanation. I had no idea that sort of behavior would exist. Good to know!
Again...thanks. Your solution probably saved me two or three days of swapping out cards and trying different configurations to isolate the problem. Which in the end I would never have found any solution.
Cheers!
-
Thanks also Greg. Even though I have been working with the DL line aa long time I didn't know about the NOP or the IBox effect on the power flow. (But then again, I don't use either.)
I would think that re-drawing the situation of the intervening NOP so that all are shown in the same rung would be better (if possible). I have no idea how any type of re-drawing would make the IBox situation clear though.