LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulated Device - Can you View Activity?

I am using a Simulated 6343 Device in MAX.

I have some Digital Output Tasks defined which are called from my program.

My program is happy to use the tasks with the simulated device.

Is is possible to view the state of the simulated Output channels so that I can verify that my signals are really getting through? 

i.e if I set Port_0_0 to On in a task, Is it possible to see the effective output going on and off on a panel status somehow, say in MAX?

 

0 Kudos
Message 1 of 7
(4,589 Views)

OK, I was going to answer that all you needed to do was to use a Simulated Wire to connect the Simulated Output Channel to a Simulated Input Channel, then write a little more code to read the Input Channel and let it monitor the Output Channel (Note -- I often wire my non-simulated USB 600x devices precisely this way if I don't have a signal source or oscilloscope to test AI, AO, DI, or DO lines).

 

But I decided that was too silly, so I was going to see what happens if I drop a simulated USB-6343 on a Block Diagram.  But my installation of MAX 2016 has no such simulated device!  So I guess you'll just have to go with my Simulated Suggestion ...

 

Bob "Figment" Schor

0 Kudos
Message 2 of 7
(4,554 Views)

Hi doogle,

 

Just to avoid confusion: no it is not possible.

Simulated devices are made to allow you debugging your program without the hardware attached, but do not allow you to see the action happen.

 

Also on real devices, what you want is only possible by wiring the output back to an input like Bob described.

 

Andreas

 

Andreas
CLA, CTA
Message 3 of 7
(4,534 Views)

Can you please clarify how I use a simulated wire to connect a simulated output to a simulated input?

The only routing available on my simulated NI USB-6343 seems to be on the "Device Routes" tab which only deals with timer related signals. I can't a "Simulated Wire" option.

I don't know why your MAX does not give you the option for the simulated NI USB-6343, but I looked at the USB-6008 simulated device and that doesn't appear to give you any routing options at all.

Using a non-simulated device I could simply use a voltmeter or a scope to confirm operation.

If I create a task for inputting from a channel that has a task for outputting at the same time, I get an error, or just see the random ons and offs from the simulated input.

0 Kudos
Message 4 of 7
(4,504 Views)

@doogle wrote:

Can you please clarify how I use a simulated wire to connect a simulated output to a simulated input?


You can't.  Bob's sarcasm did not come through very well.

 

A simulated device will only have a sine wave for an analog input and a counting pattern for a digital input.  The outputs are just ignored, but don't throw an error.  You cannot do anything about this.  I recommend you go give this idea a kudo though: Interactive DaqMx simulation interface


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 7
(4,497 Views)

Sorry, the bit about the "simulated wire" was a (bad?) joke.  However, the idea isn't entirely stupid -- I often write code to run a particular device, and when I'm at home with my laptop and want to test the code without the hardware, what do I do?  Well, I have a Boolean "Sim Device" that, if true, "simulates" the device (if I expect a sinusoid, it makes a sinusoid, usually with a little noise thrown in).  I then use a real (well, LabVIEW) wire and take it whereever I need it.  If it's an output device, and the output is supposed to be "Volts", I can create a TypeDef "Volts" (really a Dbl) that I can wire to my sim Input Device (which converts "Volts" back to Dbls, maybe with some timing thrown in, i.e. give me 1000 points at the rate of 1KHz).

 

Bob Schor  

0 Kudos
Message 6 of 7
(4,484 Views)

I was looking for the same capability and your post saved a lot of time looking through documentation.

 

It would be nice to have a simulated real-world side of the simulated instruments...

 

0 Kudos
Message 7 of 7
(3,835 Views)