Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

PLC Error (checkbounds)

PLC Error (checkbounds)

Axay
Established Member

Dear Community, 

 

I am using ctrlX PLC 1.20 and ctrlX Work with version 1.20.2.

i have this code snippet when i compile the code i dont have any error but as soon as a login a am receiving the below error.

Axay_1-1708355155590.png

 

Axay_0-1708354844100.png

What if i delete the folder of checkfunction? for example Checkbounds.

Thank you!!

5 REPLIES 5

CodeShepherd
Community Moderator
Community Moderator

Please check your call stack in case (View --> Call Stack) of the exception. That should lead you to the line that is using the NULL pointer. 

If you remove the check pointer function the error above will not longer shown, but you will still run into that pointer exception without the possibility to check where it is coming from.

Thank you for your reply.

If you look at attached code snippet ,  I applied array inside of for loop . Because of array i cant not do login . Why i can not operate array inside of any loop?

bostroemc
Occasional Contributor

Can you show the definitions of the various arrays in your code (MoveLinearAbsolute, MoveDirectAbsolute, point, point1, Run_sequence, etc.)?  In particular, what are the upper bounds?

Also, the FOR loop is running 1 through 27 each scan of the PLC, meaning that you are issuing (potentially) 27 move commands per scan.  Is this really what you are trying to do?

Chirag03
Established Member

it is basically if we have 100 different position then robot can move according to position data. what i am trying to do is if 1st motion is finish then 2nd motion will start and so on. I can not use any loop function because it generate the check function error. so i connected out put of first motion to initiate the 2nd motion.

Chirag03_0-1710159838701.png

 

So is it solved in your application?

In general you can for sure use arrays in loops. But like @bostroemc mentioned you are looping and writing all 27 commands in one single cycle. I am not sure if the MX_Automation allows multiple commands in a single cycle, as it is an serial interface.

In your case I would only use one KRC.MoveLinearAbsolute or use them one after the other (like described in your last post) and then just change the inputs of this single function block as it has finished.

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist