Jump to content

PM341


star

Recommended Posts

Hi all,

I have made a code that moves the motors by sending the command MR (Move relative position) to the PM341, however, how would i send a squence of movement to the stepper motor. When I look at the at the PM341 user handbook (link below) , i found a command called DS (Define squence). This command can be used but i don't know how i would send it. I have also attached my code.

http://www.mclennan.co.uk/datasheets/techn...1manualissb.pdf

Link to comment

Hey star,

First, you should give me that driver, I want one...

In short send a string of the commands delimited with the 'EOL' character. See attached.

Beyond that, I think there are few things to maybe ask about.

(1) Serial COM in the LV environment - I've attached a documented basic example.

(2) Software Architecture in LabVIEW - There are much simpler ways of accomplishing your tasks with more brevity and robustness

Best of luck. If you are interested in (2) let me know and we can work through it. It shouldn't take too long.

-Justin

Link to comment

Hello Star,

What kind of constraints do you have for your system? The particular function you have found seems to have been very carefully thought out and robustly implemented. As such, it is way complicated :)

If you are simply controlling something in the lab, or perhaps a rp/demo/proof-of-concept then type situation this type of function is unnecessary (and dangerous to use unless you know exactly what its doing).

However if you are controlling a satellite, this may be a different story, and you probably would use nothing less.

Which situation suits your fancy? (Hint: option 'B' takes a lot of work).

-Justin

Link to comment

QUOTE (JustinReina @ Mar 16 2009, 10:21 PM)

Try this. Let me know what questions you have. If the 'queue' idea is a little fuzzy, try looking into 'QSM'.

-Justin

Hi Justin,

Sorry for the late reply and thank for your input. However i couldn't understand your code and how it would be useful for replacing the multi-line list to array of string.vi. Also when i ran the program i received the following error message:

Error-1073807253 occurred at VISA Read in StepperOption.vi

Possible reason:

VISA: (HEX 0xBFFF006B) A framing error occurred during transfer.

Link to comment

Hello star,

The error is because the serial port wasn't configured correctly, check the settings on 'configure port' VI. With regards to the multi-list string function, what function are you trying to accomplish with it? Is it a mechanism to 'log' the previous states?

-Justin

Star,

My apologies, I did not read it correctly. Is that function a mechanism to execute a sequence of states?

-Justin

Link to comment

Cool. Maybe try this. It uses queues to make things a little easier to manage. made a polymorphic vi for 'send' so you can 'queue' up your states to execute.

If you have any questions let me know. If you are interested, maybe scheme up a way to send a sequence of messages (i.e. instead of just sending a data message like it is currently, maybe send a state+data).

-Justin

To configure the serial port, take a peek at the 'simpleserialIO' vi up top. The 'configure port' vi has inputs for com rsrc,baud,data bits,stop bits, etc.

-Justin

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.