Crimson 2 - RedLion G3 - Image Primitave

Lamboom

Lifetime Supporting Member
Join Date
Mar 2014
Location
Fallbrook, Ca
Posts
350
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
default_smile.png

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

Crimson_User_Manual_-_C2 .jpg
 
Perhaps this is best a post for Windows 7 help Forums..
default_smile.png

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
 
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.
 
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.
 
BryanG

That's an amazing tutorial! :geek:
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.
 
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.
 
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:
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...
 
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.
 
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.

c2.png
 
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!

cmd 001.jpg cmd _004.jpg
 
Last edited:
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.
 
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... :)
 
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.
 
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...
 

Similar Topics

I've got a few images I want to play together in series to make an animation. I've got the frames already setup as in a single image object, but...
Replies
4
Views
2,975
Hi, I have a complex database in Crimson 3.0 and in one of the display pages I am trying to get a tag to show the sum of several other tags. The...
Replies
3
Views
137
It states WinPcap must be installed for the Emulator to function. WinPcap.org states that the technology is mature with no updates planned. Am I...
Replies
3
Views
823
Following on from another thread, I just downloaded Crimson 3.2 and it now supports CR and Graphite HMIs. Time for a 'play' :-) It seems to have...
Replies
14
Views
1,963
Action On Release command Set(ConveyorPopup,ConveyorPop_1) rejected w/ string tags. SetStringTag(index, data) wants an index. How does one pass...
Replies
8
Views
910
Back
Top Bottom