Micro850 Variables

Jieve

Member
Join Date
Feb 2012
Location
USA
Posts
274
Hello,


programming an AB Micro850 for the first time, using the developer edition of CCW and trying to figure out how to best structure programs, but the lack of VarInOut in FBs is causing me some major limitations, as I can't pass UDTs into FBs unless they are all input or all output, and can't write variables that are read as inputs. It takes away a lot of the usefulness of structures and FBs in general.


Is there any way to use an "InOut" variable, or a technique that you all use that mimics this?


Thanks,
 
a single external UDTs can be both an In and an Out to the FB.

Internally the FB will need to copy the In to the Out at the start of the FB, then use the Out instance, and any subsequent changes made to the Out will end up in the original external UDT.

Although I thought CCW did have the InOut argument type.
 
So this works for passing UDTs through FBs, which solves one issue, but it doesn't quite replace having an InOut variable as it's not possible to write to the In variables.


CCW doesn't have an InOut option, at least not that I've found, so I haven't found a way to take a variable into an FB, change its value, then write it back out.



I feel like there has to be a way to do this ... I found a suggestion that this is possible in a youtube video on Micro800 FBs and UDTs; however it wasn't described in the video; someone asked in the comments if it's possible, to which the poster replied "yes, I'll show that in an upcoming video" and never added a link or said which video it is o_O
 
So this works for passing UDTs through FBs, which solves one issue, but it doesn't quite replace having an InOut variable as it's not possible to write to the In variables.


You don't have to write to the In variable; writing to the output variable is the same as writing to the external variable that is on both the In and the Out pins of the FB.
 
You don't have to write to the In variable; writing to the output variable is the same as writing to the external variable that is on both the In and the Out pins of the FB.


Like this (using a DINT instead of a UDT, but I doubt that matters in practice; Rung 4 can be ignored):
Untitled.png

Untitled1.png
 

Similar Topics

Hi everyone, I am working with micro850, a proximity sensor (FOTEK, PL-05P) and a 3DOF serial arm robot. I use MC_MoveRelative to control the...
Replies
1
Views
81
HI everyone! I am trying to use a Micro850 to control a SureStep (Leadshine) Stepper drive (DM805-AI) from Automationdirect. I have no trouble...
Replies
7
Views
187
Hi guys, I have had some issues with uploading a program from a Micro 850 PLC. This is the first time connecting so I don’t have a file on my...
Replies
8
Views
317
I'm using a Micro850 with a Panelview 800, programming in CCW. We'd like the customer to be able to schedule the system to startup at a certain...
Replies
5
Views
142
Currently a student, so somewhat new to this. But working with an AB 2080-LC50-24QWB, CCW version 21.01.00. CCW will connect okay to the Micro850...
Replies
9
Views
316
Back
Top Bottom