| | |
| | | // cclink |
| | | if (m_cclink.Connect(CC_LINK_IE_CONTROL_CHANNEL(1)) != 0) { |
| | | LOGE("连接CC-Link失败."); |
| | | return -1; |
| | | } |
| | | else { |
| | | LOGI("连接CC-Link成功."); |
| | |
| | | pEquipment->setName("EFEM(ROBOT)"); |
| | | pEquipment->setDescription("EFEM(ROBOT)."); |
| | | pEquipment->setReadBitBlock(0x4000, 0x45ff); |
| | | pEquipment->setStation(1, 2); |
| | | pEquipment->setStation(0, 255); |
| | | addEquipment(pEquipment); |
| | | |
| | | pEquipment->init(); |
| | | LOGE("已添加“EFEM(ROBOT)”."); |
| | | } |
| | | /* |
| | |
| | | |
| | | int CMaster::term() |
| | | { |
| | | LOGI("<Master>正在结束程序."); |
| | | for (auto item : m_listEquipment) { |
| | | item->term(); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | } |
| | | }; |
| | | pEquipment->setListener(listener); |
| | | pEquipment->setCcLink(&m_cclink); |
| | | m_listEquipment.push_back(pEquipment); |
| | | |
| | | return 0; |
| | |
| | | const StationIdentifier& station = item->getStation(); |
| | | MemoryBlock& block = item->getReadBitBlock(); |
| | | |
| | | int nRet = m_cclink.ReadData2(station, (short)block.type, |
| | | int nRet = m_cclink.ReadData2(station, (DeviceType)block.type, |
| | | block.start, block.size, block.buffer); |
| | | if (0 == nRet) { |
| | | item->onReceiveLBData(block.buffer, block.size); |