LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FP o/i sub vi not working

I must warn you this is a very simple vi and I am a beginner

I made a vi that writes and reads a boolean to a FP DO410 the vi works correctly so u made a sub vi out of it and wanted to use it in several locations of the new vi.

A couple of things I found are the
1 it�s not working (or I wouldn�t be crying)
2 if I change the channel name in 1 sub vi the second is also changed (I require channel 0 and channel 1)


if anybody can through me a bone I�d be grateful

happy new-year
Mitchel
0 Kudos
Message 1 of 8
(3,212 Views)
Hi Mitchel,

You did not include your sub-VI so I can only guess.

Two thing I can suggest.

1) modify your sub-VI so you can specify which output you want to act on.

2) Copy your sub-VI to unique name and use one version for one port and the copy for the other port. (wanring: this is an over-simplified suggestion and is not concidered an good aprroach. The only reason I make this suggestion is that you claim to be new at this and I donot want to confuse things tomuch).

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 8
(3,212 Views)
here it is again
i saved with options

thanks for your help
0 Kudos
Message 3 of 8
(3,212 Views)
i'll get this yet
0 Kudos
Message 4 of 8
(3,212 Views)
Why can't I save this correctly?
I have my LabVIEW book out now and guess I�d better read up on this again. I could send you both vi's but there must be a way to just send 1 with the main and the sub vi included. Just looking at the file size I can tell it's not working correctly.
gerrrrr

Please be patient

Mitchel
0 Kudos
Message 5 of 8
(3,212 Views)
well i think i'll just unclude both and continue reading for now.
Download All
0 Kudos
Message 6 of 8
(3,212 Views)
Attached is a ZIP file containing edited versions of your VI.

I have included a control on the sub-VI that allow the main VI to specify which I/O point each call is going to act on.

I have also included some notes in the sub-Vi that recomend breaking up the sub-VI into three parts.

1) Sets up the I/O.
2) Write and read I/O point
3) Close connections to I/O device.

As in my previous posts, these are simplified suggestions. Elegent solutions should be implemented to do this correctly. But, this comes latter.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 8
(3,212 Views)
Added note.

Many of us on this exchange (like myself) are just doing this in our spare time.

That means we can not be counted on to reply regularly or keep up with on-going discusions.

Because of this, I suggests you keep posting new questions instead of keeping old exchanges going. This will get you a maximum number of answers.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(3,212 Views)