You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 23rd, 2022, 07:05 PM   #1
Hann
Member
New Zealand

Hann is offline
 
Join Date: Nov 2022
Location: New Zealand
Posts: 13
Omron CX-Programmer Initialising Arrays

Is there a way in CX-Programmer to initialise an array?
Set all values to zero or false depending on the data type
Solutions in Ladder and Structured Text are needed
The solution that uses the fewest steps is desired.



Potential solutions
- Set each element to 0 or False (Consumes many steps to do this)
- Use a for loop to reset all values
- Incapsulate a for loop into a function that has an array as an In_Out Parameter.
- For Bool arrays mov a #0 into the first element of the array. (Not able to do this with other array types)

I would like to know if there are methods that I am not seeing for accomplishing this task.

  Reply With Quote
Old November 23rd, 2022, 09:44 PM   #2
mendonsy
Member
United States

mendonsy is offline
 
mendonsy's Avatar
 
Join Date: Feb 2009
Location: Western NY
Posts: 795
Take a look at the BSET(071) instruction.
  Reply With Quote
Old November 24th, 2022, 08:31 PM   #3
Hann
Member
New Zealand

Hann is offline
 
Join Date: Nov 2022
Location: New Zealand
Posts: 13
Is there a way to call BSET from Structured Text?
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Omron CX programmer retentive timer gzPLC LIVE PLC Questions And Answers 3 January 3rd, 2020 05:28 PM
Unable to Open Omron CX Programmer Project isteak007 LIVE PLC Questions And Answers 4 April 7th, 2014 01:43 PM
Omron cx programmer keep T Gibbs LIVE PLC Questions And Answers 4 December 17th, 2012 06:54 PM
Omron CX Programmer slow screen update while online 69FIREBIRD LIVE PLC Questions And Answers 7 May 8th, 2009 04:39 AM
advantech with Twincat over Parker with Omron CX Supervisor rock LIVE PLC Questions And Answers 3 March 7th, 2004 08:54 PM


All times are GMT -4. The time now is 02:01 AM.


.