Hello Guest it is April 28, 2024, 03:43:43 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Zaae

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »
61
General Mach Discussion / Re: Serial port I/O wizards needed
« on: June 16, 2010, 02:08:12 PM »
Nevermind the post above, I worked out how to stop the DTR pin resetting the basic stamp.

We made a male to female serial adapter with a momentary push button in line with the DTR pin. You have to hold the button down to send the program to the BS2, but the opening / closing of the port that I can't control from within mach doesn't have any effect then.

I know that this info probably isn't really useful to most folks, but I hate finding a post that has a problem just like mine, but the poster doesn't follow up and let people know what worked in the end.  :)

I am still wondering about reading data from the serial port though. I suspect it will end up being something with the modbus, but I don't have time to play with that right now.

The goal of all of this is that the basic stamp allows me 16 extra I/O pins, plus I can enter code into the basic stamp to deal with each pin.

62
General Mach Discussion / Re: Serial port I/O wizards needed
« on: June 16, 2010, 10:28:41 AM »
Also, I've been working with the basic stamp to communicate with mach 3.

This is a very simple version of what I'm working on in the basic stamp code.

Code: [Select]
' {$STAMP BS2}
' {$PBASIC 2.5}

sData VAR Byte
insignal VAR Byte

DO

  SERIN 16, $4054, [sData]   ' 4800 baud
  insignal = sData -48 ' the incoming data is a character decimal value, so -48 to get the true number (not the best way, I'm sure)

TOGGLE insignal

LOOP

STOP


A moderator from the basic stamp forum says:
Quote
The stamps use a signal from the serial port to reset them (I think it is DTR).
You need to make sure that signal stays in the correct state (low I think) otherwise it will reset the stamp.

I need to figure out how to control the serial output from mach3 to keep the basic stamp from resetting after each incoming data being sent.

Sorry this is so short, and lacking in detail, I need to head to town.
Thanks :)
Z

63
General Mach Discussion / Serial port I/O wizards needed
« on: June 15, 2010, 09:23:23 PM »
I've done a lot of reading around here on the topic, but still have questions.  I have a Parallax Basic Stamp here I'm playing with, and I was able to get some simple communications going using an output from a mach3 script:

Call sendserial("test")

This works, but I'm wondering if there's a readserial counterpart, or something similar? I need to read data back from the serial port as well.

I've been fiddling with getfifoentry()  and sendfifo(), but not having any luck getting any communications going with it.

Thanks :)

64
Thanks guys :)

65
Thanks for the help, Hood, I appreciate it.

I read through the post about MachMAD and decided to order it, what's to lose at $10 ?

66
I'll have to look into that, do you think MachMad will still trigger if the LED being watched isn't on the current screen?

Also, why is it, when I read your posts, I read them in my head with a Scottish accent?  :D

67
Also, since the machines are running in the shop, and I'm usually in the office, I run a series of video monitors. I was considering things like, writing to a file when it's time for a blade / program change, current program line, etc. Something that I could read at regular intervals from different pc's on the network to get info about the machines.

68
Sorry, I should have been more clear. I meant to actually run a separate macro file, but to somehow have it triggered by an input going high. Maybe I'm being too conservative when it comes to putting code into the macro pump. I don't have any loops or anything in there, but I'm aware that since that code is run all the time, it could eventually affect performance. I have some code that runs when the digitize signal goes high, but I was hoping to get it out of the macropump code.

69
No problem. I do have another question though, is there a way to trigger a script when an input goes high?

70
Autohotkey is a freebie macro program I've come to love. All it does is restart mach, but it takes care of the "are you sure?" menu, the restart, and the profile choice screen at the beginning. Still have to wait for mach to restart though.

Even so, Autohotkey is worth looking into for people who like to automate things, and aren't afraid of code. Everything it does is scripted, but it's extremely flexible, and can interact with most windows forms without the messy automated mouse clicking strategy.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 »