Jump to content
OMRON Forums

Cannot set CFunc


daves

Recommended Posts

I cannot set UserAlgo.CFunc to 1 on my card. On a 1.5.8.0 card this is no problem. It means my CFromScript code will not run from a background PLC.

 

What does CFuncStatus mean. It is not in the SRM, UG, or Help?

 

$$$***
Resetting PowerPMAC
PowerPmac Reset complete
Please wait!!! database Sync in progress
Database sync complete
useralgo.CFuncStatus
UserAlgo.CFuncStatus=0
useralgo.CFunc=1
useralgo.CFunc
UserAlgo.CFunc=0
useralgo.CFuncStatus
UserAlgo.CFuncStatus=-1
vers
1.6.0.30

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...

I'd like to confirm daves findings.

 

My system (v 1.6.030) always reports UserAlgo.CFunc=0. I've tried setting it =1 from the terminal window and in "pp_startup.txt". Neither works. However, despite this setting always being =0, if I try using a "CfromScript" call it works in some cases:

 

Call from PLC 0 - yes OK

Call from motion program - yes OK

Call from PLC 1 (background) - not OK

 

If I understand the manual correctly, none of these should work when UserAglo.CFunc=0!

 

Can someone at DeltaTau explain what we are doing wrong - or whether it's in fact a system bug, and if so, whether it's being worked on?

 

Thanks.

Link to comment
Share on other sites

I'd like to confirm daves findings.

 

My system (v 1.6.030) always reports UserAlgo.CFunc=0. I've tried setting it =1 from the terminal window and in "pp_startup.txt". Neither works. However, despite this setting always being =0, if I try using a "CfromScript" call it works in some cases:

 

Call from PLC 0 - yes OK

Call from motion program - yes OK

Call from PLC 1 (background) - not OK

 

If I understand the manual correctly, none of these should work when UserAglo.CFunc=0!

 

Can someone at DeltaTau explain what we are doing wrong - or whether it's in fact a system bug, and if so, whether it's being worked on?

 

Thanks.

 

Hi,

 

"UserAlgo.CFunc=1" enables that the function can be called from background routines.

If you do not set "UserAlgo.CFunc=1", you can access CfromScript from Realtime Interrupt ( RTI PLCs, RTICPLCs, kinematics, etc... ).

 

And, as I know it's better to insert "UserAlgo.CFunc=1" in "global_definitions.pmh".

 

Lastly, If you want to set "UserAlgo.CFunc=1", you should declare "double CfromScript(..)" in usrcode.c and usrcode.h and export Symbol.

You cannot set "UserAlgo.CFunc=1" before declaring "CfromScript" function.

 

I succeeded in the way described above.

Link to comment
Share on other sites

I think the purpose of CFunc was understood; to enable the CFromScript in BG tasks, this is just not what the manual states.

 

The real point is not being able to set it. I have made a blank project declaring and exporting the CFromScript copied from the manual and still cannot get CFunc to be set to 1.

 

There has to be something else going on and maybe CFuncStatus is the clue...

Link to comment
Share on other sites

I think the purpose of CFunc was understood; to enable the CFromScript in BG tasks, this is just not what the manual states.

 

The real point is not being able to set it. I have made a blank project declaring and exporting the CFromScript copied from the manual and still cannot get CFunc to be set to 1.

 

There has to be something else going on and maybe CFuncStatus is the clue...

 

We identified the issue with this perticular problem scenario.

If you keep using "Build and Download " OR build and Download RealTimeRoutines you will be able to set the useralgo.CFunc to 1 and use it correctly. For build and Download RealTimeRoutines option, select RealTime Folder and then right click to build and Download RealTimeRoutines fuction

We will be fixing this in FW and IDE SW and release it as a patch.

Thanks

Atul

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...