Endeavour mission specialist Chris Cassidy works outside of the International Space Station to replace a set of old solar array batteries during the third spacewalk of STS-127 on July 22, 2009.

Thisstory was updated at 9:15 p.m. EDT.

Twospacewalking astronauts replaced some of the oldest batteries on theInternational Space Station Wednesday, but a spacesuit glitch forced them tocut their orbital work short when it caused slightly elevated carbon dioxidelevels.

AstronautsDave Wolf and Chris Cassidy hoped to replace four of the station?s six oldestbatteries during their nearly six-hour spacewalk. They were plowing through thetricky task when the glitch in the air-scrubbing gear in Cassidy'sspacesuit forced them to end early.

At no pointwas Cassidy in danger, but once flight controllers noticed the elevated carbondioxide levels in his spacesuit they decided to call off the spacewalk?sremaining tasks as a precaution. He immediately headed back to the station?sairlock to wait for Wolf.

?I guesswe?re getting off early today,? Wolf said.

Spacesuithiccup

NASA saidthe problem appeared to be an issue with the air scrubbing filter in Cassidy?sspacesuit, not overexertion, and the astronaut did not feel any ill effectsfrom the higher-than-normal carbon dioxide levels.

Thoselevels never increased beyond NASA?s acceptable limits for the space station orshuttle, mission managers said. Even so, the faulty filter will be returned toEarth to find out what went wrong, they added.

?Certainly,folks are very interested in understanding the root cause of the signature thatwe saw today,? lead space station flight director Holly Ridings told reporterslate Wednesday.

Wolf andCassidy left their battery replacement job only half finished, with two newbatteries successfully installed. The rest will have to wait for the mission?snext spacewalk on Friday.

Wednesday?sspacewalk was the third of fiveexcursions planned while NASA?s shuttle Endeavour is docked at the spacestation. The next one is set for Friday and also includes battery replacementchores.

?You didgreat out there,? astronaut Tim Kopra told the spacewalkers after their work.

Wolf andCassidy spent five hours and 59 minutes toiling outside the station as it flew220 miles (354 km) above Earth. They had hoped to work on the batteries for atleast 6 1/2 hours.

Vitalbattery swap

The spacestation?s batteries are vital because they store the power generated by its expansivesolar wings when the outpost flies over the Earth?s night side. Thebatteries in the solar wings at the very edge of the station?s left side havebeen in space since 2000, longer than any others on the outpost, so NASA wantedto change them before they died.

It wastricky work, with Wolf and Cassidy working at the port side edge of the spacestation?s backbone-like main truss, which is as long as an American footballfield. They had to perform a carefully choreographed shell game to remove theold batteries, move them by hand between the station?s edge and the tip of itsoutstretched robotic arm, and then make the return trip with the new batteries.

?I don?twant to make one false move here,? Wolf said during the first battery swap.

Eachbattery weighs about 367 pounds (166 kg) and is about the size of arefrigerator, the astronauts have said. They are designed to last 6 1/2 years.The ones being replaced by Endeavour astronauts have been in use on the stationfor nine years.

Beforetackling the tough battery swap out, Wolf and Cassidy took care of some minorchores.

Thespacewalkers removed four insulation covers from Japanese experiments that willbe moved to the station?s new porch attached to Japan?s $1billion Kibo laboratory. Cassidy tossed three of the covers overboard andpacked the fourth for the return trip home.

Theastronauts also finished adding some insulation around power lines that allowvisiting shuttles to plug into the station?s power grid.

Wednesday?sorbital work marked the seventh career spacewalk for Wolf, who ended with 41hours and 57 minutes of total spacewalking time. It was Cassidy?s firstspacewalk, though he will venture back out on Friday and Monday with crewmateTom Marshburn on the last two excursions.

Endeavour?sseven-astronaut crew is in the middle of a 16-day construction mission todeliver the station?snew porch, some spare parts and a new crewmember. The astronauts are slatedto move the trio of Japanese experiments to the station?s new porch onThursday.

Endeavouris slated to undock from the space station next week and return to Earth July31.

Video - Almost Done: The International Space Station

Image Gallery - Shuttle Endeavour Blasts Off at Night

SPACE.com Video Show - ISS: Foothold on Forever

SPACE.comis providing continuous coverage of STS-127 with reporter Clara Moskowitz andsenior editor Tariq Malik in New York. Click here for missionupdates and SPACE.com's live NASA TV video feed.