0

Avoiding interaction screen in IQANrun to automate logs retrieving

isidro riquelme 2 months ago in IQANrun updated by Gustav Widén (System support) 2 days ago 5

Hello Everyone,

I’m experiencing an issue with running an IQAN script automatically via the command line (CMD or PowerShell). I need to retrieve logs from a Parker Hannifin controller installed on a mining machine, and it’s essential that no interaction windows are displayed during this process. I’ve followed the scripting format outlined in the IQANrun user manual on page 117, but I’m unsure if there are additional configurations needed to establish a fully automated connection. Any guidance would be greatly appreciated!

Image 4506

This is the Screen I need to AVOID, I just need to connect direct to this Controller.

Here are the Commands I used so far:

-cif Ethernet -mac 3c-e4-b0-34-ea-38 -silent -send -script 'C:\Users\RHM\Documents\IQAN Files\GetLogsV2.0_l.issx'

The file GetLogsV2.0_l.issx is the IQANscript that contains instructions for connecting to the controller, retrieving the logs, and disconnecting afterward. Since there is only one controller connected to this network, I believe it shouldn't prompt for a connection, especially since I have specified the MAC address. I would appreciate your support in resolving this issue.

Thanks in advance

It sounds as if you have the Connect action as a step in the script. 

The Connect script action does not have additional parameters for connecting to a specific device. 

As you set the connection interface via command line, it shouldn't be necessary to have the Connect action in the script. 

Looking at the commands you listed, I also see it looks a little strange. 

The -send argument should be followed by a filename for a a project -, clone - or settings file. It is not used for opening scritps.


The -script argument should be followed by a Component ID. This is used when the .issx script file contain multiple scripts. 

In IQANrun 6  and up to and including IQANrun 7.02, script file names are are passed as argument without an anything before it. (from IQANrun 7.03, there is an -open argument that is used to open and run scripts)

 


Hi Gustav

Thank you very much for your response. Earlier this week, I had the opportunity to make changes to the IQAN script file, and it is now as follows:

Before: It contained a connection instruction that has been removed. I saved the file as GetLogs2.2_l.issx.

Image 4534

Modified version: 

Image 4533

The IQAN script file should run with a PowerShell script (.ps1 file) because it is followed by a  Python process that needs to transform the .csv files into .json format and send them to a remote server.

This file opens the IQANrun application, and the arguments have been updated to:

-cif Ethernet -mac 3c-e4-b0-34-ea-38 -silent 'C:\Users\RHM\Documents\IQAN Files\GetLogsV2.2_l.issx'


When I execute the .ps1 file using Task Scheduler or while testing in PowerShell ISE, the script still triggers an interaction window that I need to avoid:

Image 4535


However, when I run it directly from PowerShell using these commands:

Image 4536


It executes correctly, allowing me to retrieve the logs without the interaction window:

Image 4537

At this point, my questions are:

  1. Why does the IQANrun software display the internet connection interaction window when using the PowerShell script (.ps1), but not when running it directly in PowerShell?
  2. How can I connect using the .ps1 file without triggering the interaction, so that I can automatically retrieve the logs without human intervention?

Thank you very much!


Not sure why the Powershell didn't work. 

What I always do is put the command lines in a .bat file. 

Hi Gustav

I have performed the same test using a .bat file and the result was the same... 

I'll apreciate if you can share a example of .bat file to retrieve logs (in which the interaction window does not appear)

I'll be atent to your response... thanks in advance

Here is an example of how it might look when using IQANrun 7.03: 


"C:\Users\<username>\AppData\Local\Programs\IQANrun 7\IQANrun.exe" -cif Ethernet -auto -open "C:\IQAN\Get log.issx" -silent

Just replace username and the path to the script file. And maybe change back to a specific MAC as you have in your example.