^RAF command - loading images?
GSLogic
Posts: 562
Has anyone used the ^RAF command?
I need to display images loaded on the Netlinx master to the touchpanel.
I know I can do this if I add a Dynamic Images URL in the touchpanel, but I need to have changing image names.
Here's what was in Software History:
Example:
SEND_COMMAND Panel,"'^RAF-New Image,%P0%HAMX.COM%ALab/Test_file%Ftest.jpg'"
Adds a new resource.
The resource name is 'New Image',
%P (protocol) is an HTTP,
%H (host name) is AMX.COM,
%A (file path) is Lab/Test file,
%F (file name) is test.jpg.
I've tried all combinations with no luck!
Thanks
I need to display images loaded on the Netlinx master to the touchpanel.
I know I can do this if I add a Dynamic Images URL in the touchpanel, but I need to have changing image names.
Here's what was in Software History:
Example:
SEND_COMMAND Panel,"'^RAF-New Image,%P0%HAMX.COM%ALab/Test_file%Ftest.jpg'"
Adds a new resource.
The resource name is 'New Image',
%P (protocol) is an HTTP,
%H (host name) is AMX.COM,
%A (file path) is Lab/Test file,
%F (file name) is test.jpg.
I've tried all combinations with no luck!
Thanks
0
Comments
I'm programming a home with 34 touchpanels (like mine ) and I'd like to upload all the tv icons (245 png) to the Netlinx server image folder, then have code select the proper icons the user setup and ftp/load them to the touchpanel using the names of the files that were stored on the Master. This way I can update/add whatever icons I need without having to upload all 34 touchpanels.
I already use an icon favorites - the user can select from 245 different icons which get stored for recall, but the images have to be loaded on the touchpanels.
I use the ^BBR command to upload/refresh images with my picture frame module, but I have preset dynamic names setup in the panels (image1/image2/image2) when selecting the image?, the panel receives the image over ftp from the Netlinx server, the user and just replace the images thru ftp as long as they have the same names.
So what part isn't working? Are you trying to change the filename of the dynamic image?
What you're trying to do makes sense and using the ^RMF command as Joe suggested would be the way to go. Don't think you need the ^BBR command if all you're doing is changing channel icons to match the users selection to existing dynamic image resource names like FAV_1 - FAV_10. Just tuse the ^RMF commnad to change the file name of the selected FAV_x and then do the ^RFR command but the button with the dynamic image will most likely have to be in focus to actually refresh. The ^RFRP command I mentioned ealier is supposed to work whether in focus or not but that command appeared and then disappeared.
If using the ^RFR command you can always just display a 5 x 5 pixel button with a low opacity to accomplish the refresh and no one would be the wiser.
After I read your post the light bulb went on. As you both suggested ^RMF works fine.
Thanks for both of your help!
-Gary
I ended up changing my OLD code around so the tv/music logo icons look at the png image name instead of the panel icon slot number. I can now update the logo icons or add new ones without having the array slots shift position.
Ends up there is a bug in the current firmware that is preventing ^RMF from working if the image is stored in teh root directory of the master. You have to store the image in a sub folder (like the Images folder already there - now why didn't I think of that) Then include the sub folder in teh ^RMF command.
Of course I didn't find this out until I was 3 hours from the job site on my way home Friday afternoon.
The problem happens when you start to send commands to load different files. They stop loading after 3-5 images(4k files).
I likewise had a subfolder. It didn't help. I think it's more a matter of multiple images being loaded sequentially.
When I get some time I'll double check what I did but I do recall it be a little convoluted.
I was loading tv icon images (png files) from the Netlinx master over FTP. It should work but it doesn't, the files are only max 5k each. The problem is in the Netlinx, the first 3 to 5 images load fine and MAYBE 1 or 2 would load 30 seconds later and then stop. Like I said before I have no problem load larger images that are stored on the master for my picture frame, it's the quantity of small images.
I hope AMX fixes this problem, as storing all your icon on the master is the way to go!
I'm updating all 9 Rad/Sat images at the same time too and all though I would like it to be faster it's not all that bad and they all do update. Which is very noticeable when switching from standard images to IR or water vapor images.
At least since they increased the TPs RAM the Rad/Sat animation works much better.
Right now I'm so busy my head hurts otherwise I'd play with it some more or at least go through my code and see if I can figure out what I did.
I've attached a screen shot image pulled from the 8400i manual. I'm doing some other goofy $hit in my code so this by itself may not help.
Correct me if I'm wrong but, I'm pulling the images from the Netlinx master over FTP. I think you're pulling from the internet over HTTP.
Have you considered using HTTP instead of FTP with your dynamic images? I used dynamic images configured for HTTP for a movie module that I wrote. One of the things the module did was grab movie posters for movies that were playing in the area (near the zip code entered by the user), from the web, and stored them on the Netlinx master (pre DUET). On the Now Showing page I displayed 6 posters at a time (100x150 .jpg approx 4K each) and they displayed without any problems. When the user hit next page the dynamic images updated with the next set of 6 posters that were stored on the Netlinx master. This worked fine on an old MVP-8400 without any memory upgrade. I?m not sure if it will make a difference for you but it may be worth a shot to try switching from FTP to HTTP. My images were .jpg and you say you?re using .png. I wouldn?t think that should make a difference but maybe it does. Or maybe it?s DUET vs. non DUET issue.
You many also want to consider dropping the ^RFR command since the dynamic image will update on its own when it?s displayed or whenever the URL is changed with the ^RMF command. Ever since Dave Hawthorne made mention of this a long while back I haven?t had the need to use it. I?m not saying the ^RFR command (or ^RFRP) is bad or shouldn?t be used. I?m just saying for my instances I haven?t needed it. Maybe your dynamic images are doing twice the work they need to do.
I have noticed that the very first time dynamic images are displayed it sometimes take forever and a day to load. If you wait for the images to load, then leave the dynamic images page, and then come back to it later it updates much quicker. It?s just the very first time it?s ever used.
I'm not holding my breath but I hope some of this fodder is of some use.
I just check my files and my animated radar uses .png and my satellite images are .jpg so who knows?
Edit: silly me should have read the SECOND page of the thread . . . oops.
If you send me an email, I'll send you a link to download a small test program/panel/icons in a zip file to test on your systems. It doesn't work here and I think I've tried everything. I get the same results that Dave said in his post, some display and some don't.
File to large to upload here (5mg).
Hopefully you got my emails with some new code that I sent you. I got it working perfectly using HTTP, a modified loop, and a Timeline to space out the ^RMF commands (sans ^RFR). Each page of 8 loads in less than a second and a half and it hasn?t missed a one. I tested the same code using Dynamic Images with FTP and there is definitely a difference (at least on my system) FTP doesn?t work nearly as well as it misses image updates every other page flip or so. I can?t make it miss with HTTP.
Great idea with the icons. I?m going to have to steal it now.
Sinced it's fixed sharing may not be as desierable as before but if if you are still so inclined send to: viningele@msn.com .
Gary, I also understand you have a module for UPBs. Would you be willing to sell an open source version? If so, email the desired $$.
As a follow up, I can?t get any images to load in the TP if I enable HTTP password protection on my NI-700 (DUET latest firmware). When I do a Get Live Feed test for the Dynamic Image with TPD4 I get an error that reads: Unable to load image file; file may not exist or may not be a PNG or JPG image.
I have the correct user name and password entered in the Dynamic Image settings. If I disable HTTP security then the images load perfectly in the TP. If I enable HTTP security I get zip, nada, nothing. Anyone have any ideas on why that is?
Regarding posting the code, it won?t do much good without the entire project (which is too big to post here) and I?d rather not post anything without Gary?s permission. All I did though is add a Timeline event to pace out the ^RMF commands and modified the loop a bit.
The images won't load with HTTP if you have Netlinx password is on (which is a must in all my systems). They will load with FTP, just VERY slow and sporadic. Even when you turn OFF Netlinx password it's not smooth.
As of now:
I let the user select from over 200 icons that are stored on each panel (pic1). This is a HUGE waste of time when it comes to updating or adding icons. Once the user has selected/changed their icons, the panel will only display their choices (pic2) which only needs to be loaded once when the panel comes ONLINE.
Need to do:
Have all icons (tv/dss/cable/xm/sirus) reside on the Netlinx master, not in the touchpanels. Updating and/or adding icon will be very easy.
Send me your email and I'll send you a link to the test code. gary@gslogic.net
Bottom line though I think is you can?t just blast away that many ^RMF commands to on screen dynamic images with a FOR loop (at least with the firmware as it stands now.) You have to throttle them somehow with a Timeline or queue or you?re going to continue getting undesirable results.