You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old April 3rd, 2019, 12:44 PM   #1
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
Crimson 2 - RedLion G3 - Image Primitave

Page 171 of the Crimson 2.0 manual for RedLion G3 HMI series talks about being able to display a photo/image as a primitive object. On the HMI G3 series that must use Crimson 2.0. The photo must be stored on the installed Compact Flash, using a command line utility program called "makepic". The manual mentions most of the steps required; but, like so many "instructions", the Devil is in the details.
I need a little help to launch this user program .. kind of a "tutorial" Because I'm not really good with Command Line processes. Yes. Crimson 2.0 is dated stuff, and Crimson 3.0 is awesome.. and it's very easy to use pictures on your HMI with C3 (been there done that
I'm new to C2 .. an' didn't appreciate what can happen if you purchase a RedLion G3 on eBay, without checking first if it can be configured with C3 ..DUH!.
I just need a little explanation of the below instructions, as a tutorial ... Thanks much, Regards, Michael
Attached Images
File Type: jpg Crimson_User_Manual_-_C2 .jpg (158.1 KB, 99 views)
  Reply With Quote
Old April 3rd, 2019, 07:32 PM   #2
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
Perhaps this is best a post for Windows 7 help Forums..
This is more an issue about the proper operation of Command Prompt, than anything related to the RedLion HMI... sorry, But that's the way RedLion chose to do this. I can navigate to the final folder where "makepic.exe" is located in the command line... but how to launch the application..is beyond me, and the above text from RedLion. I was just hoping that if this above instruction makes any sense to you out there, you might give me some clue what the steps and expectations are. I have a folder: MyImages, which contains two images: picture.bmp 1 and picture.bmp 2 That folder is located at C:\ MyImages. The folder where makepic.exe is located: C:\ Program Files (x86) \ Red Lion Controls \ Crimson 2.0 \ makepic
The instruction above claims makepic C:\MyImages\picture.bmp 1 ... as a command line, will launch that application, and make a file "under the makepic installation folder" (whatever that means?)
Yes..I should ask Red Lion support directly.... sigh! but, this isn't really a RedLion problem (other than their bad instructions) it's a PC thing isn't it... ? Thanks
  Reply With Quote
Old April 4th, 2019, 05:46 AM   #3
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,370
I tried this on a WinXP VM. On your computer navigate to C:\Program Files\Red Lion Controls\Crimson 2.0, by double clicking on My computer, then the C drive, say yes when it asking is you want to see these files, and so on. In the Crimson 2.0 folder you will find a program called Makepic. In the Window that shows the Crimson 2.0 folder, go to the top of the screen an select 'View/Toolbars/ and switch on the Address Bar, so that you can see the path to the folder. Right Click on the path and select Copy. Go to All Programs / Accessories / and click on command prompt. In the command prompt Window type cd followed by a space and then right click and Paste the address from above.
Code:
cd C:\Program Files\Red Lion Controls\Crimson 2.0
The Command Prompt should now show the same path as you found above. Right Click the picture you want to copy and the Right Click the Location and Copy to get the path to the picture. I prefer to edit instructions in Notepad so that I can easily play with them. I typed and then copied and patsed to the command prompt:
Code:
makepic "C:\Documents and Settings\VirtyMe\Desktop\Cimrex 1.jpg"
Which failed because it won't work with jpgs, but should work if you feed it a bmp. One thing to note is the quotation marks around the address, this is because the address contains spaces which stops things working. cd is change directory.


I don't have a Windows 7 VM, so went to Windows 10, the difference is that the path to the Crimson 2.0 is now C:\Program Files (x86)\Red Lion Controls\Crimson 2.0 and to get to the command prompt I go to All Programs \ Windows System. And instead of having to switch on the View Toolbar I just clicked in the path shown onscreen and it changed automatically to an address that I could right click.


Sorry some of that is a bit rushed, busy morning today.
__________________
Knowledge is power, share the knowledge.
  Reply With Quote
Old April 4th, 2019, 07:34 AM   #4
kolyur
Lifetime Supporting Member + Moderator
United States

kolyur is offline
 
kolyur's Avatar
 
Join Date: Oct 2004
Location: Wooster, Ohio
Posts: 1,438
Is there a reason you aren't just using the regular Image primitive in Crimson? It lets you browse for an image and you can choose whether the images are stored in the C2 database (which I'd recommend) or just links to them. I've done lots of image primitives in Crimson 2 and to be honest I wasn't even aware that there was an option to load a pic from the CompactFlash.

As far as your original question, I'll add that when I'm using command line utilities, I usually temporarily copy all the relevant files to the root level of the drive. This makes for less typing and simpler operation of the prompt window. So:
1. Copy makepic.exe and your BMP file to the root of C drive.
2. Open a command prompt (on Win 7+ you may have to right-click and do "Run as Administrator" in order for it to work right).
3. Type "cd C:\" to make sure it's pointing at the root level of the drive.
4. Type "makepic image.bmp 1", changing the parameters as necessary.

I tested this on my Win 7 system and it seemed to work fine.
__________________
John
  Reply With Quote
Old April 4th, 2019, 10:01 AM   #5
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
BryanG

That's an amazing tutorial!
I'm curiious... you said you tested this on your XP machine. I assume you have Crimson 2.0 ... wondering how you know when it actually works. The copied bmp photo will be placed "under the makepic installation folder" (acording to the Red Lion instructions last paragraph) Any idea where/what that is?



I'm not totally Dim, but really appreciate instructions that assume I might be, you are a fine teacher, Thanks much.
  Reply With Quote
Old April 4th, 2019, 10:27 AM   #6
kolyur
Lifetime Supporting Member + Moderator
United States

kolyur is offline
 
kolyur's Avatar
 
Join Date: Oct 2004
Location: Wooster, Ohio
Posts: 1,438
Quote:
Originally Posted by Lamboom View Post
The copied bmp photo will be placed "under the makepic installation folder" (acording to the Red Lion instructions last paragraph) Any idea where/what that is?
Generally a command-line utility will produce its output file(s) in the same folder where the executable is located. So in this case that would be C:\Program Files\Red Lion Controls\Crimson 2.0\. When I ran makepic.exe it created a file called "pic001.g3p" which I assume would be copied to the CompactFlash card per their instructions.
__________________
John
  Reply With Quote
Old April 4th, 2019, 10:34 AM   #7
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
kolyur

The reason I'm using an "image" primitave, is because that's the way Red Lion talks about a photo, or picture. They never use such words in their literature as photo or picture. Crimson 3.0 has wonderfully easy ways to include photos for objects, even movies.

On some of the "pages" .. there are pictures.. This HMI isn't controlling a manufacturing process, well sort of ..it's just making waves .. "Micro Oceans" on YouTube



Your routine for command-line utilities is interesting. I will try that .. Thanks
however, here's where my dimness comes in.. I'm not sure of the definition of "root level of the drive" .. Is that the first list of folders & applications you see? That's where I placed my folder of bmp images


You also tested this... where did the copy go?

Last edited by Lamboom; April 4th, 2019 at 10:41 AM.
  Reply With Quote
Old April 4th, 2019, 10:39 AM   #8
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
kolyur

Sooo.. you think it will go into that same folder as Crimson 2.0.
Makes sence... The instruction states that I will have to copy that to the flash drive. That's easy. Will post results...
  Reply With Quote
Old April 4th, 2019, 10:49 AM   #9
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,370
I hadn't actually got it to work, but I played some more. As kolyur said it is easiest to create a folder somewhere and right click and copy makepic and your bmp image to that folder, I stuck it on the desktop of my Virtual Machine XP. I did miss that you have to have a number after the instruction, so I ended up with:
Code:
makepic "C:\Documents and Settings\VirtyMe\Desktop\test\Contactor.bmp" 1
Which gave me a file in that same folder called 'pic001.g3p'. When it works you don't get any message from makepic, the new file just appears. If it doesn't work then it will give you an error message.
__________________
Knowledge is power, share the knowledge.
  Reply With Quote
Old April 4th, 2019, 11:25 AM   #10
kolyur
Lifetime Supporting Member + Moderator
United States

kolyur is offline
 
kolyur's Avatar
 
Join Date: Oct 2004
Location: Wooster, Ohio
Posts: 1,438
Quote:
Originally Posted by Lamboom View Post
I'm not sure of the definition of "root level of the drive" .. Is that the first list of folders & applications you see? That's where I placed my folder of bmp images

You also tested this... where did the copy go?
Yes, the root level is just the top level of the drive. When you double-click on the drive in My Computer, that's what you see. This level is referenced as "C:\" in DOS which just makes it easier for doing command line work, in my opinion, as you don't have to worry about folder paths. In my case, the pic001.g3p file ended up in C:\ because that's where I ran the executable from.

I could be missing something--tell me if I am--but I think you're overcomplicating this. Why not just use the Image primitive in Crimson 2 and forget the whole CompactFlash/makepic rigamarole? It works much the same as in C3, with fewer bells and whistles.
Attached Images
File Type: png c2.png (38.2 KB, 76 views)
__________________
John
  Reply With Quote
Old April 4th, 2019, 11:34 AM   #11
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
BryanG

The first trys didn't work .. there may be something wrong with my .bmp... I'll use a folder as kolyur suggested .. :-)

See pics..looks like the application is getting launched, but can't load the bmppicture...?

cmd 001.jpg


Haven't figured out how to get the pictures in the body of the post...sigh!
Attached Images
File Type: jpg cmd 001.jpg (17.9 KB, 7 views)
File Type: jpg cmd _004.jpg (26.6 KB, 5 views)

Last edited by Lamboom; April 4th, 2019 at 12:06 PM.
  Reply With Quote
Old April 4th, 2019, 11:39 AM   #12
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
Kolyur

You Have to be kidding! GADZOOKS! you mean there's an Image button in Crimson 2.0 ... Perhaps I really am Dim .. sigh .. Must research.. will get back to you on this.
  Reply With Quote
Old April 4th, 2019, 12:00 PM   #13
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
Hi all ... Yes, there is an easy image insert feature in Crimson 2.0.. They didn't mention that in the manual, when I researched image primitives. The only information I found was what you see starting at page 171 in the manual. Aparently the image quality is not so good when installed this way, and they suggest using the Compact Flash card to store images. Perhaps, I will use your suggestion kolyur, there are only 2 pictures... But, Would be nice if the CF could be used... :-)
  Reply With Quote
Old April 4th, 2019, 12:22 PM   #14
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,370
I hit the same problem when using makepic in its default location, copying to a folder on my desktop got things working. windows can be a bit picky about where you try to run things.
__________________
Knowledge is power, share the knowledge.
  Reply With Quote
Old April 29th, 2019, 10:42 PM   #15
Lamboom
Lifetime Supporting Member
United States

Lamboom is offline
 
Lamboom's Avatar
 
Join Date: Mar 2014
Location: Fallbrook, Ca
Posts: 250
I tried the single folder, containing the application "makepic" on the desktop. Didn't work. I might be making some syntax errors in command line programming. There was some good advice about the proper way to write the command line.


I asked Red Lion about it and here was their reply (they have an awesome support team) … they sent this:

(I guess the picture is down below as a link)

I tried to follow the new "tutorial" ... and something still isn't right. I hate to bug them about what is probably a Windows thing. (Windows 7 Pro)

I'm using Crimson 2.0 to program an older G3 HMI. The conversion program (command line Utility) I believe. is identical in Crimson 2.0 and Crimson 3.0


The Red Lion Support(Stephan Harner) provided an example Command line, where the makepic application is located as installed in the Red Lion Controls folder, in the drive root directory. The actual picture: Image1.bmp is stored on the Desktop.


You can see here how I did not succeed:

(Another example of where I can't figure out how to attach photos in the body of the email... sigh!)

Wondering about "Windows\system32" in the command line..My PC is 64 bit, Windows 7 Pro... I tried removing it... didn't help... and Yes.. I did launch Command Prompt as Administrator...
Attached Images
File Type: bmp Red Lion Pics to CF Card.bmp (1.66 MB, 3 views)
File Type: bmp Command_line_for_Red_Lion_Pic_to_Cf_003_jpg 2.bmp (1.46 MB, 3 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
How to switch drivers lbeh LIVE PLC Questions And Answers 7 December 11th, 2014 02:11 PM
Redlion Crimson 3 - How do to a simple image replace animation? gbeaker LIVE PLC Questions And Answers 4 May 6th, 2014 01:08 PM
crimson redlion g3 data tag scaling kashifidrees LIVE PLC Questions And Answers 3 May 14th, 2013 06:58 AM
redlion 306 image irondesk40 LIVE PLC Questions And Answers 9 September 29th, 2012 09:20 PM
REDLION Crimson 3.0 & G3 Panel - Datalog in SIM Mode? skyfox LIVE PLC Questions And Answers 4 January 25th, 2012 01:42 AM


All times are GMT -5. The time now is 12:26 AM.


.