Hello Guest it is April 24, 2024, 10:34:05 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 - simpson36

71
Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 24, 2015, 09:20:19 PM »
I had to open my MACH4 .ini file and edit RS485=1 

Uber impressive that a user with only 4 posts could figure out how to directly edit the INI file to work around a MACH4 issue. Kudos on that!


I have a question posted earlier which has gone unanswered, so I will add another FWIW here;

On the topic of Bit packing, I have done some research and testing and my findings are that Mach4 unpacking seems reliable and fast and I will be using that feature.

MACH3 on the other hand, I found to be unreliable, restrictive and slow and in that application for both bit packed and coil data.

As a consequence, I have written my own bit-packing routines and will let MACH4 unpack the 'control word' and that task will be performed with a VB script on a normal register for MACH3.

It is known that bit packing was broken in MACH3 for a long time and the unwillingness of anyone to step forward and state that it is currently working in MACH3 is an indication that it is still unreliable even though it *seems* to be working.



 



72
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 24, 2015, 08:54:48 PM »
Simpson36,

I have both but have been working with the USB Pokey for my pendant.

Russ


Russ, thank you for the response.

I have the USB version of the PoKeys, but have never used it.  I planned to purchase the Ethernet version, but the functionality that it provides is already available to my application thru the Ethernet interfaced Arduino DUE processor that I use.

The Arduino DUE continues to be able to handle the ever increasing loads I am putting on it, but in the event it stalls, I have the new Rasberry processor in a box waiting to be pressed into service if needed.

The USB version of anything has two ways of interfacing with a PC. One is as a native USB device and the other far more common (unfortunately) method is via a single chip 'converter', the most popular of which is made by FTDI, to emulate an old serial COM port.

ALL COM emulators require drivers and It is reasonable to assume that the driver would have FIFO buffers to emulate any modern UART chip.

Note that I do not know  if this is the case or not with any particular device, but I do think it is a reasonable assumption, which if true, would result in the same behavior that I described in an earlier post. Characters are trapped in the buffer and released when MACH4  starts and accesses the buffer without first flushing the buffer.   Again, that is pure speculation, but with a basis.

I can add that MACH4 is derelict in initializing a number of processes, not just serial plug-ins.  The screen does not initialize properly in that any custom buttons are in a completely random condition on start-up regardless of the initial state of the control.

It has been suggested by another post that code would need to be added to the PLC to properly initialize MACH4, but I strongly disagree with that premise.  I have had the last 9 or 10 questions go unanswered on this forum and developer participation seems to have pretty much ended. This seems to me to be heading for a repeat of the MACH3 norm of never ending unfixed and unacknowledged issues.

If that turns out to be the case, and extensive programming is needed to make MACH4 do what it should do out-of-the-box, I would be more inclined to follow the lead of others and abandon MACH4 in favor of the Kflop or Unix solutions.

73
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 24, 2015, 03:37:53 AM »
Simpson36,
Interesting, I have been playing with the POKEY plugin for MACH4 . . . . .
Russ


USB or Ethernet?

74
Mach4 Videos / Re: Mach4 - Arduino and Touchscreen
« on: May 18, 2015, 04:57:10 PM »
After lots of research today I've ordered an Arduino yun in replacement for the Leonardo, it's got dedicated Ethernet and Linux bridged to the Arduino opening up a whole new avenue for communication between Mach 4 and external devices.

DazTheGas

You may want to also look at the new Rasberry, especially if you are going to use the processor based 4D libraries.  It has Ethernet and a bunch of other stuff built in, can run Linux OS and has multi processors. My current product uses the Arduino MEGA and the next Gen (MACH3 and MACH4 TCP) uses the Arduino DUE.

The MEGA was pretty much maxed out and the only avenue to loading it more would be to implement interrupts, but I could never get the interrupts to work right on the MEGA.

In the real world, the DUE is about 5 to 7 times faster for typical stuff. For me the real highlights are the FP performance and also the DUE's interrupts work perfectly. I have added a LOT of load to the DUE and was anticipating (but not looking forward to) the need to move to the Rasberry, but the DUE is chomping thru everything without any perceptible slowdown.


75
My fear is that Mach4 screens will be specific to a user's particular setup and hardware, and will not be easy to share with others.
(Meaning that they'll be easy to share, but may not work for others)

Having worked with both MACH3 and MACH4 screens, I would say MACH4 will be more difficult to make 'universal' but certainly not impossible. Unconfigurable screens created for specific purpose would not transfer well, obviously, but if the goal from the beginning of the project is to make a configurable (i.e. saleable) MACH4 screen set, I have not run into anything that would prevent that.

In the same way the Kflop is far more powerful that smoothstepper, that capability comes at a cost. You cannot integrate a Kflop with 'checkbox programming'.  MACH4 screens  taste like that to me. Making a purpose built MACH4 screen is not difficult or complicated, but to create a configurable set is an entirely different and far more complicated task.

The stumbling block, in my view, will be writing a configurator to fill the boatload of parameters that would be needed for a 'universal' screen set. For MACH specifically, I have written configurators in VB script , C# and C++ (for Windows programs), and now in LUA, both stand alone and 'widgets'. The first widget too far longer than ALL of the screen mods. There is some documentation available now that should make this mine field less painful to navigate.

76

 . .  we can review your code and its interaction with your screen to learn from your coding.
Eg. I would like to have some script that allows me to have mutually exclusive buttons (if you press one the others turn off) on the screen with LEDs.

If someone has already done this it would save me a lot of time.
Basically I am looking for code / script snippets that I can use on my screens / machine.
thanks


There is a MACH4 specific section in the forum. There is a lot of screen information and examples posted there, including doing context sensitive buttons (one button brings up more buttons or disables/enable other buttons) that you want.

http://www.machsupport.com/forum/index.php/topic,29442.0.html


77
Mach4 General Discussion / Re: MACH4 - Modbus
« on: May 17, 2015, 07:58:26 PM »
Modbus TCP works fine in MACH4.  I have not tried Serial Modbus in MACH4

78
Mach4 Videos / Re: Mach4 - Arduino and Touchscreen
« on: May 17, 2015, 11:06:56 AM »
. . .  decided to make use of the ESS

First, let me report that moments ago, I read a confirmation that the nasty jogging bug is either in MACH4 or the supplied keyboard plugin. That's not cast -in-stone, but it is certain that the problem is not being caused by the ESS.

My guess is the Keyboard plug-in, but that speculation, plus 5 bucks, will get you coffee at Starbucks   :-[

It makes good sense to me to leverage the Ethernet connection and I/O that the ESS provides, provided you only need bitwise I/O.
 

 
There is an ethernet version of the Arduino.

Got it.  Normally, I would not want to hijack a thread, but since it's your thread and you are using both Arduino and ESS, you may benefit from knowing that the Arduino Ethernet shield and the ESS get along nicely in the same sandbox, just in case you (or a reader) ever decide to put them in there together. . I ran them both simultaneously in the following configs:

*Each hardwired to the same computer each with its own NIC
*Thru an Ethernet switch with no other devices on the network
*Thru a full operational network with and without Internet access.

In all cases, there was no conflict. Notes:

*The 'default' ESS IP was not used in favor of the more conventional 192.168.x.x
*The Arduino shield was a genuine Arduino part with a legit MAC number.

Edit: Oops, forgot to mention the above has not been tested with the new ESS plug-in released recently.

79
Mach4 General Discussion / Re: Mach 4 Bug Reports
« on: May 17, 2015, 10:44:46 AM »
It could be the keyboard plugin if ya consider that being seperate but I still consider that part of the Mach4 software.

I agree on both counts. A plug-in provided by Newfangled Solutions is definitely a part of the software.

This bug got my attention because I am finishing up a jogging device at this time. I started MACH4 with a continuous stream of jogging moves flowing into MACH4 from the TCP Modbus to the PLC script (ahead of all the enabling code) and there was no movement and nothing was queued up or buffered from the input stream.

Keyboards and/or their associated drivers  (be it MACH4, Windows, various key grabbers, key snoopers and so on) have buffers, so I would speculate that the problem is in the plug-in. I'm guessing that the user does not have access to flush the buffer on startup and it would *appear* that MACH4 and/or the Plug-in is not doing that either. That would explain keystrokes being stored and released to MACH4 as soon as it accesses the plug-in.

I'm not a keyboard expert by any means, but I would not be surprised to find that the physical keyboard itself has a small internal buffer, in which case, flushing the Plug-in may not be adequate. The plug-in would need to collect all available characters in the keyboard buffer and flush everything before passing the first post-initialization key code.

The above is purely speculation on my part, and even if it is correct, I don't think the user has access to the area where a solution can be made.  Very nasty bug. Hopefully this one gets escalated.

 


80
Mach4 Videos / Re: Mach4 - Arduino and Touchscreen
« on: May 17, 2015, 10:19:39 AM »
Daz sent me copy from the last version it fixes the problem its in the last place we spoke

I have since moved an earlier plug-in forward and it *seems* to be accepting keystrokes in the setup. That's as far as I got . I really do not have a use for the keyboard plug-in. It is just a curiosity.

the M4 scripting manual . . . .

You have mentioned this 'Scripting Manual' before and I have not found such an animal so far. There are three documents that list the MACH4 Lua functions. Is there something else available?