11-12-2018 12:15 PM
What version of LabVIEW do you have?
Downloading snippets isn't as easy as it used to be once the forums did an "upgrade" for images. Now it is an extra step or two to get a valid .png file.
11-12-2018 12:22 PM
I'm using Version 18.0
Could you please just attach the .vi file, seems like I am running in circles when I know we are close to solving the issue. I can figure this out, but I need the snippet vi to work.
I recreated your code based on what I saw in the image, but I'm not sure what the data type is that is being sent to the DAQout express vi. (The purple wires).
11-12-2018 12:31 PM
Attach your VI. It is easier for us to fix what you've started then for us to create something from scratch.
11-12-2018 12:49 PM
Sure, its attached below.
So because I can't figure out what the purple wires should be, I'm using DDT, but the DAQ Out Express VI is not accepting that data, hence the error.
Thanks for the continued help, feel like we're circling in on the solution. Appreciate it.
11-12-2018 12:56 PM
I don't see any purple wires.
GerdW's snippet used the waveform datatype, a brown wire, and he used Build Array to combine them to a 1-D array of waveforms he fed to the DAQ Assistant.
You used Express VI's and they give blue "Dynamic Data Type" wires. You need to use Merge Signals to combine those blue wires into one.
Blue wires are kind of evil because they hide what is really going on underneath them. They often make things easier to connect because things will usually adapt to whatever they need to be to get rid of wiring errors. But you really don't know what is happening, and they'll often adapt to some data type that is not what you really want.
I fixed your VI. See how this works.
11-12-2018 12:57 PM
Hi mm,
when you insist on using ExpressVIs (which you shouldn't) then you need to use JoinSignal instead of BuildArray.
On using my snippet:
1. Left-click the image in my post to start the forum-internal image viewer.
2. Here you will find a download button: downlad the image to your harddrive.
3. Drag&drop the image from your harddrive to your VI block diagram.
Done.
11-12-2018 01:00 PM - edited 11-12-2018 01:01 PM
That's what threw me off. For some reason when I clicked on that image, the download button wasn't there. It actually is. It is the right most box, but the icon is missing.
11-12-2018 01:34 PM
Hi,
This helps. Can you clarify:
The joint signal going into the DAQ output, is it a 2 column array and each column is fed to one of the two output channels? How does this actually work?
Also, I've noticed an on-going issue which is that once the motor begins running, even when I stop the execution (as in no longer generating a signal)! Why does this happen? Once I abort execution, shouldn't the motor lose power and stop running?
11-12-2018 01:49 PM
@mmotiwala wrote:
The joint signal going into the DAQ output, is it a 2 column array and each column is fed to one of the two output channels? How does this actually work?
Two signals on the wire correspond to the 2 channels in your AO task. It is that simple.
@mmotiwala wrote:
Also, I've noticed an on-going issue which is that once the motor begins running, even when I stop the execution (as in no longer generating a signal)! Why does this happen? Once I abort execution, shouldn't the motor lose power and stop running?
You need to stop the AO task. There is an input to the DAQ Assistant to tell it to stop the task. You should also write 0 to the task before stopping it since the DAQ will hold whatever was last written to it.
11-12-2018 01:53 PM
Hi mm,
once the motor begins running, even when I stop the execution (as in no longer generating a signal)! Why does this happen? Once I abort execution, shouldn't the motor lose power and stop running?
All this would be SO MUCH EASIER when you start learning from the example VIs coming with LabVIEW and using plain DAQmx functions!