SICKAG / sick_scan_base

Generic C++ library for SICK laser scanner. Currently we support Windows and Ubuntu 18.04LTS for x86 architectures with this software. Within the demo the gathered data is stored at regular intervals as CSV data and as an image file in JPEG format. The image file shows the scan data in the top view.
Apache License 2.0
21 stars 16 forks source link

Activate stand by #4

Closed javierBarandiaran closed 3 years ago

javierBarandiaran commented 4 years ago

Hello, I am trying to activate the stand by mode for a LMS511 scanner working on Windows 10. I have implemented the method SickScanCommon::ActivateStandBy():

std::vector<unsigned char> reqBinary;
this->convertAscii2BinaryCmd(sopasCmdVec[CMD_SET_ACCESS_MODE_3].c_str(), &reqBinary);
std::vector<unsigned char> replyDummy;
int result = sendSopasAndCheckAnswer(reqBinary, &replyDummy, CMD_SET_ACCESS_MODE_3);      
if (result != 0)          
    return false;
this->convertAscii2BinaryCmd(sopasCmdVec[CMD_ACTIVATE_STANDBY].c_str(), &reqBinary);
result = sendSopasAndCheckAnswer(reqBinary, &replyDummy, CMD_ACTIVATE_STANDBY);
if (result != 0)
    printf("\nSOPAS - Error activating stand by!\n");
else
    printf("\nSOPAS - Stand by activated.\n");
return result;

It correctly sets the scanner in stand by mode because the led turns red and I can check it in SOPAS. However I obtain an error at sendSopasAndCheckAnswer Error Sopas answer mismatch Error acticvating Standby Answer= >>>sSN LMDscandata How can I know if stand by was activated?

michael1309 commented 4 years ago

Hi,

try to set this command sequence a little bit earlier (e.g. after the CMD_SET_ACCESS_MODE already implemented in the startup sequence).

javierBarandiaran commented 4 years ago

Thanks. I want to activate the stand by at the end of the program after scanning some data during a period of time.

rostest commented 3 years ago

Issue is closed due to being inactive. Please feel free to reopen it in case it's still a topic.