Custom NXT-G block help

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
ematson5897
Posts: 9
Joined: 30 Dec 2010, 20:45

Custom NXT-G block help

Post 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.
Attachments
Antenna Sensor.zip
(107.57 KiB) Downloaded 336 times
Screenshot1.JPG
(124.11 KiB) Downloaded 180 times
Last edited by ematson5897 on 06 Jan 2011, 01:52, edited 3 times in total.
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Custom NXT-G block help

Post 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
---> Link to lots of MINDSTORMS stuff under my picture --->
ematson5897
Posts: 9
Joined: 30 Dec 2010, 20:45

Re: Custom NXT-G block help

Post by ematson5897 »

Thank you, I just copied them from a template sensor block
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Custom NXT-G block help

Post by hassenplug »

Go to a sample, copy them, and paste them in.

Or, copy your code into the sample.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
ematson5897
Posts: 9
Joined: 30 Dec 2010, 20:45

Re: Custom NXT-G block help

Post by ematson5897 »

When I try to import it to NXT-G the block is greyed out on the import list
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Custom NXT-G block help

Post by hassenplug »

That means the block is not valid. Make sure all wires are connected, and the block can compile.
---> Link to lots of MINDSTORMS stuff under my picture --->
ematson5897
Posts: 9
Joined: 30 Dec 2010, 20:45

Re: Custom NXT-G block help

Post by ematson5897 »

I tried that, but it is still greyed out. I updated the .zip file with the new files
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Custom NXT-G block help

Post 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
---> Link to lots of MINDSTORMS stuff under my picture --->
ematson5897
Posts: 9
Joined: 30 Dec 2010, 20:45

Re: Custom NXT-G block help

Post by ematson5897 »

What is that? I'm kinda new to labview
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: Custom NXT-G block help

Post 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
---> Link to lots of MINDSTORMS stuff under my picture --->
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests