LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling a Ludl MAC2002

Hi,

 

I am attempting to control an XY translation stage using the Ludl MAC2002 controller. The module has an  RS232 25 pin out  port and I connected to my Windows PC using the provided 25pin to 9 pin RS232 cable and a RS232 to USB converter cable. The command seems to be written onto the controller because the RS232 LED status turns green whenever the command is sent. However, no response is found and the stage doesn't response according to the command. Has anyone experience with this module before? Any suggestion is really appreciated. 

Download All
0 Kudos
Message 1 of 5
(2,254 Views)

Hi hlmax,

 

Did you read your own device manual? (I don't think so…)

Just on page 1 it lists "Basic rules"! You didn't follow those BASIC RULES: append a CarriageReturn char to your commands!

 

Did you any of those "how to do serial communication?" threads here in the forum? (I don't think so…)

Don't use BytesAtPort! As can be read on page 2 of your manual your device answers with strings using the LineFeed as TermChar! All you need to do is to read an answer of 999 bytes after sending a valid command to your device!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,219 Views)

Hi GerdW,

 

Thank you for your suggestion. I changed the code accordingly and before running the code, I checked the NI MAX to make sure the connection is okay but I also have the same error when reading (writing is okay). I also checked the DIP switch in the controller box and made sure it's 9600 baud rate with low level communication mode (ASCII command). Am I missing something here?

Max1.PNGMax2.PNG

0 Kudos
Message 3 of 5
(2,207 Views)

Hi hlmax,

 

this should be all you need:

check.png

 

Is there any test tool coming with that device? Can you communicate with the device using any kind of Terminal software like HTerm/HyperTerm?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,194 Views)

Thanks a lot for your help GerdW. I tried your code, it also puts out similar timeout error 1073807339 at the VISA Read. I tried the HyperTerm before and it also wrote but no response in read 😕

We will probably move on to hard wire the stage motor with voltage inputs for now but this error is bothering when it should be straightforward.

0 Kudos
Message 5 of 5
(2,178 Views)