Hi,
I have and Uno R4 that will run my sketch and connect to the cloud. However after I create a dashboard and assign the desired variables to a dashboard widget the Uno then gets a bus fault. I attached my code, as well as the fault from the serial monitor below. Any ideas or suggestions would be appreciated. I have tried 2 different Arduinos and have the same results on both.
Also, if I do not run the cloud update the sketch runs fine on the Arduino as well.
#include "arduino_secrets.h"
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/502ad697-8c61-493c-8f89-5f7cdbcc3cd1
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
float xAxis_HomePosmm;
float xAxis_Indexmm;
float xAxis_MoveToPosmm;
float xAxis_Posmm;
float xAxis_RPM;
float yAxis_HomePosmm;
float yAxis_Indexmm;
float yAxis_MoveToPosmm;
float yAxis_Posmm;
float yAxis_RPM;
float zAxis_HomePosmm;
float zAxis_Indexmm;
float zAxis_MoveToPosmm;
float zAxis_Posmm;
float zAxis_RPM;
int cloudUpdateRate;
int scanRateMS;
int wifiSignalStrength;
int xAxis_Accel;
int xAxis_Index;
int xAxis_MaxSpeed;
int xAxis_MoveToPos;
int xAxis_Pos;
int xAxis_PulsesPerRev;
int xAxis_SetPos;
int yAxis_Accel;
int yAxis_Index;
int yAxis_MaxSpeed;
int yAxis_MoveToPos;
int yAxis_Pos;
int yAxis_PulsesPerRev;
int yAxis_SetPos;
int zAxis_Accel;
int zAxis_Index;
int zAxis_MaxSpeed;
int zAxis_MoveToPos;
int zAxis_Pos;
int zAxis_PulsesPerRev;
int zAxis_SetPos;
bool heartbeat;
bool stopMotionPB;
bool xAxis_Alarm;
bool xAxis_EnablePB;
bool xAxis_IndexNegPB;
bool xAxis_IndexPosPB;
bool xAxis_InPosition;
bool xAxis_MoveToPB;
bool xAxis_SetPosPB;
bool yAxis_Alarm;
bool yAxis_EnablePB;
bool yAxis_IndexNegPB;
bool yAxis_IndexPosPB;
bool yAxis_InPosition;
bool yAxis_MoveToPB;
bool yAxis_SetPosPB;
bool zAxis_Alarm;
bool zAxis_EnablePB;
bool zAxis_IndexNegPB;
bool zAxis_IndexPosPB;
bool zAxis_InPosition;
bool zAxis_MoveToPB;
bool zAxis_SetPosPB;
Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
which are called when their values are changed from the Dashboard.
These functions are generated with the Thing and added at the end of this sketch.
*/
#include "thingProperties.h"
#include <AccelStepper.h>
//Define Axes
AccelStepper XAxis(1,2,3);
AccelStepper YAxis(1,7,8);
AccelStepper ZAxis(1,12,13);
bool BlockCloudUpdate = false;
int CloudUpdatePrevMS = 0;
int CloudDisconnectedMS = 0;
int CloudClock = 0;
bool OkToRestart = true;
int ScanRatePrevMS = 0;
int HeartbeatStartTime = 0;
int XAxisLead = 165; //165mm per Revolution
int YAxisLead = 10; //10mm per Revolution
int ZAxisLead = 165; // 165mm per Revolution
int XAxis_CmdPos = 0;
int YAxis_CmdPos = 0;
int ZAxis_CmdPos = 0;
int XAxis_HomePos = 0;
int YAxis_HomePos = 0;
int ZAxis_HomePos = 0;
void setup() {
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
/*
The following function allows you to obtain more information
related to the state of network and IoT Cloud connection and errors
the higher number the more granular information you’ll get.
The default is 0 (only errors).
Maximum is 4
*/
setDebugMessageLevel(4);
ArduinoCloud.printDebugInfo();
//XAxis Stepper Setup
pinMode(2, OUTPUT); //Stepper Pulse Pin
pinMode(3, OUTPUT); //Stepper Direction Pin
pinMode(4, INPUT_PULLUP); //Stepper Drive Alarm Status
pinMode(5, OUTPUT); //Stepper Enable
pinMode(6, INPUT_PULLUP); // Stepper in Position
XAxis.setMinPulseWidth(30);
XAxis.setEnablePin(5);
XAxis.disableOutputs();
//YAxis Stepper Setup
pinMode(7, OUTPUT); //Stepper Pulse Pin
pinMode(8, OUTPUT); //Stepper Direction Pin
pinMode(9, INPUT_PULLUP); //Stepper Drive Alarm Status
pinMode(10, OUTPUT); //Stepper Enable
pinMode(11, INPUT_PULLUP); // Stepper in Position
XAxis.setMinPulseWidth(30);
XAxis.setEnablePin(10);
XAxis.disableOutputs();
//ZAxis Stepper Setup
pinMode(12, OUTPUT); //Stepper Pulse Pin
pinMode(13, OUTPUT); //Stepper Direction Pin
pinMode(A3, INPUT_PULLUP); //Stepper Drive Alarm Status
pinMode(A1, OUTPUT); // Stepper Enable
pinMode(A2, INPUT_PULLUP); // Stepper in Position
ZAxis.setMinPulseWidth(30);
ZAxis.setEnablePin(A1);
ZAxis.disableOutputs();
ZAxis.setPinsInverted(true, false, false); //Set Direction to be Positive in +Z Direction
}
void loop() {
Serial.println("Loop Started");
//Cloud Update Logic
if (!BlockCloudUpdate) {
CloudUpdateLogic();
}
//Scan Rate and Heart Beat Logic
ScanRateLogic();
//Call Stepper Functions
XAxisStepperLogic();
YAxisStepperLogic();
ZAxisStepperLogic();
Serial.println("Loop Completed");
}
/*Cloud Update Logic*/
void CloudUpdateLogic() {
Serial.println("Cloud Update Started");
cloudUpdateRate = 500;
//Cloud Update
if ((millis() - CloudUpdatePrevMS >= cloudUpdateRate)) {
Serial.println("CU1");
ArduinoCloud.update();
//Serial.println("CU2");
CloudUpdatePrevMS = millis();
//Serial.println("CU3");
}
Serial.println("CU4");
if (ArduinoCloud.connected()) {
CloudClock = ArduinoCloud.getLocalTime();
wifiSignalStrength = WiFi.RSSI();
}
Serial.println("CU5");
//Cloud Disconnected then Auto Reset
if (ArduinoCloud.connected()) {
CloudDisconnectedMS = millis();
}
else
{
if ((millis() - CloudDisconnectedMS) > (300000) and OkToRestart) {
NVIC_SystemReset();
CloudDisconnectedMS = millis();
}
}
//Serial.println("CU6");
}
//ScanRate and Heartbeat Logic
void ScanRateLogic() {
//Heartbeat
if (millis() - HeartbeatStartTime > 1000) {
if (heartbeat) {
heartbeat = false;
}
else {
heartbeat = true;
}
HeartbeatStartTime = millis();
}
//Scan Rate
scanRateMS = millis() - ScanRatePrevMS;
ScanRatePrevMS = millis();
}
//XAxis Stepper Logic
void XAxisStepperLogic() {
//Monitor Alarm Bit of Stepper Driver
//High = No Alarm, Low = Alarm
xAxis_Alarm = digitalRead(4);
//Monitor In Position of Stepper Driver
xAxis_InPosition = digitalRead(6);
//XAxis Positional Data
xAxis_Pos = XAxis.currentPosition();
xAxis_Posmm = (float(XAxis.currentPosition()) / float(xAxis_PulsesPerRev) * float(XAxisLead));
if (xAxis_SetPosPB) {
XAxis.setCurrentPosition(xAxis_SetPos);
}
xAxis_RPM = (xAxis_MaxSpeed * 60) / xAxis_PulsesPerRev;
//XAxis Run
while(XAxis.distanceToGo() != 0 && xAxis_Alarm == false){
XAxis.run();
}
//Stepper 1 Moves
if (stopMotionPB) {
XAxis.stop();
}
//Block Cloud Update While Running
if (XAxis.isRunning()) {
BlockCloudUpdate = true;
}
else {
BlockCloudUpdate = false;
}
}
//YAxis Stepper Logic
void YAxisStepperLogic() {
//Monitor Alarm Bit of Stepper Driver
//High = No Alarm, Low = Alarm
yAxis_Alarm = digitalRead(4);
//Monitor In Position of Stepper Driver
yAxis_InPosition = digitalRead(6);
//YAxis Positional Data
yAxis_Pos = YAxis.currentPosition();
yAxis_Posmm = (float(YAxis.currentPosition()) / float(yAxis_PulsesPerRev) * float(YAxisLead));
if (yAxis_SetPosPB) {
YAxis.setCurrentPosition(yAxis_SetPos);
}
yAxis_RPM = (yAxis_MaxSpeed * 60) / yAxis_PulsesPerRev;
//YAxis Run
while(YAxis.distanceToGo() != 0 && yAxis_Alarm == false){
YAxis.run();
}
//Stepper 1 Moves
if (stopMotionPB) {
YAxis.stop();
}
//Block Cloud Update While Running
if (YAxis.isRunning()) {
BlockCloudUpdate = true;
}
else {
BlockCloudUpdate = false;
}
}
//ZAxis Stepper Logic
void ZAxisStepperLogic() {
//Monitor Alarm Bit of Stepper Driver
//High = No Alarm, Low = Alarm
zAxis_Alarm = digitalRead(A3);
//Monitor In Position of Stepper Driver
zAxis_InPosition = digitalRead(A2);
//ZAxis Positional Data
zAxis_Pos = ZAxis.currentPosition();
zAxis_Posmm = (float(ZAxis.currentPosition()) / float(zAxis_PulsesPerRev) * float(ZAxisLead));
if (zAxis_SetPosPB) {
ZAxis.setCurrentPosition(zAxis_SetPos);
}
zAxis_RPM = (zAxis_MaxSpeed * 60) / zAxis_PulsesPerRev;
//ZAxis Run
while(ZAxis.distanceToGo() != 0 && zAxis_Alarm == false){
ZAxis.run();
}
//Stepper 1 Moves
if (stopMotionPB) {
ZAxis.stop();
}
//Block Cloud Update While Running
if (ZAxis.isRunning()) {
BlockCloudUpdate = true;
}
else {
BlockCloudUpdate = false;
}
//Position Conversions from mm to steps
ZAxis_HomePos = float(zAxis_HomePosmm) * (float(zAxis_PulsesPerRev) / float(ZAxisLead));
}
/*
Since CloudUpdateRate is READ_WRITE variable, onCloudUpdateRateChange() is
executed every time a new value is received from IoT Cloud.
*/
void onCloudUpdateRateChange() {
// Add your code here to act upon CloudUpdateRate change
}
/*
Since WifiSignalStrength is READ_WRITE variable, onWifiSignalStrengthChange() is
executed every time a new value is received from IoT Cloud.
*/
void onWifiSignalStrengthChange() {
// Add your code here to act upon WifiSignalStrength change
}
/*
Since ScanRateMS is READ_WRITE variable, onScanRateMSChange() is
executed every time a new value is received from IoT Cloud.
*/
void onScanRateMSChange() {
// Add your code here to act upon ScanRateMS change
}
/*
Since XAxisEnablePB is READ_WRITE variable, onXAxisEnablePBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisEnablePBChange() {
// Add your code here to act upon XAxisEnablePB change
if (!xAxis_EnablePB){
XAxis.enableOutputs();
//digitalWrite(5, HIGH);
}
if (xAxis_EnablePB){
XAxis.disableOutputs();
//digitalWrite(5, LOW);
}
}
/*
Since XAxisIndexNegPB is READ_WRITE variable, onXAxisIndexNegPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisIndexNegPBChange() {
// Add your code here to act upon XAxisIndexNegPB change
if (xAxis_IndexNegPB) {
XAxis.move(-1 * xAxis_Index);
}
}
/*
Since XAxisIndexPosPB is READ_WRITE variable, onXAxisIndexPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisIndexPosPBChange() {
// Add your code here to act upon XAxisIndexPosPB change
if (xAxis_IndexPosPB) {
XAxis.move(xAxis_Index);
}
}
/*
Since XAxisMoveToPB is READ_WRITE variable, onXAxisMoveToPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisMoveToPBChange() {
// Add your code here to act upon XAxisMoveToPB change
XAxis.moveTo(xAxis_MoveToPos);
}
/*
Since XAxisSetPosPB is READ_WRITE variable, onXAxisSetPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisSetPosPBChange() {
// Add your code here to act upon XAxisSetPosPB change
}
/*
Since XAxisAccel is READ_WRITE variable, onXAxisAccelChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisAccelChange() {
// Add your code here to act upon XAxisAccel change
XAxis.setAcceleration(xAxis_Accel);
}
/*
Since XAxisIndex is READ_WRITE variable, onXAxisIndexChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisIndexChange() {
// Add your code here to act upon XAxisIndex change
xAxis_Indexmm = float(xAxis_Index) / float(xAxis_PulsesPerRev) * float(XAxisLead);
}
/*
Since XAxisMaxSpeed is READ_WRITE variable, onXAxisMaxSpeedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisMaxSpeedChange() {
// Add your code here to act upon XAxisMaxSpeed change
XAxis.setMaxSpeed(xAxis_MaxSpeed);
}
/*
Since XAxisMoveToPos is READ_WRITE variable, onXAxisMoveToPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisMoveToPosChange() {
// Add your code here to act upon XAxisMoveToPos change
xAxis_MoveToPosmm = float(xAxis_MoveToPos) / float(xAxis_PulsesPerRev) * float(XAxisLead);
}
/*
Since XAxisPulsesPerRev is READ_WRITE variable, onXAxisPulsesPerRevChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisPulsesPerRevChange() {
// Add your code here to act upon XAxisPulsesPerRev change
}
/*
Since XAxisSetPos is READ_WRITE variable, onXAxisSetPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisSetPosChange() {
// Add your code here to act upon XAxisSetPos change
}
/*
Since XAxisHomePosmm is READ_WRITE variable, onXAxisHomePosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisHomePosmmChange() {
// Add your code here to act upon XAxisHomePosmm change
XAxis_HomePos = float(xAxis_HomePosmm) * (float(xAxis_PulsesPerRev) / float(XAxisLead));
}
/*
Since XAxisIndexmm is READ_WRITE variable, onXAxisIndexmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisIndexmmChange() {
// Add your code here to act upon XAxisIndexmm change
xAxis_Index = float(xAxis_Indexmm) * (float(xAxis_PulsesPerRev) / float(XAxisLead));
}
/*
Since XAxisMoveToPosmm is READ_WRITE variable, onXAxisMoveToPosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisMoveToPosmmChange() {
// Add your code here to act upon XAxisMoveToPosmm change
xAxis_MoveToPos = float(xAxis_MoveToPosmm) * (float(xAxis_PulsesPerRev) / float(XAxisLead));
}
/*
Since XAxisRPM is READ_WRITE variable, onXAxisRPMChange() is
executed every time a new value is received from IoT Cloud.
*/
void onXAxisRPMChange() {
// Add your code here to act upon XAxisRPM change
}
/*
Since StopMotionPB is READ_WRITE variable, onStopMotionPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onStopMotionPBChange() {
// Add your code here to act upon StopMotionPB change
}
/*
Since YAxisEnablePB is READ_WRITE variable, onYAxisEnablePBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisEnablePBChange() {
// Add your code here to act upon YAxisEnablePB change
if (!yAxis_EnablePB){
YAxis.enableOutputs();
}
if (yAxis_EnablePB){
YAxis.disableOutputs();
}
}
/*
Since YAxisIndexNegPB is READ_WRITE variable, onYAxisIndexNegPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisIndexNegPBChange() {
// Add your code here to act upon YAxisIndexNegPB change
if (yAxis_IndexNegPB) {
YAxis.move(-1 * yAxis_Index);
}
}
/*
Since YAxisIndexPosPB is READ_WRITE variable, onYAxisIndexPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisIndexPosPBChange() {
// Add your code here to act upon YAxisIndexPosPB change
if (yAxis_IndexPosPB) {
YAxis.move(yAxis_Index);
}
}
/*
Since YAxisMoveToPB is READ_WRITE variable, onYAxisMoveToPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisMoveToPBChange() {
// Add your code here to act upon YAxisMoveToPB change
YAxis.moveTo(yAxis_MoveToPos);
}
/*
Since YAxisSetPosPB is READ_WRITE variable, onYAxisSetPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisSetPosPBChange() {
// Add your code here to act upon YAxisSetPosPB change
}
/*
Since YAxisAccel is READ_WRITE variable, onYAxisAccelChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisAccelChange() {
// Add your code here to act upon YAxisAccel change
YAxis.setAcceleration(yAxis_Accel);
}
/*
Since YAxisIndex is READ_WRITE variable, onYAxisIndexChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisIndexChange() {
// Add your code here to act upon YAxisIndex change
yAxis_Indexmm = float(yAxis_Index) / float(yAxis_PulsesPerRev) * float(YAxisLead);
}
/*
Since YAxisMaxSpeed is READ_WRITE variable, onYAxisMaxSpeedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisMaxSpeedChange() {
// Add your code here to act upon YAxisMaxSpeed change
YAxis.setMaxSpeed(yAxis_MaxSpeed);
}
/*
Since YAxisMoveToPos is READ_WRITE variable, onYAxisMoveToPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisMoveToPosChange() {
// Add your code here to act upon YAxisMoveToPos change
yAxis_MoveToPosmm = float(yAxis_MoveToPos) / float(yAxis_PulsesPerRev) * float(YAxisLead);
}
/*
Since YAxisPulsesPerRev is READ_WRITE variable, onYAxisPulsesPerRevChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisPulsesPerRevChange() {
// Add your code here to act upon YAxisPulsesPerRev change
}
/*
Since YAxisSetPos is READ_WRITE variable, onYAxisSetPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisSetPosChange() {
// Add your code here to act upon YAxisSetPos change
}
/*
Since YAxisHomePosmm is READ_WRITE variable, onYAxisHomePosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisHomePosmmChange() {
// Add your code here to act upon YAxisHomePosmm change
YAxis_HomePos = float(yAxis_HomePosmm) * (float(yAxis_PulsesPerRev) / float(YAxisLead));
}
/*
Since YAxisIndexmm is READ_WRITE variable, onYAxisIndexmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisIndexmmChange() {
// Add your code here to act upon YAxisIndexmm change
yAxis_Index = float(yAxis_Indexmm) * (float(yAxis_PulsesPerRev) / float(YAxisLead));
}
/*
Since YAxisMoveToPosmm is READ_WRITE variable, onYAxisMoveToPosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onYAxisMoveToPosmmChange() {
// Add your code here to act upon YAxisMoveToPosmm change
yAxis_MoveToPos = float(yAxis_MoveToPosmm) * (float(yAxis_PulsesPerRev) / float(YAxisLead));
}
/*
Since ZAxisEnablePB is READ_WRITE variable, onZAxisEnablePBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisEnablePBChange() {
// Add your code here to act upon ZAxisEnablePB change
if (!zAxis_EnablePB){
ZAxis.enableOutputs();
}
if (zAxis_EnablePB){
ZAxis.disableOutputs();
}
}
/*
Since ZAxisIndexNegPB is READ_WRITE variable, onZAxisIndexNegPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisIndexNegPBChange() {
// Add your code here to act upon ZAxisIndexNegPB change
if (zAxis_IndexNegPB) {
ZAxis.move(-1 * zAxis_Index);
}
}
/*
Since ZAxisIndexPosPB is READ_WRITE variable, onZAxisIndexPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisIndexPosPBChange() {
// Add your code here to act upon ZAxisIndexPosPB change
if (zAxis_IndexPosPB) {
ZAxis.move(zAxis_Index);
}
}
/*
Since ZAxisMoveToPB is READ_WRITE variable, onZAxisMoveToPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisMoveToPBChange() {
// Add your code here to act upon ZAxisMoveToPB change
ZAxis.moveTo(zAxis_MoveToPos);
}
/*
Since ZAxisSetPosPB is READ_WRITE variable, onZAxisSetPosPBChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisSetPosPBChange() {
// Add your code here to act upon ZAxisSetPosPB change
}
/*
Since ZAxisAccel is READ_WRITE variable, onZAxisAccelChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisAccelChange() {
// Add your code here to act upon ZAxisAccel change
ZAxis.setAcceleration(zAxis_Accel);
}
/*
Since ZAxisIndex is READ_WRITE variable, onZAxisIndexChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisIndexChange() {
// Add your code here to act upon ZAxisIndex change
zAxis_Indexmm = float(zAxis_Index) / float(zAxis_PulsesPerRev) * float(ZAxisLead);
}
/*
Since ZAxisMaxSpeed is READ_WRITE variable, onZAxisMaxSpeedChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisMaxSpeedChange() {
// Add your code here to act upon ZAxisMaxSpeed change
ZAxis.setMaxSpeed(zAxis_MaxSpeed);
}
/*
Since ZAxisMoveToPos is READ_WRITE variable, onZAxisMoveToPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisMoveToPosChange() {
// Add your code here to act upon ZAxisMoveToPos change
zAxis_MoveToPosmm = float(zAxis_MoveToPos) / float(zAxis_PulsesPerRev) * float(ZAxisLead);
}
/*
Since ZAxisPulsesPerRev is READ_WRITE variable, onZAxisPulsesPerRevChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisPulsesPerRevChange() {
// Add your code here to act upon ZAxisPulsesPerRev change
}
/*
Since ZAxisSetPos is READ_WRITE variable, onZAxisSetPosChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisSetPosChange() {
// Add your code here to act upon ZAxisSetPos change
}
/*
Since ZAxisHomePosmm is READ_WRITE variable, onZAxisHomePosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisHomePosmmChange() {
// Add your code here to act upon ZAxisHomePosmm change
ZAxis_HomePos = float(zAxis_HomePosmm) * (float(zAxis_PulsesPerRev) / float(ZAxisLead));
}
/*
Since ZAxisIndexmm is READ_WRITE variable, onZAxisIndexmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisIndexmmChange() {
// Add your code here to act upon ZAxisIndexmm change
zAxis_Index = float(zAxis_Indexmm) * (float(zAxis_PulsesPerRev) / float(ZAxisLead));
}
/*
Since ZAxisMoveToPosmm is READ_WRITE variable, onZAxisMoveToPosmmChange() is
executed every time a new value is received from IoT Cloud.
*/
void onZAxisMoveToPosmmChange() {
// Add your code here to act upon ZAxisMoveToPosmm change
zAxis_MoveToPos = float(zAxis_MoveToPosmm) * (float(zAxis_PulsesPerRev) / float(ZAxisLead));
}
09:13:04.649 -> addr: 20007e98 data: 00000077
09:13:04.649 -> addr: 20007e9c data: 0000d5f1
09:13:04.789 -> addr: 20007ea0 data: 20000974
09:13:04.789 -> addr: 20007ea4 data: 20000a88
09:13:04.789 -> addr: 20007ea8 data: 0000a500
09:13:04.789 -> addr: 20007eac data: ffffffff
09:13:04.909 -> addr: 20007eb0 data: 20003064
09:13:04.909 -> addr: 20007eb4 data: 05000000
09:13:04.909 -> addr: 20007eb8 data: 00020000
09:13:05.047 -> addr: 20007ebc data: 00005819
09:13:05.047 -> addr: 20007ec0 data: 00000000
09:13:05.047 -> addr: 20007ec4 data: 00000000
09:13:05.229 -> addr: 20007ec8 data: 00004040
09:13:05.229 -> addr: 20007ecc data: 000058e5
09:13:05.229 -> addr: 20007ed0 data: 00000000
09:13:05.229 -> addr: 20007ed4 data: 00015151
09:13:05.322 -> addr: 20007ed8 data: 0001fe85
09:13:05.322 -> addr: 20007edc data: 40046f00
09:13:05.322 -> addr: 20007ee0 data: 00000000
09:13:05.460 -> addr: 20007ee4 data: 0001518f
09:13:05.460 -> addr: 20007ee8 data: 0001fe85
09:13:05.460 -> addr: 20007eec data: 0000ea53
09:13:05.597 -> addr: 20007ef0 data: 0001fe85
09:13:05.597 -> addr: 20007ef4 data: 0001247b
09:13:05.597 -> addr: 20007ef8 data: 00012471
09:13:05.597 -> addr: 20007efc data: 00002599
09:13:05.771 -> ====================================
09:13:05.771 -> Bus fault is caused by precise data access violation
09:13:05.771 -> The bus fault occurred address is fb211553