Search talk: ST IF

 
<< < 1 .. 6 7 8 9 10 .. 42 > >> (Page 8 of 42)

Post by caprez95 on Trace Restart Visuelement CODESYS Forge talk (Post)
Hallo zusammen. Ich habe schon länger mit dem Problem zu kämpfen, dass ich einen Trend (Visuelement) nicht resetten (neustarten) kann. Ich habe es jetzt mit dem Beispiel hinbekommen, die Trace-Aufzeichnung über die CmpTraceMgr Bibliothek zu steuern. Aber wie bekomme ich diese Trace-Aufzeichnung in ein Visuelement? Der Code sieht wie folgt aus: // Configure trace IF xInit THEN // Create a trace packet PacketConfig.pszName := ADR('IECTraceConfiguration.Trace1'); // Name of trace PacketConfig.pszApplicationName := ADR('IECTraceConfiguration'); // Name of the application PacketConfig.pszIecTaskName := ADR('Task'); // Name of the task PacketConfig.pszComment := ADR('Demo packet'); PacketConfig.ulEveryNCycles := 1; PacketConfig.ulBufferEntries := 1000; PacketConfig.ulFlags := TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_TIMESTAMP_MS AND TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_AUTOSTART; IF (NOT fbTraceManager.CreatePacket(PacketConfig := PacketConfig, hPacket=>hPacket1)) THEN xError := TRUE; END_IF // Create a trace record RecordConfig.pszVariable := ADR('iSignal'); // This is the name of variable to record RecordConfig.tcClass := INT_TO_UDINT(TypeClass.TYPE_INT); // Type of the recording variable RecordConfig.ulSize := SIZEOF(iSignal); // Size of the recording variable pApp := AppFindApplicationByName('IECTraceConfiguration', 0); AppGetAreaOffsetByAddress(pApp, ADR(iSignal), ADR(RecordConfig.tvaAddress.taAddress.Area.usArea), ADR(RecordConfig.tvaAddress.taAddress.Area.ulOffset)); // Get and set area offsets RecordConfig.tvaAddress.ulAddressFlags := TRACE_VAR_ADDRESS_FLAGS_IEC OR TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET; RecordConfig.ulGraphColor := 16#FF00FF00; // green RecordConfig.ulGraphType := 1; // Line with points IF (NOT fbTraceManager.AddRecord(RecordConfig := RecordConfig, hPacket := hPacket1, hRecord => hRecord1)) THEN xError := TRUE; END_IF xInit := FALSE; END_IF // Starts the recording IF xStart THEN IF (NOT fbTraceManager.StartPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStart := FALSE; END_IF // Stop the recording IF xStop THEN IF (NOT fbTraceManager.StopPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStop := FALSE; END_IF // Reset the recording IF xReset THEN IF (NOT fbTraceManager.ResetPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xReset := FALSE; END_IF
Last updated: 2024-06-04

Post by caprez95 on Trace Restart Visuelement CODESYS Forge talk (Post)
Hello everyone. I've been struggling with the problem for a long time that I can't reset (restart) a trend (visual element). With the example I have now managed to control the trace recording via the CmpTraceMgr library. But how do I get this trace recording into a visual element? The code looks like this: // Configure trace IF xInit THEN // Create a trace packet PacketConfig.pszName := ADR('IECTraceConfiguration.Trace1'); // Name of trace PacketConfig.pszApplicationName := ADR('IECTraceConfiguration'); // Name of the application PacketConfig.pszIecTaskName := ADR('Task'); // Name of the task PacketConfig.pszComment := ADR('Demo packet'); PacketConfig.ulEveryNCycles := 1; PacketConfig.ulBufferEntries := 1000; PacketConfig.ulFlags := TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_TIMESTAMP_MS AND TRACE_PACKET_FLAGS.TRACE_PACKET_FLAGS_AUTOSTART; IF (NOT fbTraceManager.CreatePacket(PacketConfig := PacketConfig, hPacket=>hPacket1)) THEN xError := TRUE; END_IF // Create a trace record RecordConfig.pszVariable := ADR('iSignal'); // This is the name of variable to record RecordConfig.tcClass := INT_TO_UDINT(TypeClass.TYPE_INT); // Type of the recording variable RecordConfig.ulSize := SIZEOF(iSignal); // Size of the recording variable pApp := AppFindApplicationByName('IECTraceConfiguration', 0); AppGetAreaOffsetByAddress(pApp, ADR(iSignal), ADR(RecordConfig.tvaAddress.taAddress.Area.usArea), ADR(RecordConfig.tvaAddress.taAddress.Area.ulOffset)); // Get and set area offsets RecordConfig.tvaAddress.ulAddressFlags := TRACE_VAR_ADDRESS_FLAGS_IEC OR TRACE_VAR_ADDRESS_FLAGS_AREA_OFFSET; RecordConfig.ulGraphColor := 16#FF00FF00; // green RecordConfig.ulGraphType := 1; // Line with points IF (NOT fbTraceManager.AddRecord(RecordConfig := RecordConfig, hPacket := hPacket1, hRecord => hRecord1)) THEN xError := TRUE; END_IF xInit := FALSE; END_IF // Starts the recording IF xStart THEN IF (NOT fbTraceManager.StartPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStart := FALSE; END_IF // Stop the recording IF xStop THEN IF (NOT fbTraceManager.StopPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xStop := FALSE; END_IF // Reset the recording IF xReset THEN IF (NOT fbTraceManager.ResetPacket(hPacket := hPacket1)) THEN xError := TRUE; END_IF xReset := FALSE; END_IF
Last updated: 2024-06-04

Post by trusty-squire on How to adapt Codesys Control SL to custom board CODESYS Forge talk (Post)
For general usage, these links might help you out. If you are looking at using I2C interfaces, examples from the Raspberry Pi will probably be useful, even if your board isn't a Raspberry Pi. https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_rts_serial_com.html https://content.helpme-codesys.com/en/CODESYS%20Examples/_ex_raspberry.html If you're developing your own drivers, I can't help you there, although the link you provided will help. If you drill in deeper, the I2C page for example shows function block and method usage, etc. Good luck!
Last updated: 2024-08-09

Post by timvh on Visualization using methods and cyclic ST-calls CODESYS Forge talk (Post)
I think you want to implement client side scripting? Maybe creating HTML5 objects is an option, because the JavaScript is executed on the client side. See html5
Last updated: 2023-10-03

Post by gerdkoch on Version 3.5.19.40 probleme bei FUN mit _to_ im Name CODESYS Forge talk (Post)
hi, den einen workaround kennst du ja. Ein anderer wäre es ST zu nutzen. Ich glaube der Fehler ist bereits bei CODESYS adressiert.
Last updated: 2023-11-11

Post by macros8 on Visualization using methods and cyclic ST-calls CODESYS Forge talk (Post)
Have you found the way how to call any function in case the visu is opened? Like on event when the screen is opened to initialize some variables etc.? I can´t... :/
Last updated: 2024-03-01

Post by sturmghost on Visualization using methods and cyclic ST-calls CODESYS Forge talk (Post)
Not sure what you mean but you can define a visu initialization program and call it once at the visu initialization step. Look in the Visualization Manager there is a possibility to define such a program.
Last updated: 2024-03-03

Post by ph0010421 on Sending Sequential Modbus TCP Packets CODESYS Forge talk (Post)
Hello You'll need to write a proper sequence to send, then wait for confirmation, and then move on to the next step. Use the CASE statement in ST. It's perfect for creating a sequence.
Last updated: 2024-03-08

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by baradejoo on PubSub communication - example CODESYS Forge talk (Post)
Hi, Recently, I purchased a license for PubSub communication from the CODESYS store. Unfortunately, after installation, I couldn't find any example code in the files. Is there anyone who can share such an example/send links or help with writing such communication in ST language?"
Last updated: 2024-03-25

Post by k2saki on Open dialog from ST , how to set parameters (vars) to dialog CODESYS Forge talk (Post)
Hi, I have a question regarding this. https://forge.codesys.com/forge/talk/Engineering/thread/8be0f6f14a/ But, How do I set parameters (var input, output ) to a dialog ?
Last updated: 2024-06-05

Post by k2saki on Open dialog from ST previous to version 3.5.6 CODESYS Forge talk (Post)
Thanks, that helps me a lot, but I have a question about this. https://forge.codesys.com/forge/talk/Engineering/thread/d8839077a0/
Last updated: 2024-06-05

Post by i-campbell on What is this ST syntax? CODESYS Forge talk (Post)
https://content.helpme-codesys.com/en/CODESYS%20Development%20System/_cds_st_comment.html it is a comment. I guess it used to be NOT _somevariable and someone want it to always be true.
Last updated: 2024-10-12

Post by eschwellinger on communication CODESYS Forge talk (Post)
depends on if you use PFC200 SL from CODESYS store or the Wago target for the PFC. If you use the SL product you need to setup the interface by a plcshell command...
Last updated: 2023-08-19

Post by ph0010421 on How to create a stopwatch? CODESYS Forge talk (Post)
FUNCTION_BLOCK fbdStopwatch VAR_INPUT Condition: BOOL; END_VAR VAR_OUTPUT TimeTaken: TIME; END_VAR VAR StartTime: TIME; fbiStartOs: R_TRIG; fbiStopOs: F_TRIG; END_VAR and then: fbiStartOs(CLK := Condition); fbiStopOs(CLK := Condition); IF fbiStartOs.Q THEN StartTime := TIME(); END_IF; IF fbiStopOs.Q THEN TimeTaken := TIME() - StartTime; END_IF;
Last updated: 2023-12-07

<< < 1 .. 6 7 8 9 10 .. 42 > >> (Page 8 of 42)

Showing results of 1026

Sort by relevance or date