LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C NXT block modifications / new block supporting RS485 interface port 4

Hello
 
1. Has anyone tried to modify the published I2C  read and write NXT blocks so that they can support the full 16 byte buffers available in the NXT firmware.  Many I2C interface applications require more than reading or writing one byte at a time.
Even the Ultrasonic sensor has some multi byte parameters that could be accessed.
 
It would appear that one only has to provide access to the buffer element contained within the lower level VI's in the current solution, but being a newbie   i have not been able to successfully make these buffers available on the main front panel.
 
2. Has anyone created a NXT block that allows access to the RS485  port 4 hardware.  I see that no one had responded to an earlier post concerning this solution. I have seen  example  NXC code,  but i was looking for an NXT block implementation.
 
3. Is there a tutorial that explains technique's for developing and debugging a NXT block for use on the NXT ?
I have read thru the pdf  tech docs and have followed the examples, but i still find it difficult to understand how one goes about createing, testing, debugging the application before creating a block for the NXT.
 
I am obviously missing some important points about Labview development for NXT.  I have a lot of experience developing embedded applications with C, but this is the first time i have tried to do anything with Labview especially with the Lego NXT as the Target device.
 
I want to create NXT blocks for some homebrew sensors that i have created. I need full access to the I2C and RS485 support in the NXT.
 
Can anyone suggest ways one should go about createing, debugging, this type of sensor interface block for the NXT.
 
Thanks
 
KC
 
 
0 Kudos
Message 1 of 6
(10,358 Views)

Hi

> 64 views and zero responses ... Have i asked improper questions ?  or may be too many questions in one post ?

Were my questions, too vague or do they just require too much time to create a response ?

Is there another location/forum where i can ask questions concerning details about using Labview Toolkit and NXT regarding low level sensor interfaceing with I2C and RS485 ?

I really would like to learn how to implement the items i mentioned in the first post, and would like to find a place to ask for help.

Thanks

KC

0 Kudos
Message 2 of 6
(10,294 Views)
Yes: there are so many questions in your post that it is difficult to build an answer...

I surely can not help you with the problem of multiple bytes.

This is an answer to your question about rs485 in NXT-G:
http://forums.nxtasy.org/index.php?s=&showtopic=1676&view=findpost&p=13530

I don't know if you have already studied the i2c-related pages in:
http://www.tau.ac.il/~stoledo/lego/

this too is an example which can be study both for i2c interfacing and NXT-G block preparation:
http://www.extremenxt.com/tda8444.html

finally the block from mindsensors' PCF8574-NX kit could be useful (I mean: look at the vi's):
http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=37
and maybe among the blocks they've prepared for their sensors:
http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=45&MMN_position=12:12
you could learn something.

I agree with you that the tutorial about building NXT-G blocks with Labview is too short;
some lessons can be learnt from the NXT-G blocks done by others (spying the vi's they wrote): you find many of them in nxtasy.org repository.

Some advanced techniques are reported in
http://nxtasy.org/2007/04/12/advanced-nxt-g-block-techniques-part-iv/
and other pages of nxtasy.org.


0 Kudos
Message 3 of 6
(10,287 Views)

Hello lucasca

Thanks for takeing the time to answer.

I had not seen all of the links that you refer to, so i gained some good information.

I find it strange that the there is no possible  way to develop a NXT G block  to access the RS485.

I have tried the solutions with other languages, and they work, but i would like a NXT G block.

I already have implemented what i want using other languages for I2C, but again, i would like a NXT G block.

The mindstorm I2C blocks are the vi's that i have been trying to modify to implement the multi byte reads and writes.

And as you mentioned, it sure would be nice if someone expert in labview, could create a screencast showing how to develop and debug a NXT G block . And using the I2C multibyte interface as an example would be great 🙂

There must be a recomended process to go from concept to block diagrams to front panels to debugging to deploying on the NXT.

I have gone thru the pdf docs and followed the examples, but still must be missing an important step in the development process.

Because when i try to do something like low level I2C, i do not see a good way to debug or simulate execution.

Thanks again for the links, ill keep plugging away.

KC

 

0 Kudos
Message 4 of 6
(10,267 Views)
I have built several NXT-G blocks, but I certainly don't consider myself an expert.
 
Unfortunately, I have not found any way to test the blocks short of importing them into NXT-G.  (You can show errors in LabVIEW, which will at least make sure the block will import into NXT-G.)
 
I suggest you start with something easier, like making your own Motor block.  That will make it easier to get used to the relationship between the config.vi and the sub.vi's and to make sure you have that figured out.
 
I think part of the reason for the deafening silence is that a lot of us have questions that none of us knows the answer to.  While it would be nice to have an enhanced basic tutorial, what I really find missing is a technical reference manual, ie. my last "no response" question about exactly how port semaphores work.
0 Kudos
Message 5 of 6
(10,240 Views)
Indeed it would help a lot if there was some more about how to debug and edit exsisting blocks..

I'm no expert either..  Tryed to redesign the TDA8444 block. But somehow the main.vi tryes tho load the old files.. while everything is renamed.. So were is that link to the old files..

I need a block that can send 4 values..  Adres, X value, Y value, Z value

Also need to make a different block that is more tricky.

Adres, X value, Y value, Startcondition again, Adres (now read mode), recieve data.

This is pretty difficult. But i can't find another way to do this.

Daniel Wittenaar

Daniel Wittenaar
Hardware Developer
0 Kudos
Message 6 of 6
(10,043 Views)