01-24-2012 04:35 AM
Hi,
I was created TS_Sequence_Insert_Step (newSequence, &errorInfo, StepHandle, 0, TS_Step_Group_Main) but now I need to create Locals with the same names as in subsequence. Furtermore, need to create container within locals. I don't find any command related to Container creation. I was tried with TS_SequenceGetLocals, but seems to be it does not work. Do you have any idea how to handle this ? I've tried to do "manually" and in locals possible to Insert->container. How to code this ?
I use CVI 2010.
Best regards,
branar
01-24-2012 05:29 AM
01-24-2012 10:19 AM
If you are creating just a runtime copy of the locals, then changing the StationGlobals to Locals will be fine.
01-25-2012 04:26 AM
Hi,
I was tried to "translate" testStand code from example into CVI, bus some error appear with:
tsErrChkMsgPopup( TS_PropertySetPropertyObject (EngineHandle, &errorInfo, "Locals.Mystuff", TS_PropOption_InsertIfMissing, locals));
Before I was set new object:
error = TS_EngineNewPropertyObject (EngineHandle, &errorInfo, TS_PropValType_Container, FALSE, "NAprop", 0, &locals); error = TS_PropertySetValNumber (locals, &errorInfo, szStartFreqMHz, TS_PropOption_InsertIfMissing, 0.0); error = TS_PropertySetValNumber (locals, &errorInfo, szStopFreqMHz, TS_PropOption_InsertIfMissing, 0.0); error = TS_PropertySetValNumber (locals, &errorInfo, szResBWHz, TS_PropOption_InsertIfMissing, 0.0); error = TS_PropertySetValNumber (locals, &errorInfo, szSrcPowerdBm, TS_PropOption_InsertIfMissing, 0.0); error = TS_PropertySetValNumber (locals, &errorInfo, szSaveinReg, TS_PropOption_InsertIfMissing, 0.0); error = TS_PropertySetValString (locals, &errorInfo, szSsuRoute,TS_PropOption_InsertIfMissing , " "); error = TS_PropertySetValString (locals, &errorInfo, szConnect_text,TS_PropOption_InsertIfMissing , " ");
SetPropertyObject is not working (ActiveX error).
Best regards,
branar
Also, in previous example container was in Main.sequence.Locals dispite his path was Station.Globals.
Can you help me with this ?
01-25-2012 04:51 AM
Hi,
When you make your copy of the variable in Locals, you need to be using the SequenceContext not the Engine because there is not Locals at the Engine level.
tsErrChkMsgPopup( TS_PropertySetPropertyObject (SequenceContext, &errorInfo, "Locals.Mystuff", TS_PropOption_InsertIfMissing, locals));
01-25-2012 07:43 AM
Hi Ray,
Thank you, now work fine.
Best regards,
branar