Any ideas why this Crimson code won't compile?

TConnolly

Lifetime Supporting Member
Join Date
Apr 2005
Location
Salt Lake City
Posts
6,152
Prototype: cstring RecipeMnemonic(void)

Code:
/*
Returns a string as 000.0KN-00C-00.0S
Where 000.0KN is programmed force in KN
00C is dither counts.
00.0S is dwell in seconds.
*/

Return DecToText(Force,0,3,1,1,0) + "KN-" + IntToText(Counts,10,2)+"C-" + DecToText(Dwell,0,2,1,1,0)+"S";


For some reason I cannot get this to compile. Its for a G307K2. Crimson reports an error but it doesn't tell me what it is and I can't see anything wrong with it. I tried the AsText() function as well. I originally had Force,Count,and Dwell as passed parameters, right now they are tags but once I get this to compile I want to go back to using passed parameters so I can reuse this function.
 
Prototype: cstring RecipeMnemonic(void)

Code:
/*
Returns a string as 000.0KN-00C-00.0S
Where 000.0KN is programmed force in KN
00C is dither counts.
00.0S is dwell in seconds.
*/

Return DecToText(Force,0,3,1,1,0) + "KN-" + IntToText(Counts,10,2)+"C-" + DecToText(Dwell,0,2,1,1,0)+"S";


For some reason I cannot get this to compile. Its for a G307K2. Crimson reports an error but it doesn't tell me what it is and I can't see anything wrong with it. I tried the AsText() function as well. I originally had Force,Count,and Dwell as passed parameters, right now they are tags but once I get this to compile I want to go back to using passed parameters so I can reuse this function.


Possibly it isn't finding the tags or the tags are of the wrong type.

It compiles for me when I have tags named Force, Counts, and Dwell.
 
I have the tags Force (float),Counts (integer),Dwell (float).

I'm racking my brain here because it should have compiled.

I changed the function prototype back to what I originally started with:

cstring RecipeMnemonic(float Force, int Counts, float Dwell)

where Force, Counts, and Dwell are parameters (which is what I actually wanted) and deleted the tags Force, Count, Dwell from the tag DB and then it compiled. Go figure. I don't think anything was different. o_O Oh well, after trying for two hours yesterday and at least two today I finally got what I wanted, still not sure what was wrong with what I had.

Thanks anyways.
 
I have the tags Force (float),Counts (integer),Dwell (float).

I'm racking my brain here because it should have compiled.

I changed the function prototype back to what I originally started with:

cstring RecipeMnemonic(float Force, int Counts, float Dwell)

where Force, Counts, and Dwell are parameters (which is what I actually wanted) and deleted the tags Force, Count, Dwell from the tag DB and then it compiled. Go figure. I don't think anything was different. o_O Oh well, after trying for two hours yesterday and at least two today I finally got what I wanted, still not sure what was wrong with what I had.

Thanks anyways.

By the way, are you using the latest release 530.001 If not, make sure you download it - it fixes comms issues with the KADET2.
 
I am using the latest build (Crimson updates more often than Adobe 🍺)

However I have never been able to get any of the Kadets to run in the emulator. I can run G3s in the emulator.
 
I am using the latest build (Crimson updates more often than Adobe 🍺)

However I have never been able to get any of the Kadets to run in the emulator. I can run G3s in the emulator.


KADET2 does not have emulator support, at least not yet, who knows what they might do next.

I was able to have a part in the Beta process of Crimson 3.0. We sometimes got more than one update each day so I think the updates come out slowly...
 

Similar Topics

In setting up a HMI on a control panel the managers decided we needed a remote so looking at using tablets. Not a real issue. the inbuilt web...
Replies
4
Views
2,181
I was just wondering if anyone had any experience with a VEGAPULS C 22 Radar sensor. One of my customers got a cold call from one of there reps...
Replies
10
Views
2,792
Hello Collegues ! I am here today looking for help, i recently started a magister in controls and automation. I was thinking in doing an automated...
Replies
7
Views
1,983
We have AOIs for projects, which handle material dosing (by hand or by pipes and pumps), obviously they have comparison between setpoint and...
Replies
50
Views
14,190
Wizards, With all the extra downtime this year, I have started guiding the newer maint staff through a test cell build. It has been quite...
Replies
1
Views
1,362
Back
Top Bottom