01-05-2015 04:18 AM
Hi.
I am working with Virtualbench. I want to program the IO's to four input and four outputs. I have tried to watch the example given by NI at:
http://www.ni.com/example/52071/en/
I have tested the example and from how I can see, it works as it defines all io's as output. If I apply any voltage to the inputs, the input Array Indicators does not change. If I remove the Virtualbench.dig.Write.vi in the program, the input array indicators is capable of seeing changes applied to the input channels. However, then all IO's are defined as inputs. I would like to have the inputs defined as above. Is this not possible?
\Morten
Solved! Go to Solution.
01-05-2015 07:38 AM
With that example, try changing the "output lines" to only the lines you want to use as outputs (for example, "dig/4:7"). The Dig Write.vi will set the direction of the lines specified "Lines" parameter to be outputs.
01-05-2015 08:07 AM
Hi Brandon.
Thanks for your reply. Alread tried that. (seemed obvious:-) I get this error doing that:
Error -375904 occurred at VirtualBench.lvlib:Dig Write.vi:3220001
Possible reason(s): NI-VirtualBench: Number of lines to write doesn't match the provided data.
I type in this string in output lines: VirtualBench/dig/4:7
and in input lines: VirtualBench/dig/0:3
Any other idears...
\Morten.
01-05-2015 08:14 AM
You'll need to write an array of size 4 instead of an array of size 8. In the example, the front panel control is an array of size 8 in order to work with the default "dig/0:7" setting.
On the front panel "Output Array Control", you can use "Data Operations→Delete Element" from the right-click menu to remove four of the controls.
01-05-2015 08:25 AM - edited 01-05-2015 08:28 AM
These things I believe i have played arround with... I still cannot make i work... Attached is edited project. Mabye you can have a look.
\Morten
01-05-2015 08:27 AM
Sorry...
Forgot to make current settings to default. Attached once again...
01-05-2015 08:39 AM
Hi.
I got it to work. After deleting the array it needs to me 'activated' once again. This is done by clicking on the MSB or clicking on every button in the array. Why is this?
\Morten.
01-05-2015 08:45 AM
@morten.munch wrote:
Hi.
I got it to work. After deleting the array it needs to me 'activated' once again. This is done by clicking on the MSB or clicking on every button in the array. Why is this?
\Morten.
Beecause the default is an empty array. Once you have it with 4 elements, save that value as the default (right-click on the array, Data Operations->Save Value As Default).
07-24-2015 10:26 AM
I have a write wired to a read and am just trying to have the virtual bench mimic itself.
When I run the program i get: Error -375904 occurred at VirtualBench.lvlib:Dig Write.vi:3220001 Number of lines to write doesn't match the provided data.
I dont understand what is wrong. Also when i select a line on my virtual bench in the example project I get the same error.
07-24-2015 10:30 AM - edited 07-24-2015 10:32 AM