Jump to content

PCM code for get and set characteristic decimal places


---
 Share

Recommended Posts

Hello everyone,

Does anyone have the PCM code for get and set the decimal places of characteristic? I am trying to write a PCM to set the decimal places based on certain condition, but I don't find the PCM code for setting decimal places for characteristic. I know that we could manually set the decimal places in the characteristic setting editor. but that's manual and does not change with conditions.

Thanks.

Pengyou

Link to comment
Share on other sites

Possibly, try this.

format(3278,45) = "3278,45"

formatL(12345.67,10,4) = "12345.6700"

Example:

Circle1 is preset to 5 places.

The digit 10 limits the string to 10 places (Double check that).

The digit 2 sets the decimal places to two places.

MyVar=getActual("Diameter_Circle1").diameter
formatL(MyVar,10,2)

I am not sure how to pass this to the Decimal places setting yet, or if you can pass it.

Upon testing it doesn't affect the decimal place readout.

 

You can find a lot of PCM information in this location:

C:\Program Files (x86)\Zeiss\CALYPSO 7.4\userinfo\manuals\en-US

Change this "CALYPSO 7.4" to your version.

Look for a file named: Calypso_02_pcm.pdf

Edited
Link to comment
Share on other sites

Thanks Richard. I think that's a good way of realising the decimal places for each characteristics, it requires creating a variable/parameter for each dimension and create the result elements to report them.

Since Calypso has the function of assigning the decimal places for each characteristics, it would be preferable to have the PCM code for assigning the decimal places. It is kind of characteristic attribute. I just don't know the PCM command.

Link to comment
Share on other sites

I believe it will fall under this. 

I tried using setRecordHead("outdecimalunits"), but it and things like lengthunit do not get transferred to PiWeb. 

Maybe someone else knows a secret way. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...