Author Topic: Joystick access in remote usage of JEOL 8200  (Read 208 times)

Dan MacDonald

  • Professor
  • ****
  • Posts: 36
Joystick access in remote usage of JEOL 8200
« on: April 04, 2019, 09:17:47 am »
Good afternoon, everyone:

I have a question regarding the possible use of a remote, physical joystick for the navigation of the stage when using Probe for EPMA, remotely, for a JEOL 8200 probe.  The reason I ask is that I have had a number of our remote clients express the desire for the ability to use a physical joystick instead of a virtual one.  They think that stage navigation would be more intuitive and therefore more efficient if they could use a physical joystick.  These days, we are allowing remote access through TeamViewer, which does not take input from a joystick.  I am corresponding with JEOL also, to see if we can access their joystick controller board through what looks like a free/unused serial port on the board of interest, which might open a pathway for access.  I am not that familiar at all with the 'remote server' application that I have seen on the user forum, so am unsure if I am barking up the wrong tree, here.  I would greatly appreciate any helpful advice anyone might have on the subject.  Thank you very much for your kind assistance.  As I get more information from JEOL, I will pass it along to the forum.

Best regards

Dan MacDonald
Probe Tech
Dalhousie University

Probeman

  • Emeritus
  • *****
  • Posts: 1827
  • Never sleeps...
    • John Donovan
Re: Joystick access in remote usage of JEOL 8200
« Reply #1 on: April 04, 2019, 10:45:02 am »
Hi Danny,
I too would also like remote control of the stage joystick on my Cameca instrument as well, but I have not found a solution for this.

The joystick on my Sx100 is a USB device which might allow more possibilities than a serial port device, but I really don't know. Maybe some "gamer" types out there know a solution for remote control of a joystick over the Internet?  Seems like something must be already available for this!

I do know that the Remote Server interface is specifically for local control of the JEOL or Cameca instruments via scripting through Excel, Matlab, LabView, etc., so that won't be of any help on this question.
john
The only stupid question is the one not asked!

Dan MacDonald

  • Professor
  • ****
  • Posts: 36
Re: Joystick access in remote usage of JEOL 8200
« Reply #2 on: April 09, 2019, 06:50:24 am »
Hi John:

Our departmental computer guru is wondering if it is possible for your software to accept input from a physical joystick by accessing that part of your software that controls the stage movement.  Does this sound like a partial solution or starting point?  Also, do you have a current link to github for the PFE source code (this might help our computer guru understand the problem a bit better)? Thanks very much again for all your help!

Best regards

Dan

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 2379
  • Other duties as assigned...
    • Probe Software
Re: Joystick access in remote usage of JEOL 8200
« Reply #3 on: April 09, 2019, 11:37:39 am »
Hi Dan,
Joystick control of a (remote) stage is problematic for several reasons. Let me explain and unpack some issues for your computer guru.

First of all on the source code question. The complete source code for CalcZAF and Standard are found here:

https://github.com/openmicroanalysis/calczaf

The source code for Probe for EPMA is not publicly available, but it can be licensed from Probe Software for a fee. Several of our corporate customers want to write their own standalone applications, without utilizing our Remote server interface (for various reasons), as described here:

https://probesoftware.com/smf/index.php?board=9.0

So they license our Probe for EPMA source code and drivers and develop their own applications for the instrument.  However this requires professional level programming skills, because making driver level calls to these instruments is not for the faint of heart!  For example the JEOL 8200 requires the initialization and processing of the "monitor packet", which is a non-trivial exercise. 

That said there is a low level instrument function for setting the JEOL stage motors into what is called "velocity mode". Normally stage motion commands are given in "position mode", where the instrument is commanded to move to position XYZ, and then the instrument is checked for stage motion completion. However, in "velocity mode" the stage motion never "completes", instead the motors are constantly in motion, though the speed may range from zero to full speed.

This "velocity mode" command is what a joystick application generally utilizes in order to control the stage. But even if someone had a joystick application that utilized this low level command to the JEOL instrument, that still wouldn't help you in your quest for remote control of the instrument stage. Why? Because the JEOL instrument is on a private network which is unreachable from the Internet. 

So while you could develop your own joystick application and then run it from the local Probe for EPMA computer (or other local PC), that PC would have to be on the instrument's private network (normally 192.168.0.x). And since you already have a local joystick on the JEOL UNIX box, that doesn't help you much!  Of course one could put their EPMA instrument directly on the Internet (I did have my Cameca SX100 on the Internet for a year or so about 20 years ago, so it can be done), but I'm not sure it would be a good idea nowadays.  The traffic on your university network alone would probably bring the JEOL instrument to a standstill.

So what does that leave you? I echo Probeman's ideas above for us to try and find a remote access software that supports not only a keyboard and mouse, but also the joystick.  Did you ask TeamViewer if they support joystick hardware through their interface? Here's a recent request by a TeamViewer customer for remote joystick control:

https://community.teamviewer.com/t5/Previous-versions-EN/Feature-request-Joystick-support-via-LAN/td-p/27586

Might be worth checking into. We utilize RealVNC in the lab for remote access, but I also find people requesting this feature for UltraVNC:

http://forum.ultravnc.info/viewtopic.php?t=16911

But even if your TeamViewer/VNC remote access software did support remote joystick hardware, that wouldn't help you because you'd still have to develop a joystick application for the Probe for EPMA computer (or other PC). A computer that is on the instrument's private network (and also on the Internet).

Another possibility that Probeman suggested above, is that we might consult some game programmers because maybe they are aware of apps for remote control of a joystick. But again, I suspect that such an app would need a direct connection to the JEOL UNIX box (or instrument) and either of those requirements will be difficult to meet.  The first because who supports HP UNIX anymore? And second, because you'd again need to have your instrument on the Internet.

I don't think there is an easy solution for remote control of your EPMA stage using a remote joystick.  You know what we do for remote navigation of the instrument stage?  We simply use the PictureSnap feature in Probe for EPMA:

https://probesoftware.com/smf/index.php?topic=14.0

or the standalone PictureSnapApp application:

https://probesoftware.com/smf/index.php?board=34.0

Once you have a calibrated image (which you can do before you leave the lab), navigating the sample is easy. Simply double-click on the image where you want to go and voila, you are there. For tiny adjustments to the stage, the cursor controls in the Probe for EPMA Move window are very usable.  And of course you have the auto-focus button there also.

If anyone has any other ideas for accessing a remote joystick we would be very interested in hearing about them.
« Last Edit: April 09, 2019, 11:41:46 am by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Dan MacDonald

  • Professor
  • ****
  • Posts: 36
Re: Joystick access in remote usage of JEOL 8200
« Reply #4 on: April 11, 2019, 10:58:15 am »
Hi John:

Thank you very much for the extended explanation - I greatly appreciate it, as does our computer sage.  The next thing we are going to try is to buy a couple of small servos and construct a physical overlay on the JEOL joystick - it may not be elegant, but might work.  Now, if only we could find a way to construct a virtual overlay over the JEOL virtual joystick.  I will keep you posted as to where we get with these avenues.

Best regards

Dan


Probeman

  • Emeritus
  • *****
  • Posts: 1827
  • Never sleeps...
    • John Donovan
Re: Joystick access in remote usage of JEOL 8200
« Reply #5 on: April 12, 2019, 09:50:42 am »
Hi John:

Thank you very much for the extended explanation - I greatly appreciate it, as does our computer sage.  The next thing we are going to try is to buy a couple of small servos and construct a physical overlay on the JEOL joystick - it may not be elegant, but might work.  Now, if only we could find a way to construct a virtual overlay over the JEOL virtual joystick.  I will keep you posted as to where we get with these avenues.

Best regards

Dan

Hi Dan,
Well that sounds like an engineering project for sure!

By the way, for those of us running our joystick from a PC (new JEOL and Cameca instruments), I wrote to RealVNC (the remote access tool we use at Univ. Oregon), and asked:

Quote
John Donovan
Apr 11, 19:24 BST

I manage many RealVNC enterprise licenses at the university.

I realize RealVNC supports keyboards and mice, but would it be possible to support a joystick input device to control a remote joystick on the remote computer?

We have a several applications where we need remote control of an XYZ stage on a scientific instrument.

And they replied:

Quote
Jack RealVNC (RealVNC)
Apr 12, 13:48 BST

Hi John,

Many thanks for your email. Unfortunately this is not currently possible, but it is on our feature request list. I have added your vote to this feature request now.

If you need any further assistance, then please let us know.

Regards,

Jack
RealVNC Product Support
« Last Edit: April 12, 2019, 09:57:36 am by Probeman »
The only stupid question is the one not asked!