Hello Guest it is March 28, 2024, 11:49:59 AM

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 - tgirard

Pages: 1 2 3 4 »
1
Works in progress / Re: Mach4 Screen for Touchscreen
« on: December 29, 2019, 07:38:21 PM »
I'm shocked no one commented. This is bad ass!!! I watched the video and loved it. I really like the fonts you selected for the DROs and the color scheme. Any chance of getting a copy?

2
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 30, 2019, 07:35:28 PM »
@brandon. Hey Brandon. That is an old module that is there for other things. I read about it here somewhere. I shut it off all together. It's not what you need.

FYI, I have been able to build out a solid communications channel using an Arduino Uno. This has two way coms and I currently have a Jogging encoder connected which is updating a DRO. Step two is to send the DRO value back to the Arduino so that I see it on a screen.

I still need to flush this all out and then post here so that -real- developers might be able to take what I have and make it better / more bullet proof. I am going to completely document the whole process to build a serial Pendant using an Arduino.

Mike Cardoso, here in this thread, has been a tremendous help I really need to give most of the credit to him (I definitely will when I publish) but I'm trying not to bother him until I'm ready.

3
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 26, 2019, 08:20:16 PM »
YYYYYESSSS!!!!!
So this works awesome!
I was able to read from the Arduino using the examples. I'll start setting things up to Read / Write and see how things behave. I want to also do some testing with speeds and error correction but, for now, I'm just getting the basics going.

Thank you again Mike, I really think once this gets out a little more, people will start to see just how simple / powerful this is.

More to come
-Tim

4
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 10:06:34 PM »
Nothing, But I don't have anything setup on the Arduino side to see and I'm not reading the buffer on that side (Nothing errored in Mach BTW)

Would you mind maybe giving me an example that reads "Hello World" from the buffer and Spits it out to a label "testLabel"
I tried this in the button with no luck (Lua Chunk error)
e = p:flush()
scr.SetProperty("testLabel","Label",p:read(12, 5))

Sooo close...
thanks -Tim

5
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 09:44:19 PM »
When I just tried to connect with Putty It got blocked!!!
I think we're golden

I just don't understand the "p" portion of the code you wrote,
Did you encapsulate the "p" functions  into a Lua Funtion inside the SheetLoad Script to use elsewhere?

I'm inches from the finish line here :)
-Tim

6
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 09:40:40 PM »
Wait wait.
So, I clicked the button once and it didn't error. Like a fool I clicked it a second time and got the error... LOL
I think we're good.
 
I moved the code to the Screen load script and it "seems" to be working...?
Can you give me a code example of receiving data? I'm still misunderstanding how the luars232 works and how the letter "p" is defined and used.

thanks Mike!!!!
-Tim

7
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 09:33:10 PM »
OK, Updated to Build 4300 and modified the error statement per your suggestion

It's spitting an error 2

8
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 09:06:06 PM »
Attached.
any thoughts of what I might try next?
Also, If I wanted to change the baud rate or parity etc, I would just update the assert Statements right?

ex:
assert(p:set_baud_rate(rs232.RS232_BAUD_9600) == rs232.RS232_ERR_NOERROR)

9
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 08:48:43 PM »
Hi Mike,
So I did review everything and double checeked that I was using the right port and speed with putty. I took some screenshots just so you could see.
I also tend to use a button and try to test out code so I took a screen shot of what I was doing there.
I did shut off Putty and rebooted Mach just to be safe. I built a simple app on the Arduino to test with (See the picture)

Did I miss something
-Tim

10
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 25, 2019, 08:19:19 PM »
Ah, OK,  I'll double check everything and try to get to know / understand the error messaging in Mach. I am familiar with nil and I have worked with Putty so I'll review and try to figure it out. I'll also review the link in your response as well. I was just parsing through other posts you've made earlier regarding RS232.  If I could just get connected the rest will fall into place :)

THANK YOU SOOO MUCH for taking your time tonight and responding. It's rare... But really appreciated!

Pages: 1 2 3 4 »