4D SYSTEMS FORUM

Register New Posts
 
 
 


Reply
 
Author Comment
 
Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #1 
I use FAT controller program to make script for bring picture in usb card to show in display but when program work till to order " copy memory card to screen " it did not response in picture that i bring from usd card .. So i would like to know what is the reason about this problem and how to resolve??

Attached Images:
Click image for larger version - Name: untitled.JPG, Views: 35, Size: 80.72 KB  

ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #2 

If you 'decode' the command it doesn't look like all the operands are valid.

 

It also appears FAT Controller is a bit confused about the length of that particular command.

 

Why not use Workshop and 4DSL (See the SGC manual) it's quite a bit easier to work with.

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #3 
i try to use workshop to make script but i don't understand how to write program by myself. Do you have code program to make picture slide of module uVGA SGC(II) for example to me or not??  then i will bring code to edit by myself because i can't write it all  by myself   
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #4 

Open workshop, click file, open samples, scripts, picaso sgc and chose one

 

Hopefully, you can see how it works from there  

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #5 
I can see how do work from script example ,, then which one that write to use for picture slide? because i saw each name of script but it is not make me know each script that write for what??
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #6 

I'm not sure I understand properly.

 

The RAW.4DScript is an example that deomonstrates the unformatted USD commands.

 

The samples are just that, samples.

 

The commands are listed in the Picaso SGC Commands SIS manual

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #7 
Thank you for your advise ,, now i can write script workshop already but i would like to change file .4dScript to be file .4DS for use to make file autoexec.4DS and upload into module uVGA SGC(II) for work automatic when connect to Display.. So,, how to convert file??
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #8 

You copy and rename the .4DSCRPOBJ to .4ds

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #9 
File .4dScript can change to .4DS and bring to use or not 
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #10 

.4dScript is the source.

 

.4DScrpObj is the 'output' from workshop and/or scriptc.

 

.4DScrpObj is what SGC can 'execute'.

 

You need to rename the .4DScrpObj to .4DS as SGC does not support long filenames, hence extensions must be shortened to 3 characters

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #11 
If change to autoexec.4DS already i will copy to where for module can work automately.
Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #12 
I copy file autoexec.4DS to uSD card already but when i connect module with display, it does not work same script autoexec.4DS that i write. I hope module will still work in old script autoexec.4DS that have in module. How i can do to upload new script for replace old script ??
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #13 
Are you sure you copied the correct file?

If you had saved the existing 'autoexec.4ds' before copying the new one then you should be able to put it back to "I hope module will still work in old script autoexec.4DS that have in module" assuming that's what you meant.

If you put an origin statement in your script like this
#origin 'autoexec.4ds'
Then workshop will copy the script to the display when you click 'Comp'nLoad', assuming you have the relevant settings correct


Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #14 
I am not sure i understand right or not. 

1. When i connect module uVGA SGCII into display and computer with i did not do anything before,, then display show logo 4D system that i understand logo show because there is file autoexec.4DS still in module before( from company 4D system)

2. I use program GC(Graphic compressor) to convert picture file from .JPEG and animation file .wmv to be GC file like a manual and save into uSD Card then bring uSD Card into module uVGA SGCII

3. I use Work shop to write script for module uVGA SGCII can show picture slide in uSD Card by itself ,, my code program are

#Run(Picaso,COM3,9600,5,Wrap)
#include "4DScript_16bitColours.inc"

$openinit
clear

SetBaud(9600)
InituSD
Status

ReadSector(0x000000)

UsdImage(0,0,320,240,16,0x03A5FD)
delay(3000)

UsdImage(0,0,320,240,16,0x03A72A)
delay(3000)

UsdImage(0,0,320,240,16,0x03A857)
delay(3000)

UsdImage(0,0,320,240,16,0x03A984)
delay(3000)


UsdImage(10,0,320,240,16,0x3AAB1)
delay(3000)

UsdImage(10,0,320,240,16,0x3ABDE)
delay(3000)

UsdImage(10,0,320,240,16,0x3AD0B)
delay(3000)

Video(0,0,320,240,16,40,797,0x000000)

exit

I try to compile and run program and it can work

4. I save file script and create name " autoexec" that when save file it will be autoexec..4dScript then i convert to autoexec.4ds

5. I bring SD Card out from module for save file autoexec.4ds into card but when i can not open card because it had control to Format so, i format card and use RMPET to divide partition to FAT16 and do in process 2 again, and then save file autoexec.4ds that get from process 4 too

6. I bring SD Card into module again and connect module into display same process 1 but display still show logo 4D system. 

I would like to display show in same my script like automatically without run pass work shop as same as when connect module to display and it show logo 4D system automatically.. How i can do ??

1) http://pic.free.in.th/id/9480d99825fc459c5e0250ad0ae68b7a
3) http://pic.free.in.th/id/95eeeae044cdd3f64667b0425341df09
4) http://pic.free.in.th/id/a02e2194ef9fad0b1f3a6044f6643c26
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #15 

1. The 4D Logo is internal to the PmmC, it is independant of autoexec.4ds on the uSD card, but if you had an autoexec.4ds on the uSD card t would not display.

 

3. The program you have shown is only suitable for 'Environment Run' (I.E. It needs to be run from a computer) and does not produce a .4dScrpObj file (which is what you need to rename to .4ds.

 

You need to change the Environment to 'Compile' and modify the program so that it is compilable (in this case, remove the $Openinit and readsector statements).

 

I think that will help you a lot

Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #16 

I don't understand ,, how i can create file .4dScrpObj and in the part of my code ,, which part that i should to edit for without run from computer ,, please tell detail to me
ESPsupport

Moderator
Registered: 27/01/09
Posts: 4,254
Reply with quote #17 
'Environment Run' means that the 4Dsl Script is going to be run from a computer, and it needs to be, as some of the commands valid in that environment are not valid for 'Environment Compile'. For example $openinit is only valid for Run as it opens the com port on the PC and sends autobaud to the display, such a command makes no sense to have on a program running from the uSD card. Similarly with ReadSector, what can a program running of a uSD card possibly do with a sector?

When you change the Environment to 'Compile' and remove or comment out the invalid statements and click compile, the 'Object' or 'executable' of your program will be created in the same folder as the .4dScript source code. That .4DScrpObj is what needs to be copied to the uSD card and renamed.
Phayu

Registered: 27/01/12
Posts: 34
Reply with quote #18 
I can do it already .. thanks for your advise
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Powered by Website Toolbox - Create a Website Forum Hosting, Guestbook Hosting, or Website Chat Room for your website.