Page 1 of 2
Custom NXT-G block help
Posted: 30 Dec 2010, 20:48
by ematson5897
I tried making a NXT-G block for a sensor that I made, but when I imported it, the sensor block and its loop, wait, and switch blocks would look weird. (see attached picture) I have included the files that I imported to NXT-G.
Re: Custom NXT-G block help
Posted: 01 Jan 2011, 17:39
by hassenplug
The problem is that you removed the "Sequence Flow" items from the main .vi, so the sequence beams (in NXT-G) have no place to attach.
Steve
Re: Custom NXT-G block help
Posted: 01 Jan 2011, 18:00
by ematson5897
Thank you, I just copied them from a template sensor block
Re: Custom NXT-G block help
Posted: 01 Jan 2011, 18:08
by hassenplug
Go to a sample, copy them, and paste them in.
Or, copy your code into the sample.
Steve
Re: Custom NXT-G block help
Posted: 01 Jan 2011, 18:11
by ematson5897
When I try to import it to NXT-G the block is greyed out on the import list
Re: Custom NXT-G block help
Posted: 01 Jan 2011, 18:21
by hassenplug
That means the block is not valid. Make sure all wires are connected, and the block can compile.
Re: Custom NXT-G block help
Posted: 02 Jan 2011, 22:13
by ematson5897
I tried that, but it is still greyed out. I updated the .zip file with the new files
Re: Custom NXT-G block help
Posted: 04 Jan 2011, 03:07
by hassenplug
ematson5897 wrote:I tried that, but it is still greyed out. I updated the .zip file with the new files
In that case, I can't tell you why it's grayed out on your computer.
On my computer it's grayed out because it still won't compile. When I try to compile it, it says there's a missing tunnel assignment. You need to look at the false case of the largest case statement.
Steve
Re: Custom NXT-G block help
Posted: 04 Jan 2011, 19:35
by ematson5897
What is that? I'm kinda new to labview
Re: Custom NXT-G block help
Posted: 04 Jan 2011, 21:52
by hassenplug
change the outer most case statement to "false".
On the right, you'll see several wires that are not connected to anything. (large hollow square on the case border)
Something must be connected to them. (default value?)
Steve