Shop OBEX P1 Docs P2 Docs Learn Events
TSL1401 Monitor program won't run! — Parallax Forums

TSL1401 Monitor program won't run!

Bob BuecherBob Buecher Posts: 2
edited 2010-03-02 21:36 in Accessories
Does anyone have advice on how to get the TSL1401_monitor.exe to run?
I've tried to run the extracted file on both a Windows 7 machine and on a XP.
On both computers when I double click on the TSL1401_monitor.exe I get a window that opens for a split second and closes before I can see if there is an message.
I suspected that it might be a Visual Basic program and would need to have the runtime files.· I seem to be up to date on .NET with version 3.5.· I also installed the runtime for Visual Basic 6 and 5.· Still nothing.

I have also download the file from Parallax twice in case I had a corrupted file.

Thanks for any help.

Bob

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-12-22 00:57
    Bob,

    The monitor program works with the TSL1401-DB only when it's used in conjunction with the MoBoStamp-pe. Assuming this is the case with your setup, make sure you've preloaded the tsl1401.hex AVR firmware into coprocessor B. This is what drives the sensor chip. Plug the TSL1401-DB into socket B, then load the Stamp program, tsl1401_monitor.bpe. This is what communicates with the monitor program.

    The monitor program requires no external files. If the problem persists, try running it from the command line to see if you get any error messages, and report back.

    Thanks,
    -Phil
  • Bob BuecherBob Buecher Posts: 2
    edited 2009-12-22 04:45
    Thanks for the tips Phil, but still no joy.

    I am using the MoBoStamp-pe board and I am able to download and run other programs on it.· So the MoBo is apparentlly working.

    I have run LoadAVR.exe and downloaded into Socket B.· I get no indication from either LoadAVR or the MoBo that anything has happened.

    I found the program that is downloaded to the Stamp-PE in a posting that you made last June.· That appears to have downloaded without problems (it displaced the bliking LED program I had used to test the Stamp-PE).

    When I run the TSL1401-monitor.exe, it responds as before, I get a glimpse of a window that closes before I can read it.· I also ran it from the command line with the same results.

    I am beginning to suspect that it is a problem with the LoadAVR program.· I see that 'Pete' had the same type of problem in a post on the Basic Stamp forum on 5/1/09.· In his case LoadAVR was not finding the stamp editor program (stampw.exe).· I've tried moving the LoadAVR into the same directory as the stamp editor but that has not worked.· It may be that the problem is that the stamp editor is in the path Program Files (x86)/Parallax Inc/Stamp Editor v2.4.2/stampw.exe.· From Pete's problem it may be that either the (x86) or v2.4.2 in the path may be the culprit.

    On the MoBoStamp-pe board should the A1/RdX pins be jumpered?· Mine are left open.· I am also running from the USB port and jumpered for 5V.

    Thanks,

    Bob
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-12-22 06:20
    Okay, that helps. Try this. In the file TSL1401_monitor.ini (same directory as the exe), make sure there's a line that reads:

    editor = C:/Program Files (x86)/Parallax Inc/Stamp Editor v2.4.2/stampw.exe

    That should eliminate any issues with the monitor program not finding the BASIC Stamp editor.

    Likewise, the very same line should also exist in the file LoadAVR.ini.

    Then try loading your AVR firmware again, and start the monitor. (You're right, BTW: it's the (x86) that's causing the problem.)
    Bob Buecher said...
    On the MoBoStamp-pe board should the A1/RdX pins be jumpered? Mine are left open.
    That's as it should be. That jumper was included in case a background serial input program were ever written for the AVR, so characters from the USB port could be buffered without the Stamp's intervention. So far, no such AVR firmware exists.

    -Phil

    P.S. I misspoke when I said to load the tsl1401_monitor.bpe program. You don't need to do that; the exe program does it for you.

    Post Edited (Phil Pilgrim (PhiPi)) : 12/22/2009 6:59:27 AM GMT
  • navila17navila17 Posts: 12
    edited 2010-02-22 16:48
    Hello,

    I have been having the same exact problem Bob had. The monitor program just blinks the command prompt window for a split second, and loadavr shows no signs of actually loading the firmware.

    Phil, I tried what you said about adding that line to the ini files. First of all, the monitor program didn't even have an ini file, so I just created on for it with only that line in it. Then I added the line to the existing LoadAVR.ini file.

    Now, LoadAVR.exe starts up just the same, but when I actually click upload, I get an error window saying "Missing parameter required. /Download switch requires redirection to an output file"

    I am also running Windows 7, but also tried on 2 different XP machines.

    Would anyone have any suggestions?

    Thanks,
    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-22 17:31
    Nick, are you also running Win7? Where is your stampw.exe program located?

    Thanks,
    -Phil
  • navila17navila17 Posts: 12
    edited 2010-02-22 18:10
    Phil,

    Yes I am running Windows 7 64-bit. My stampw.exe is in the same location as the line you suggested to add to the ini file:
    C:/Program Files (x86)/Parallax Inc/Stamp Editor v2.4.2/stampw.exe

    But now that I added that line both programs give me that output file error.

    Thanks,
    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-22 18:57
    Nick,

    Try running the attached from the same directory as LoadAVR.exe. This time a DOS window will pop up. Whatever gets displayed in that window will help get to the bottom of this issue.

    Thanks,
    -Phil
  • navila17navila17 Posts: 12
    edited 2010-02-23 20:51
    Phil,

    Thanks, I just tried the debug one out now. Running it from the same folder as the normal LoadAvr, the debug program seemed to work completely fine. The normal basic stamp editor download window came up and downloaded the firmware leaving this message on a debug screen:

    Checking program integrity .......................[noparse][[/noparse]OK]

    Selecting chip: A ................................[noparse][[/noparse]OK]
    Connecting to AVR chip ...........................[noparse][[/noparse]OK]
    Erasing ..........................................[noparse][[/noparse]OK]
    Writing program ..................................[noparse][[/noparse]OK]
    Verifying program ................................[noparse][[/noparse]OK]
    Writing Fuses ....................................[noparse][[/noparse]OK]
    Verifying Fuses ..................................[noparse][[/noparse]OK]

    Selecting chip: B ................................[noparse][[/noparse]OK]
    Connecting to AVR chip ...........................[noparse][[/noparse]OK]
    Erasing ..........................................[noparse][[/noparse]OK]
    Writing program ..................................[noparse][[/noparse]OK]
    Verifying program ................................[noparse][[/noparse]OK]
    Writing Fuses ....................................[noparse][[/noparse]OK]
    Verifying Fuses ..................................[noparse][[/noparse]OK]

    FINISHED: PROGRAMMING SUCCESSFUL!

    PLEASE CLOSE THIS WINDOW TO CONTINUE.

    And the command window that the debug program opened up just has one line:

    Temp dir: C:\Users\Admin\AppData\Local\Temp

    But when I try either he normal LoadAVR.exe or the monitor program I still get the same results as before. So is there some problem with those files? I downloaded them both sever times.

    Thanks,

    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-23 21:04
    Nick,

    What verson number appears in the LoadAVR window of the program you downloaded from Parallax? Have you given this program administrative privileges? I ask because it looks like it needs to write into a temp directory in the admin user area. The same will be required of the TSL1401 monitor program.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 2/23/2010 9:09:14 PM GMT
  • navila17navila17 Posts: 12
    edited 2010-02-23 21:33
    Phil,

    LoadAVR is version 1.4

    I tried running both as administrator but still get the same problem for both of them. By that I mean the same error window about the output file.

    -Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-23 21:59
    Well, okay, I'm at a loss. So I've recompiled the non-debug version 1.4 and attached it here. Try that and see what happens. If it works, I'll try the same with the monitor program.

    -Phil
  • navila17navila17 Posts: 12
    edited 2010-02-24 02:43
    Ok I tried that but it is still getting the error window. If it helps, I realized that the error window that pops up shows up as the being from Basic Stamp Editor in the task bar. I guess I will just have to try it on a different computer again. You wouldn't happen to have a debug version of the monitor program would you?

    Well thanks anyway, I do appreciate all of your help. I'll let you know how it goes trying on the other computer.

    Thanks,
    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 02:59
    That's totally bizarre. The regular and debug code were compiled from the same source. I'm virtually certain that the issue is a permissions problem with the temporary directory. If my program can't write a file to that directory, the PBASIC editor can't retrieve anything from there and will give you that error. That's why I asked about running as admin. But I don't have Win7, so I can't duplicate the behavior you're experiencing, unfortunately. I'll try compiling a debug version of the monitor program for you to try. Meanwhile, if there are any Windows 7 users out there that can shed some insight on this perplexing issue, I'd be grateful.

    -Phil
  • kf4ixmkf4ixm Posts: 529
    edited 2010-02-24 04:42
    let me just throw this out there, but did you unzip the files of the·zip file into a folder first before trying to execute the monitor program, or just open the zip file and execute the monitor program?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 05:29
    Here's a "debug" version of the monitor program. If differs from the regular version only by the inclusion of a DOS window, which may (or may not) display error information.

    -Phil
  • navila17navila17 Posts: 12
    edited 2010-02-24 15:57
    @kf4ixm
    I extracted the programs from the compressed folder first. Thanks though.

    @Phil
    Ok thanks, I tried that one but it doesn't run either. It flashed the command prompt window, but this time I could see writing in it. But it closed itself too quickly, so I just made a batch file to run it and pause it and this is what I got:

    C:\Users\Admin\Desktop\TSL1401_monitor_debug>TSL1401_monitor_debug.exe
    Use of uninitialized value in concatenation (.) or string at C:\Users\Admin\Desk
    top\TSL1401_monitor_debug\TSL1401_monitor_debug.exe line 516, <DATA> line 164.
    '""' is not recognized as an internal or external command,
    operable program or batch file.
    Died at C:\Users\Admin\Desktop\TSL1401_monitor_debug\TSL1401_monitor_debug.exe l
    ine 520, <DATA> line 164.

    C:\Users\Admin\Desktop\TSL1401_monitor_debug>pause
    Press any key to continue . . .

    So does that help at all? I am still going to try getting it to work on my older XP machine when I get a chance today, since that is looking like the better plan at this point.

    Thanks,
    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 16:46
    Nick,

    Did you remember to add the TSL1401_monitor.ini file to your directory, as before? I think what it's complaining about is not having a valid command (i.e. path to the PBASIC editor). (This is still an issue to resolve for the next version of the program. It's supposed to present a dialog box if it can't find the program on its own. But the ini file will resolve that for now.)

    -Phil
  • navila17navila17 Posts: 12
    edited 2010-02-24 17:16
    Phil,

    I did add it, but I added it as TSL1401_monitor_debug.ini to follow the file now, but just now I took the debug part out, and it finally worked! It loaded up the code and brought up the monitor window. So far, I don't get any scans in the monitor window, but maybe I just need to play around with it now. I have the TSL1401 plugged into socket b, should I have to change much to get results in the monitor?

    Thanks for all the help,
    Nick
  • navila17navila17 Posts: 12
    edited 2010-02-24 17:20
    Actually, never mind. I didn't have the right firmware uploaded. I loaded that in and now it is working perfectly. Thanks a lot.

    -Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 17:31
    Nick,

    I'm glad it worked, but I'm mystified why the debug version works and the non-debug version does not, since they're compiled from the same code. If you would, could you try one more thing for me, please? Open a DOS command window, cd to the directory that the non-debug program is in, and run it from the command line prompt. (You will still need the ini file for this.) Let me know if anything gets displayed in the command window.

    As long as the TSL1401-DB is plugged into socket B and the socket B AVR has the TSL1401 driver hex file loaded into it, you should see activity on the screen. Try aiming the camera at a bright light. Also try fiddling with the exposure time. It may be that all the pixels are either zero or saturated when you first start up. And do make sure the lens cap is off! smile.gif

    Thanks,
    -Phil

    Edit: Looks like our posts crossed. Glad you got it working! I would still be interested in any results you could post from running the non-debug version in a command window. Thanks.

    Post Edited (Phil Pilgrim (PhiPi)) : 2/24/2010 5:48:46 PM GMT
  • navila17navila17 Posts: 12
    edited 2010-02-24 17:49
    Phil,

    Well now I think you will be even more confused. When I ran the normal program right from the command line, it worked fine. I ran it through the explorer again just to see if it still gets the output file error and it did. I made a batch file in the same folder with just "TSL1401_monitor.exe" in it, and even that runs it fine. Maybe it has something to do with windows explorer for Windows 7. I have no idea. If there is anything else you would like me to try, I'd be happy to do it. But at least I know how to get it to work now.

    Thanks again,
    Nick
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 18:55
    Thanks, Nick! I appreciate your efforts to help me get to the bottom of this, and I may seek the favor of your indulgence yet again to do some more testing. In the meantime, I'm glad you've got a working program, and I hope you enjoy the TSL1401-DB!

    -Phil
  • FranklinFranklin Posts: 4,747
    edited 2010-02-24 18:57
    Windows 7 (and Vista) do not lke writing files in the "non-user" space without special permissions (known only to Microsoft and those who have given their souls to MS) This might have been part of your problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-02-24 19:10
    Franklin,

    I do suspect it's some kind of permissions issue, but the PBASIC file that the editor is supposed to load (but apparently can't find) is being written here: C:\Users\Admin\AppData\Local\Temp, which appears to be a "user" space. I'm still running WinXP, though, so I'm not familiar with these extra security measures designed to keep people from using their own computers. smile.gif

    -Phil
  • mikedivmikediv Posts: 825
    edited 2010-02-26 19:18
    Just a thought with vista sometimes I can right click on the application file go to security and then at top click compatibility tab and select xp with service pack one and run as administrator, I know its a long shot but lie Franklin said windows does not like writing files I have had this work with Brads BST and a bunch of my PIC stuff Mplab
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-03-02 21:36
    I've modified the monitor program to be smarter about how it searches for the BASIC Stamp editor. It will search in both "C:/Program Files/Parallax Inc" and "C:/Program Files (x86)/Parallax Inc" (assuming that either or both of those directories exist) for the most recent version. If the search fails, you will be prompted with a file dialog box to locate the editor manually.

    Give it a try on Win7, and see if it helps. Be sure to delete your .ini file first, as having it there would defeat the test.

    Note: This does not fix the presumed "permissions" issue. That's still a mystery. You may be able to solve it in the interim by downloading Virtual PC from Microsoft and running the program in XP mode.

    Thanks,
    -Phil

    _

    Post Edited (Phil Pilgrim (PhiPi)) : 3/2/2010 9:41:44 PM GMT
Sign In or Register to comment.