01-22-2013 12:21 PM
Hi, I am relatively new to Labview programming. I am working with NI USB 6212. I was wondering if it is possible to create a "dummy" or "virtual" port so I can ultimately create a port line output eg. port0/line16. Basically I want certain bits to go to this line and "do nothing".
Any suggestions would be appreciated.
Thank you,
vk
Solved! Go to Solution.
01-22-2013 12:36 PM
You can created a Simulated DAQ device in Measurement and Automation Explorer.
01-22-2013 12:46 PM
I'm not sure I totally understand. But it sounds like you want to create a simulated DAQmx device through MAX.
Inside of MAX, right-click the "Devices and Interfaces" and select "Create New...". From there you can create a simulated device of any type that DAQmx knows.
01-22-2013 03:00 PM - edited 01-22-2013 03:01 PM
There are a few ways to approach this and how you will use this "virtual Port" is one of the choices between methods.
The simplest is to create a simulated USB 6212:
From Max select devices and interfaces
Right click >> Create New>>Simulated DAQmx device or Modular instrument
Expand +M Series DAQ and select NI USB 6212.
You will be able to create tasks channels scales etc... that are appropriate for a NI USB 6212 the DAQmx assistant will treat it as if it were real and you can try out the task and, LabVIEW code calling a task on a simulated device will run just fine.
The Down side is when you actually get hardware its often difficult to retarget the Tasks to use the real device (No option to send task to.. no option to swap device with....) Feel free to Kudos the idea. so you need to edit the task or swap device names and that is not fool-proof.
Another option that I use for my development (And, I code by intention... very seldom having any hardware or simulated devices in my cube)
is to not care about the task configuration until I integrate with hardware. Lets show an example I have in my current project:
With the exception of the task name this exact code is in the project I have open today. This AE completely encapsulates anything I want to do with this Task. Now I have code to drop into my application and can create the task easilly on the target machine. Notice Here.vi? I'll just go through the Project Hierarchy and find all instances. Create the task and TEST IT on the live system. When all instances of here.vi are gone my code is running error free and integrated with the hardware.
[edit] that's what happens with a three hour interruption while replying. Tim beats you to it
01-23-2013 06:57 AM
Jeff·Þ·Bohrer wrote:[edit] that's what happens with a three hour interruption while replying. Tim beats you to it
Yeah, and Mr. "I'm Going to the Super Bowl" beat me while I was looking for the exact wording for the instructions.
01-23-2013 07:57 AM
Thank you everyone for the suggestions. This helps!
Out of curiosity, is it possible to simulate a virtual or dummy ports on a real device?
Thank you,
vk
01-23-2013 09:00 AM
v-k wrote:Out of curiosity, is it possible to simulate a virtual or dummy ports on a real device?
No. You need to create an entire simulated device.
01-23-2013 09:01 AM
Ok thank you.