About Direction of Y-stage in Stage Control Plugin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

About Direction of Y-stage in Stage Control Plugin

Duong Quang Anh
Dear MM-Community

We developed the device adapter ChuoSeiki_QT to use Micro-Manager with our QT controller.
And recently we figure out a problem in "Stage Control" plugin.

The problem is that the Y-stage direction is incorrect:
- When we click the "up-arrows", the Y-stage moves to the "minus" direction, and it moves to "plus" direction if click the "down-arrows".
   I think it should move "plus" with "up-arrows".

   X-stage control works fine.  (click "right" for "plus" direction, and click "left" for "minus")
   The others such as the "stage display" plugin or "multi-D Acq." function works fine.

- We try to solve this problem by changing the sign of y-value in "SetRelativePositionSteps" function. (y = -y)
   Then the Y-direction is reversed.
   
   However, the coordinate display on the main dialog become incorrect.
   Coordinate displays in "stage display" plugin or in "multi-D Acq." are still correct.

I think that to change the sign of y-value is not a good solution for this case.
So is there any better method to reverse the axis direction in the "Stage control" plugin?

my code for SetRelativePositionSteps:

int ChuoSeikiXYStage::SetRelativePositionSteps(long x, long y)
{
        std::ostringstream command;
        int ret;
        string answer;

        PurgeComPort(portName_XY.c_str());

        long re_X = x;
        long re_Y = -y;      
        //  in previous I used x,y directly for bellow command

        //Relative (step) Move Command
        command << "MGO:"<< controllerAxisX_ << re_X << controllerAxisY_ << re_Y;
        ret = SendSerialCommand(portName_XY.c_str(), command.str().c_str(), "\r\n");

        // Check error
        if (ret != DEVICE_OK)
                return ret;

        ret = GetSerialAnswer(portName_XY.c_str(), "\r\n", answer);
        if (ret != DEVICE_OK)
                return ret;

        ret = ConfirmAnswer(answer);
        if (ret != DEVICE_OK)
                return ret;

        return DEVICE_OK;

}

Best Regards,
DUONG Quang Anh

Chuo Precision Industrial Co.,LTD.
Technical Derpartment
1-7-8, Uchi-kanda, Chiyoda-ku, Tokyo, 101-0047, Japan
Phone: +81-3-5281-8691
Cellphone:  (Japanese code: 0081) 080 - 4204 - 1608
E-mail: [hidden email]  or: [hidden email]
[hidden email]



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: About Direction of Y-stage in Stage Control Plugin

Stuurman, Nico
Hi Duong Quang Anh,


On 1/21/19 1:40 AM, Duong Quang Anh wrote:
> We developed the device adapter ChuoSeiki_QT to use Micro-Manager with
> our QT controller.
> And recently we figure out a problem in "Stage Control" plugin.
>
> The problem is that the Y-stage direction is incorrect:


Did you have a look at:
https://micro-manager.org/wiki/Coordinates_and_Directionality

Let us know if that clarifies expected behavior.

Best,

Nico

_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: About Direction of Y-stage in Stage Control Plugin

Duong Quang Anh
Dear Mr. Nico

Thank you so much for your help.

I read the "Coordinates and Directionality".

It turns out that the definition of positive XY direction is different from our expectation.

In our XYstage design, the positive of X-axis is to the right and positive of the Y-axis is to the top.

In that case, we think we can use the "transpose mirror" in the "Preset setting" to revert the direction of Y or X.

Thank you so much for your help.

DUONG Quang Anh

Chuo Precision Industrial Co.,LTD.
Technical Derpartment
1-7-8, Uchi-kanda, Chiyoda-ku, Tokyo, 101-0047, Japan
Phone: +81-3-5281-8691
Cellphone:  (Japanese code: 0081) 080 - 4204 - 1608
E-mail: [hidden email]  or: [hidden email]
[hidden email]



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general