NXC: import NXT-G blocks into NXC code?
NXC: import NXT-G blocks into NXC code?
hi,
is it possible to import NXT-G blocks into NXC code and use their built-in functionality via input pins and output pins e.g. like variables passed to a NXC function?
is it possible to import NXT-G blocks into NXC code and use their built-in functionality via input pins and output pins e.g. like variables passed to a NXC function?
Re: NXC: import NXT-G blocks into NXC code?
Not unless you look at how they work internally and code an NXC equivalent yourself. Not all blocks can be viewed in LabView without a password.
You can download a student version of LV for free and try it yourself.
- Xander
You can download a student version of LV for free and try it yourself.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC: import NXT-G blocks into NXC code?
[T]oo complicated. I wanted to use the block "as a black box", included like an #include function or library.
But I meant NXT-G, not Labview. Anyway, probably it's the same.
Nevertheless, it would be a great thing if would be possible though...
But I meant NXT-G, not Labview. Anyway, probably it's the same.
Nevertheless, it would be a great thing if would be possible though...
Re: NXC: import NXT-G blocks into NXC code?
The problem is that the LV compiler used to make the RXEs is not open source, so it wouldn't be possible to integrate with NXC.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: NXC: import NXT-G blocks into NXC code?
One thing I've done with some success is to create a very small NXT-G program that included the block I was interested in (the move block). Compile the program then upload the RXE into BricxCC and by some careful detective work you can figure out the exact section of code that relates to the block. Then by repeating the procedure while changing various parameters on the configuration panel of the block (just one at a time!) it was possible to determine which NBC variables are being used to pass those parameters to the 'block'. With all that done I did some global renaming of the variables, then cut and pasted the relevant NBC code to create an NXC function.doc-helmut wrote:hi,
is it possible to import NXT-G blocks into NXC code and use their built-in functionality via input pins and output pins e.g. like variables passed to a NXC function?
This was not trivial by any means, but it was a fun exercise.
Ron.
Re: NXC: import NXT-G blocks into NXC code?
reverse engineering, eh?
Edited by Mightor: This troll has been banned for a day.
Edited by Mightor: This troll has been banned for a day.
Re: NXC: import NXT-G blocks into NXC code?
haha, lets formulate it differently:
do you think you can reversely engineer an I²C block with "multiple functionality"?
do you think you can reversely engineer an I²C block with "multiple functionality"?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: import NXT-G blocks into NXC code?
Well, you seem to have ruled out programming errors, so are you looking for timing issues? I think you would have a much easier time finding it in ROBOTC, than in NXT-G (I think it would have to be the education version). It is supported by ROBOTC, isn't it? Why don't you look at how the drivers are made, and attempt to translate them into NXC (or NBC if you like really low level stuff, like what it would take to translate the NXT-G code)?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NXC: import NXT-G blocks into NXC code?
ROBOTC support is in the actual firmware, so the drivers are exposed through the same motor*[] arrays and functions. You would still need a protocol analyser.
- Xander
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NXC: import NXT-G blocks into NXC code?
Ah, okay. Is the FW open-source?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests