Picoscope Automotive command-line syntax

Post general discussions on using our drivers to write your own software here
Post Reply
rod_au
Newbie
Posts: 0
Joined: Sun Aug 08, 2010 10:11 pm

Picoscope Automotive command-line syntax

Post by rod_au » Fri Dec 31, 2010 9:43 am

Hi,
I have written a couple of small apps that use Picoscope Automotives command-lines to trim and convert *.psdata files.

I have found that the beta release 6.5.42 is not liking these commands. Is this a temporary problem? will command-line control still be available? It would be a shame to lose this feature.

Thanks for your time,
Rod

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: Picoscope Automotive command-line syntax

Post by ziko » Wed Jan 12, 2011 10:12 am

Hi I am told that there was a problem on 64 bit Windows, and that this problem has been resolved in our latest beta software:

http://labs.picotech.com/#psw6

Let me know how you get on.

Kind regards
Ziko

Technical Specialist

rod_au
Newbie
Posts: 0
Joined: Sun Aug 08, 2010 10:11 pm

Re: Picoscope Automotive command-line syntax

Post by rod_au » Mon Jan 24, 2011 7:25 pm

Thanks for your reply Ziko.
I have installed the new Beta 6.5.54.0 and I am still having the same problem. It seems to stall during the conversion process.
I am currently testing this on a 32bit XP machine.

alan
Site Admin
Site Admin
Posts: 184
Joined: Thu May 25, 2006 8:02 am

Re: Picoscope Automotive command-line syntax

Post by alan » Fri Jan 28, 2011 5:13 am

Hi Rod,

You have written some great apps so we are keen to help you with this! Can you give an example of a command line option that used to work OK, but is causing problems in the new beta?

(By this I mean what you would type in the run box or command prompt).

Thanks
Alan

rod_au
Newbie
Posts: 0
Joined: Sun Aug 08, 2010 10:11 pm

Re: Picoscope Automotive command-line syntax

Post by rod_au » Fri Jan 28, 2011 10:02 pm

Hi Alan,
Thank you for your kind words. Here is a snippet of
how i am invoking the conversion and trimming processes using VB.NET.
I am using very similar code in four of my apps.

Code: Select all

Dim pi As New ProcessStartInfo
            _startInfo.FileName = "Picoscope.exe"
            _startInfo.UseShellExecute = False
            _startInfo.RedirectStandardOutput = True
            _startInfo.RedirectStandardError = True
            _startInfo.CreateNoWindow = True
            _startInfo.Arguments = " /C " & Chr(34) & strImageLoc & Chr(34) & " /F " & SaveType & " /B " & StartFrame & ":" & EndFrame

            Dim process1 As New Process
            process1.StartInfo = _startInfo
            process1.Start()
            process1.WaitForExit()


The Arguments comes out in the following formats:

Importing a psdata, converting it to an image:

Code: Select all

Picoscope.exe /C "C:\Documents and Settings\Rod\Desktop\fuel_pump_amp.psdata" /F PNG /B 1:1


Importing a psdata, reducing the frame number:

Code: Select all

Picoscope.exe /C  "C:\Documents and Settings\Rod\My Documents\Waveforms\COP_GOOD.psdata" /F PSDATA /B 1:2


A few observations that may help:

I have noticed that during the conversion process Picoscope makes the new file but nothing is written to it. The size is usually only a couple of bytes. Also, if I try to cancel the process at the Picoscope system tray icon the context menu will not draw. I find I have to kill the process in taskmanager.



I caught this 'Queue empty' Exception when using cmd.exe with the same arguments.

Code: Select all

System.InvalidOperationException was unhandled
  Message="Queue empty."
  Source="System"
  StackTrace:
       at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
       at System.Collections.Generic.Queue`1.Dequeue()
       at eg.d(Boolean )
       at eg.a(Boolean , Boolean )
       at en.b()
       at kr.Execute()
       at hw.a(String[] , Boolean )
       at Pico.PicoScope.PicoApp.AppMain(String[] args, Boolean consoleMode)
       at a.a(String[] )
  InnerException: 


Thank you again,
Rod

ziko
Advanced User
Advanced User
Posts: 1705
Joined: Fri Dec 01, 2006 10:03 am
Location: St Neots

Re: Picoscope Automotive command-line syntax

Post by ziko » Thu Feb 03, 2011 9:58 am

Hi Rod,

Just to let you know, our software engineers tell me that they are aware of the problem and it will be fixed on the next release. I will keep you informed.

Kind regards
Ziko

Technical Specialist

rod_au
Newbie
Posts: 0
Joined: Sun Aug 08, 2010 10:11 pm

Re: Picoscope Automotive command-line syntax

Post by rod_au » Fri Feb 04, 2011 7:05 am

Thanks Ziko

BodHack
Newbie
Posts: 0
Joined: Thu Apr 26, 2012 2:25 pm

Re: Picoscope Automotive command-line syntax

Post by BodHack » Thu Apr 26, 2012 2:36 pm

Just thought I'd chip in on this subject - I've been trying to convert files using the command line for a while now. To cut a long story short, it's still not working in PicoScope beta 6.7.2. Occasionally I get the desired outcome, but most of the time I get a directory full of files which are all 0k in size, and the picoscope process just sits there in Task Manager consuming a constant amount of memory (~75MB) and no cpu time.

Will this ever get fixed? It's a bit of a chore going through the files and manually converting the file type...


By the way, trial and error also suggests that the help is wrong and that in order to convert to the Matlab data format, one should use the following syntax:

picoscope /c "c:\source folder\test.psdata" /d "c:\destination folder" /f mat /b n:m

and not:

picoscope /c "c:\source folder\test.psdata" /d "c:\destination folder" /f matlab /b n:m

Martyn
Site Admin
Site Admin
Posts: 3301
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope Automotive command-line syntax

Post by Martyn » Tue May 01, 2012 2:41 pm

Thank you for the information, the issue has been flagged to our development team for further investigation
Martyn
Technical Support Manager

cperks
Newbie
Posts: 0
Joined: Wed Dec 19, 2012 4:56 pm

Re: Picoscope Automotive command-line syntax

Post by cperks » Wed Dec 19, 2012 5:02 pm

I'd just like to add...

I've also tried the latest beta and I am finding it fine to convert a *.psdata file to a *.csv file as long as I am not using the /b command. As soon as I use the /b (multiple waveform) command I get the same problem as mentioned - *_1.csv, *_2.csv etc all zero byte file size.

Martyn
Site Admin
Site Admin
Posts: 3301
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope Automotive command-line syntax

Post by Martyn » Wed Jan 02, 2013 10:27 am

I have just tried with the latest Beta, 6.7.11 downloadable from http://labs.picotech.com/, and it is working for me.
Martyn
Technical Support Manager

cperks
Newbie
Posts: 0
Joined: Wed Dec 19, 2012 4:56 pm

Re: Picoscope Automotive command-line syntax

Post by cperks » Wed Jan 02, 2013 6:00 pm

Doesn't work for me - do you have a pm address I can send a file to? The command I used was:

Picoscope /c C:\convert\*.psdata /f csv /b all

I get one converted file with zero bytes - I have three files all with tywo waveforms, as such, I expect six files to be output.

Thanks,
Carl.

Martyn
Site Admin
Site Admin
Posts: 3301
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Picoscope Automotive command-line syntax

Post by Martyn » Thu Jan 03, 2013 6:52 am

For a 100 waveform data file I used

Picoscope /c "C:\convert\*.psdata" /d "c:\convert\" /f csv /b 1:100

You can try sending your data file to support@picotech.com, you may get a file size too big from our helpdesk system but we do have a backup in place to pick up large files.
Martyn
Technical Support Manager

Post Reply