Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

BernardG's Content

There have been 18 items by BernardG (Search limited from 14-April 20)


By content type

See this member's

Sort by                Order  

#61739 Serial Port throw a 'System.NotSupportedException' Framework 4.3

Posted by BernardG on 27 February 2015 - 12:23 PM in Netduino Plus 2 (and Netduino Plus 1)

There is no problem, in fact. It was my own dumbness, forgetting to cross RX and TX, which was precluding it to work. As long as one does not try to use the properties Length and Position, everything is just fine.

Thanks, Bernard




#61735 Serial Port throw a 'System.NotSupportedException' Framework 4.3

Posted by BernardG on 26 February 2015 - 08:10 PM in Netduino Plus 2 (and Netduino Plus 1)

Hum, looking on MSDN I find this for Length
https://msdn.microso...(v=vs.102).aspx
and for Position

https://msdn.microso...(v=vs.102).aspx

So, does that mean that I am sh*#&t out of luck with 4.3 and need to go back to a previous version (for now)
Just looking, same for 4.2. 

 

Hum, I see that 4.1 and 4.0 does not have these properties, so it must be working.

Any other idea/workaround?

Did someone use SerialPort with 4.3?

Thanks,

 

Bernard
 




#61734 Serial Port throw a 'System.NotSupportedException' Framework 4.3

Posted by BernardG on 26 February 2015 - 07:50 PM in Netduino Plus 2 (and Netduino Plus 1)

At first I thought it was me, that I forgot something.
So I downloaded SerialPortLearn.zip, from Hari Wiguna found here: http://forums.netdui...rt-code-review/

 

and I get "serialPort.Position' threw an exception of type 'System.NotSupportedException' long {System.NotSupportedException}" for Both position and length property.

BTW, this is thrown directly in the constructor for SerialPort.

Is there another assembly than System.IO.Ports that I should reference for SerialPort ?

Thanks for your help, guys, this is really blocking a project on which I need to move on.

Bernard

 



#59566 Did I fry it, or not ? (Netduino Plus 1)

Posted by BernardG on 05 August 2014 - 03:45 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks Chris, he is alive and well! I re-installed everything with SAM-BA first, then MFDeploy. Very cool, I need it to test small parts of my larger CNC project, before merging, and was afraid to not be able to use it anymore.

I am a happy camper now, thanks!

Bernard




#59565 Did I fry it, or not ? (Netduino Plus 1)

Posted by BernardG on 05 August 2014 - 03:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Bernard,

Your board will probably survive the 5V erase. But it's not in bootloader mode.

Do you have Atmel SAM-BA installed? When you plug the board in, does it show up as an Atmel MCU in Device Manager?

Chris

 

Hi Chris,

Thanks for your answer. Yes, I have it. It looks like it sees it as "at91sam7x512-ek". And it read "stuff" from memory.

Bernard



 




#59559 Did I fry it, or not ? (Netduino Plus 1)

Posted by BernardG on 05 August 2014 - 09:29 AM in Netduino Plus 2 (and Netduino Plus 1)

.At some point I needed to re-flash the Tinyboot loader on my old faithful Plus1. I believe that, I was on the 5 volts pin (Should have put my glasses on!) instead of the 3.3 when I touched the little gold pad in front of Digital 0.

Anyway, since then, when I power it, the blue Led stays on and it does not communicate with the PC.
Is there anything I could do to revive it, or is it definitely dead?

 

Thanks for your help,

Bernard.




#59293 My Netduino CNC Machine

Posted by BernardG on 18 July 2014 - 10:21 AM in Project Showcase

Great job Bernard, I never thought about making the program internationally safe. So I'm glad you found the trouble.

Make sense, Darrin, no worries! It's just that this kind of difficulty is far from being obvious!

I will also need to look at inches versus millimeters; I saw there is a GCode command to switch between the 2, which is good, but I have to make it do "something", which is another story.... :-)

 

Anyway, thanks for your code and support, it's a fantastic help to get into Netduino CNC.




#59192 My Netduino CNC Machine

Posted by BernardG on 13 July 2014 - 03:04 PM in Project Showcase

Hi All,

Here are the last news. As I said earlier, I had a problem with executing a GCode file. Being new to CNC, GCode, everything, I was quite lost, so it took me a while to figure out what was going on.

 

Part of the problem might be due to .Net 4.5 being a little less tolerant in some cases.

 

Anyway, the root of the problem was that, on CamUI side, in GCodeBlock.cs, the line 

 if (!double.TryParse(wordValue, out value)) value = 0;

was systematically returning 0 (ZERO)! So, quite obviously, if thre was nothing to do; commands were not sent to the Netduino.

 

Changing this line to be 

if (!double.TryParse(wordValue,NumberStyles.AllowDecimalPoint,CultureInfo.InvariantCulture, out value))
 value = 0;

made almost all the difference, as now I was actually getting values instead of zeroes.

 

Maybe this does not affect you if you are in the US, but in other parts of the world, where decimals symbols are commas, tryparse returns an error, as it take by default the current culture.

 

Another modification I needed to make, as the method parsing file lines into Gcode blocks relay on spaces separating coordinates, and they not always there in a Gcode file line, was to start by parsing the line to ADD a space in front of each letter, so that the line would be parsed properly.

// Seems I have a problem here as there is not always a space to separate coordinates after a G (or other code).
            // I need to find as way to add a space, otherwise I can't count on this being reliable
            char[] allWords = blockLine.ToCharArray();           
            var newBlocks = new List<GCodeBlock>();
            var newBlock = new GCodeBlock();         
            string tempString = "";
            //add a space in front of each letter
            foreach (char letter in allWords)
            {
                if (Char.IsLetter(letter))
                {                   
                    tempString = tempString + " " + letter.ToString(CultureInfo.InvariantCulture);
                }
                else
                {                    
                    tempString += letter.ToString(CultureInfo.InvariantCulture);
                }
            }

            tempString = tempString.Trim();
            var words = tempString.ToUpper().Split(' ');

i hope this can be useful to some others using Darin's code.

I am not done, yet (far from it), but I feel today was a good step.




#58963 SecretLabs NETMF API Documentation

Posted by BernardG on 30 June 2014 - 08:45 PM in General Discussion

I need some help to go from SecretLab to Microsoft.SPOT.

 

For example, what would be the equivalent of AnalogInput.SetRange with MS SPOT.AnalogInput?

Also, what would be the pin to use for the Inboard Led? (No big deal, though)

 

Thanks,

Bernard.




#58951 My Netduino CNC Machine

Posted by BernardG on 29 June 2014 - 08:37 PM in Project Showcase

Hi Darrin,

if you are around, I sent you a private message. 

thanks in advance,

Bernard




#58938 SecretLabs NETMF API Documentation

Posted by BernardG on 28 June 2014 - 04:29 PM in General Discussion

HAAAAA! :-)

OK, thanks. I guess I did not read properly about the upgrade. I am in fact using 4.3 with VS 2013. I feel like I am living in luxury.... :-)

So I don't have to worry about SecretLabs classes anymore. 

 

Thanks,

Bernard




#58900 SecretLabs NETMF API Documentation

Posted by BernardG on 26 June 2014 - 09:17 AM in General Discussion

Hi Everyone,

 

As the caption imply, I am wondering where I could find a documentation on SecretLabs NETMF Assemblies?

 

As usual, there is an extensive documentation on Microsoft MSDN for Netmf, but so far I have not been able to find a documentation for SecretLabs. I guess sometimes it's the very same functions, but it would be good to at least know when to use which.

 

Thanks for your help,

Bernard

 




#58752 My Netduino CNC Machine

Posted by BernardG on 17 June 2014 - 10:02 AM in Project Showcase

Here is a little video of my first experiments

 

 

 




#58751 My Netduino CNC Machine

Posted by BernardG on 17 June 2014 - 08:07 AM in Project Showcase

Ps to previous reply:

I forgot to say that if I send positions manually (Working positions X, Y, Z, button Goto), it works perfectly, so the problem is not communication between DazCamUI and DazCam in the Netduino.




#58750 My Netduino CNC Machine

Posted by BernardG on 17 June 2014 - 08:02 AM in Project Showcase

Hi Darrin,

 

I'll do my best to post some pics and videos as I progress.

 

About the commands.txt file, when I open the test.nc file in DazCamUI and click to run it, everything looks normal, I see the parser counting the number of lines parsed (in the bottom left part of the window frame), and the positions log being updated, but the file itself, on the sd card, contain only one line: IgnoreLimits:1/StepEnable:1/StepEnable:0/IgnoreLimits:0, and the file/commands is not executed.

 

It looks like it is not sent to the Netduino.

 

I am on a Netduino + 2, and .Net Micro Framework 4.3, so there might be some small changes creating a problem here, I don't know. I will look at this through the debugger. Working on the Netduino with VS 2013 is just so cool....

 

By the way, I hope you don't mind, but I intend to port (once I am sure everything works OK) DazCamUI to WPF. I am more familiar with WPF than windows forms, and it might allow for more flexibility.

 

As always, the lacking ingredient is time....

 

Thanks for your answer about wiring the grounds.




#58727 My Netduino CNC Machine

Posted by BernardG on 15 June 2014 - 03:25 PM in Project Showcase

I have my test wiring almost done. I don't have Joysticks for now. I ordered a couple, and will wiring them at that time. I don't have limit switches either, as I don't see the point on a test setting like this, but will put them on the actual machine, of course.

It looks like everything is working ok, but for some reason, parsed GCode is not written to Commands.txt, only the parameter line is.

Anyway, here are a couple of pictures:

 

WP_20140615_002-1024x575.jpg

 

WP_20140615_001-1024x575.jpg

 

I have a few questions to John Cutburth, as I have seen his Fritzing wiring diagram:

 

-1- I noticed the Duino and 24V power supply grounds are connected. Is it better/required to do this? For now I am a 12V from a computer power supply source, but for the machine I will certainly use 24 Volts.

-2- I see the electrolytic capacitors recommended on the Pololu diagram, which I don't have yet, but I also see "something" (capacitor, also?) on the Netduino Power supply to the Pololu. In the same time, I see the "Enable" pin wired to the netduino plus power supply with a (if I am not wrong) 10K resistor.

 

766px-John%27s_Circuit_Diagram.jpg

 

As I am very much discovering electronics (programming is more my thing), could please explain this to me. I am sure it will be useful to others as well.

Thanks!




#58714 My Netduino CNC Machine

Posted by BernardG on 14 June 2014 - 03:06 PM in Project Showcase

 

Jog refers to manually "jogging" or moving the Axes. I wired those to a 2 axis variable resistor joystick that I use to move the router around and position it. You can skip this part of the wiring, but it is pretty convenient to have. If you don't have a joystick, you could connect those to 2 potentiometers.

 

The same goes for speed override. I actually never implemented that in the software, so I'd skip that for now.

 

The limit switches are pretty simple, and you can have 1 or 2 per Axis (for Min and Max travel). If you wire 2, wire them in parallel on the same pin for each axis. This means you only need 3 pins instead of 6, since the software knows which way the axis is travelling it can assume which of the two switches was tripped if the circuit closes.

 

I hope that helps. Please keep us posted with pics and videos of your progress, we'd love to see how you go!

 

Thanks very much for your answer, Darrin.

That makes it much clearer, and yes, I will post some pics and videos as I go along.

 




#58639 My Netduino CNC Machine

Posted by BernardG on 08 June 2014 - 02:30 PM in Project Showcase

Hi Darrin,

First, thanks for a great project and a great way to make possible what has just been a dream for me for a number of years.
Finally, I am able to start my own project. So far, I just plugged my Netduino Plus 2 to a Pololu A49888 controller, and a Nema17 motor to the Pololu, and after a few problems mostly due to a bad breadboard (no or bad contacts), I finally was able to spin my motor with some quick and dirty code. Great first step!

 

So my next step is to wire everything on a breadboard, and make it work, before starting to cut wood (I mean, MDF) to actually build my machine.

 

It's about this wiring it all that I have a couple of questions for you:

I am not sure what "Jog" is, and what should be wired to Jog X, Y and Z. ?
Same for Speed Override. In your description (but I know pins have changed now), you indicate A3, speed override (%). But I don't see what would be matching this on the A4988 ???

 

I will certainly not wire any limit switch until the machine starts to exists, but I would like to be sure I understand and make work all the software/electronics before going further.

For those who might be interested, as soon as I have all the circuitry completed and working, I will have a Fritz drawing available for those interested. It help me so much to see better what I am doing, maybe it could help a few others too.

Thanks for you help, Darrin, as well as all others in this discussion.





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.