LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview velmex

The driver is just clearly written by something that does not program LabVIEW and is not familiar with coding in the dataflow paradigm, using standard sub-vi programming practices and normal documentation techniques. To be clear, this is not an insult. I write mediocre C at best. You can't be a master at everything.

 

Now, on to the meat of it, I rewrote/restructured everything you've written into a library that is documented and conforms to typical LabVIEW programming methodologies. I did this at first in industry because, quite frankly, it was needed to get my stages to perform reliably and with readable, scaleable code. The original code was loaded with race conditions and ambiguous execution and timing. Moreover, the structure just didn't  make sense for writing larger applications. I went on to develop this as a library for release when I used it to code motion applications for customers.

 

The libray is here, for reference. It comes with all sorts of standard applications out of the box: https://www.interfaceinnovations.org/motionproducts.html

 

Now to the OP, I have strongly considered a rewrite using raw serial, but never got around to it because there just wasn't enough demand. All of my apps using the library were black-box executables on Windows machines, so it was unnecessary. 

 

Cheers,

C

 

 

PhD ChemE, CLD, Alliance Partner : www.interfaceinnovations.org
0 Kudos
Message 11 of 52
(2,014 Views)

Hi all,

 

Configuring a new motor controller. I am using a mac so I am sending the command "SetMAmMx" in order to configure my controller. When I type "getMmM" I get the following response: "g?M256 M256" when I should be getting a number between 0-6. The same thing happens when I use "SetMmMx".

 

I want to make sure the controllers are properly configured before I start using the motors. How should I do this?

 

Regards,

Mridu

0 Kudos
Message 12 of 52
(1,960 Views)

The VXM commands are "case sensitive" therefore the correct usage would be "setMAmMx" where the lower-case m is the axis number and the x is the axis setting,

AKA:

 

"setM1M3" would mean "set Axis 1 to use setting 3 (for a PK264 motor)

 

When you get a response something like g?M256  then the ? is the VXM is telling you that you made a syntax error.

0 Kudos
Message 13 of 52
(1,947 Views)

sorry that was a typo on the post itself (I had typed it correctly in the code). I think i forgot "rsm" after that....

 

Now when I "getM1M" in the response I also see"getM1M" but do not see a number between 0-6..?

 

Thanks for your help,

Mridu

0 Kudos
Message 14 of 52
(1,943 Views)

Also in the same manner, when I type "setM2M3, rsm" I get "setM2M3. rsm^" as my response, but when I do getM2M, I instead get "g?M256 M256". 

 

To clarify, this is different from what I got by doing "setM1M4, rsm" --> "setM1M4. rsm^" and then "getM1M" --> "getM1M"

 

Any ideas?

0 Kudos
Message 15 of 52
(1,929 Views)

It all depends on the timing of when you do your read (for instance if you read too quickly then you might see "getM1" and then read again you may see "M3"

 

General rule of thumb is that if you ask for a response then you should wait 100ms to 250ms to read the reply

0 Kudos
Message 16 of 52
(1,924 Views)

I have a 500ms delay before my read. I though this was adequete because I was using this before with some old velemex motos/controller (that had already been configured prior). How do I know if it is safe to use my motors/motor controller and if they are properly configured?

0 Kudos
Message 17 of 52
(1,905 Views)

When you mentioned " I was using this before with some old velemex motos/controller (that had already been configured prior)."

Were they VXM's?

 

If not, then are you using the same communication parameters?

 

 

0 Kudos
Message 18 of 52
(1,882 Views)

I tested some, and you were right; it was a matter of chaging the read time, thank you!

 

Also, do you know what the termination character is for VXM? What I read in the manual said you could use a carriage return, comma, or period, but when I specify the carriage return as my termination character, I get a timeout error..

 

Thanks,

Mridu

0 Kudos
Message 19 of 52
(1,866 Views)

Not all replies have a terminator character

0 Kudos
Message 20 of 52
(1,846 Views)