LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Error -1073807194 When trying to connect to Dynamixel MX-28

This is where those LabVIEW intro courses would really come in handy.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 19
(2,555 Views)

Hi slow,

 

So if you're attempting to control several motors using instances of this code, you will definitely want to take advantage of code modularity. For instance, it would be relatively easy to wrap up the VI you currently have as a subVI in a higher level VI. I would create a top-level VI which calls as many position control subVIs as you need. You can pass the VISA resource name into each subVI, as well as each control input, in order to select which motor each control will address. I've attached a short tutorial on the use of subVIs in organizing and modularizing your code.

 

http://www.ni.com/white-paper/7593/en

 

You will also want to be very careful in setting up the connector pane for your subVI, as this will dictate the nodes with which you pass the VISA resource name/control input etc.

 

I hope this helps!

 

Andy C.

Applications Engineer

National Instruments 

0 Kudos
Message 12 of 19
(2,551 Views)

Andy,

That was actually going to be the next thing I tried to figure out. If use the "Dynamixel Initalize" and "VISA resource name" blocks "out" and then wrap everytihng else in a sub-VI, would that be the best way to go?
My reasoning is that I only need to initialize the connection once... not every time I pass data to it.

0 Kudos
Message 13 of 19
(2,542 Views)

@slow wrote:

Andy,

That was actually going to be the next thing I tried to figure out. If use the "Dynamixel Initalize" and "VISA resource name" blocks "out" and then wrap everytihng else in a sub-VI, would that be the best way to go?
My reasoning is that I only need to initialize the connection once... not every time I pass data to it.


Yay!!!  This reasoning is such a rarity with peopele who are just beginning to use LabVIEW and/or instrumentation control.  After the subVI (or the last subVI in the chain that uses the connection) comes the VISA close.  Keep up the good work.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 19
(2,535 Views)

Thanks for the compliment! (and sorry about not getting back to it sooner...other projects got in the way for a minute)

So, I've run in to a snag with this one. What I'm trying to do is have the servos move continously as the sine wave makes its normal sweep. Right now, I can move the servos in to position manually (using one of the three methods in the block diagram) but when I start the program, the servos move to position and "hold" in one spot... Even when I dial the frequency waaaaay down (of servo 5 for example).

I expected the servo to update position once every loop... and therefor move to a different spot along the sine wave (and hopefully a "smooth" fashion).  But this isn't happening. As soon as I set the frequency, the servo seems to hold position (although, I admit, it may just be moving to a slightly different angle that is too close to see or updating too quickly to actually move).

Any suggestions?

Also, why would I need to "close" the servo as mentioned above? What does that do?

0 Kudos
Message 15 of 19
(2,519 Views)

ZANG!

With a little help from a friend (thanks Mr. NI-Support Engineer... sorry, forgot his name)... figured out that using the NI Sine Waveform VI makes it function as expected.

No idea why this works though...

0 Kudos
Message 16 of 19
(2,513 Views)

@slow wrote:

ZANG!

With a little help from a friend (thanks Mr. NI-Support Engineer... sorry, forgot his name)... figured out that using the NI Sine Waveform VI makes it function as expected.

No idea why this works though...


They are smart!  And chances are, the compliment will find its way to the proper person, since they probably hang out here anyways.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 17 of 19
(2,501 Views)

Any idea why the sine waveform worked vs. sine wave generator that I had in there?

That seems.... odd to me.

0 Kudos
Message 18 of 19
(2,494 Views)

Hi slow,

 

The project is looking good--glad you've been able to get it working!

 

So the Sine Wave Generator is producing a waveform but is outputting the waveform as an array of doubles. You had then converted this array into a dynamic data type and passed this into an Express VI. Dynamic data is data which can only be read by an Express VI.

 

If you notice in your code, a small red dot was added where you had wired this dynamic data coming from the sine wave generator into your 'MX28 Single Servo Position' VI. This is called a coercion dot and indicates that LabVIEW needed to automatically perform some sort of data conversion at this node. It's likely that moving from an array to a dynamic data type and attempting to use this data without an Express VI resulted in the incorrect behavior.

 

The NI engineer gave good advice on using the Sine Waveform VI. The waveform data type is much more robust than trying to hook up dynamic data with Express VIs. Express VIs are useful for simple tasks but tend to slow down more complicated applications.

 

Also, I noticed that your VI's front panel was a bit cluttered on my machine. This may be not be an issue in your environment, but note that overlapping controls and indicators on your front panel will significantly increase processing time and reduce the efficiency of your VI--just something to note if you ever run into any performance issues.

 

I hope this info helps, good luck with the project!

 

Andy C.

Applications Engineering

National Instruments

0 Kudos
Message 19 of 19
(2,479 Views)